[PATCH-for-9.1 v2 0/3] target/nios2: Remove the deprecated Nios II target
by Philippe Mathieu-Daudé
Since v1:
- Remove user emulation too
- Remove ALTERA_TIMER
Philippe Mathieu-Daudé (3):
fpu/softfloat: Remove mention of TILE-Gx target
target/nios2: Remove the deprecated Nios II target
hw/timer: Remove the ALTERA_TIMER model
MAINTAINERS | 13 -
docs/about/deprecated.rst | 11 -
docs/about/emulation.rst | 7 -
docs/about/removed-features.rst | 14 +
docs/system/replay.rst | 2 +-
docs/user/main.rst | 4 -
configure | 2 -
configs/devices/nios2-softmmu/default.mak | 6 -
configs/targets/nios2-linux-user.mak | 1 -
configs/targets/nios2-softmmu.mak | 2 -
meson.build | 2 -
qapi/machine.json | 2 +-
hw/nios2/boot.h | 10 -
include/disas/dis-asm.h | 5 -
include/exec/poison.h | 2 -
include/exec/user/abitypes.h | 3 +-
include/hw/intc/nios2_vic.h | 66 -
include/sysemu/arch_init.h | 1 -
linux-user/nios2/sockbits.h | 1 -
linux-user/nios2/syscall_nr.h | 333 --
linux-user/nios2/target_cpu.h | 49 -
linux-user/nios2/target_elf.h | 14 -
linux-user/nios2/target_errno_defs.h | 7 -
linux-user/nios2/target_fcntl.h | 11 -
linux-user/nios2/target_mman.h | 11 -
linux-user/nios2/target_prctl.h | 1 -
linux-user/nios2/target_proc.h | 1 -
linux-user/nios2/target_resource.h | 1 -
linux-user/nios2/target_signal.h | 9 -
linux-user/nios2/target_structs.h | 1 -
linux-user/nios2/target_syscall.h | 37 -
linux-user/nios2/termbits.h | 1 -
linux-user/syscall_defs.h | 4 +-
target/nios2/cpu-param.h | 20 -
target/nios2/cpu-qom.h | 18 -
target/nios2/cpu.h | 301 --
target/nios2/helper.h | 32 -
target/nios2/mmu.h | 52 -
tests/tcg/nios2/semicall.h | 28 -
disas/nios2.c | 3514 -----------------
hw/intc/nios2_vic.c | 313 --
hw/nios2/10m50_devboard.c | 181 -
hw/nios2/boot.c | 234 --
hw/nios2/generic_nommu.c | 101 -
hw/timer/altera_timer.c | 244 --
linux-user/elfload.c | 99 -
linux-user/nios2/cpu_loop.c | 157 -
linux-user/nios2/signal.c | 210 -
target/nios2/cpu.c | 410 --
target/nios2/helper.c | 371 --
target/nios2/mmu.c | 216 -
target/nios2/monitor.c | 35 -
target/nios2/nios2-semi.c | 230 --
target/nios2/op_helper.c | 119 -
target/nios2/translate.c | 1107 ------
tests/qtest/machine-none-test.c | 1 -
fpu/softfloat-specialize.c.inc | 2 +-
.gitlab-ci.d/buildtest.yml | 4 +-
.gitlab-ci.d/crossbuild-template.yml | 2 +-
.gitlab-ci.d/crossbuilds.yml | 2 +-
disas/meson.build | 1 -
hw/Kconfig | 1 -
hw/intc/Kconfig | 3 -
hw/intc/meson.build | 1 -
hw/meson.build | 1 -
hw/nios2/Kconfig | 13 -
hw/nios2/meson.build | 6 -
hw/timer/Kconfig | 4 -
hw/timer/meson.build | 1 -
qemu-options.hx | 8 +-
scripts/coverity-scan/COMPONENTS.md | 3 -
scripts/gensyscalls.sh | 1 -
scripts/probe-gdb-support.py | 1 -
target/Kconfig | 1 -
target/meson.build | 1 -
target/nios2/Kconfig | 3 -
target/nios2/meson.build | 17 -
target/nios2/trace-events | 10 -
tests/avocado/boot_linux_console.py | 8 -
tests/avocado/replay_kernel.py | 11 -
tests/docker/Makefile.include | 5 -
.../debian-nios2-cross.d/build-toolchain.sh | 87 -
tests/tcg/nios2/10m50-ghrd.ld | 70 -
tests/tcg/nios2/Makefile.softmmu-target | 32 -
tests/tcg/nios2/Makefile.target | 11 -
tests/tcg/nios2/boot.S | 218 -
tests/tcg/nios2/intr.S | 31 -
tests/tcg/nios2/test-shadow-1.S | 40 -
88 files changed, 28 insertions(+), 9198 deletions(-)
delete mode 100644 configs/devices/nios2-softmmu/default.mak
delete mode 100644 configs/targets/nios2-linux-user.mak
delete mode 100644 configs/targets/nios2-softmmu.mak
delete mode 100644 hw/nios2/boot.h
delete mode 100644 include/hw/intc/nios2_vic.h
delete mode 100644 linux-user/nios2/sockbits.h
delete mode 100644 linux-user/nios2/syscall_nr.h
delete mode 100644 linux-user/nios2/target_cpu.h
delete mode 100644 linux-user/nios2/target_elf.h
delete mode 100644 linux-user/nios2/target_errno_defs.h
delete mode 100644 linux-user/nios2/target_fcntl.h
delete mode 100644 linux-user/nios2/target_mman.h
delete mode 100644 linux-user/nios2/target_prctl.h
delete mode 100644 linux-user/nios2/target_proc.h
delete mode 100644 linux-user/nios2/target_resource.h
delete mode 100644 linux-user/nios2/target_signal.h
delete mode 100644 linux-user/nios2/target_structs.h
delete mode 100644 linux-user/nios2/target_syscall.h
delete mode 100644 linux-user/nios2/termbits.h
delete mode 100644 target/nios2/cpu-param.h
delete mode 100644 target/nios2/cpu-qom.h
delete mode 100644 target/nios2/cpu.h
delete mode 100644 target/nios2/helper.h
delete mode 100644 target/nios2/mmu.h
delete mode 100644 tests/tcg/nios2/semicall.h
delete mode 100644 disas/nios2.c
delete mode 100644 hw/intc/nios2_vic.c
delete mode 100644 hw/nios2/10m50_devboard.c
delete mode 100644 hw/nios2/boot.c
delete mode 100644 hw/nios2/generic_nommu.c
delete mode 100644 hw/timer/altera_timer.c
delete mode 100644 linux-user/nios2/cpu_loop.c
delete mode 100644 linux-user/nios2/signal.c
delete mode 100644 target/nios2/cpu.c
delete mode 100644 target/nios2/helper.c
delete mode 100644 target/nios2/mmu.c
delete mode 100644 target/nios2/monitor.c
delete mode 100644 target/nios2/nios2-semi.c
delete mode 100644 target/nios2/op_helper.c
delete mode 100644 target/nios2/translate.c
delete mode 100644 hw/nios2/Kconfig
delete mode 100644 hw/nios2/meson.build
delete mode 100644 target/nios2/Kconfig
delete mode 100644 target/nios2/meson.build
delete mode 100644 target/nios2/trace-events
delete mode 100755 tests/docker/dockerfiles/debian-nios2-cross.d/build-toolchain.sh
delete mode 100644 tests/tcg/nios2/10m50-ghrd.ld
delete mode 100644 tests/tcg/nios2/Makefile.softmmu-target
delete mode 100644 tests/tcg/nios2/Makefile.target
delete mode 100644 tests/tcg/nios2/boot.S
delete mode 100644 tests/tcg/nios2/intr.S
delete mode 100644 tests/tcg/nios2/test-shadow-1.S
--
2.41.0
6 months, 1 week
[PATCH v5 0/3] test: fix nodedev mdev XML regression
by Cole Robinson
See last patch for explanation. First two patches are related
bugfixes/improvements
v5:
- Changed impl to match Boris' suggestion
Cole Robinson (3):
test: make parsed nodedevs active and persistent
test: Sync GetXML INACTIVE behavior with live driver
test: nodedev: fill active_config at driver startup time
src/conf/node_device_conf.c | 24 ++++++++++++++++++++++++
src/conf/node_device_conf.h | 3 +++
src/libvirt_private.syms | 1 +
src/test/test_driver.c | 20 +++++++++++++++++++-
tests/nodedevxml2xmltest.c | 18 +++---------------
5 files changed, 50 insertions(+), 16 deletions(-)
--
2.44.0
6 months, 1 week
[PATCH 1/1] qemu_domain: fix vcpu hotunplug race by locking vcpupriv
by Shaleen Bathla
multiple parallel timedout vcpu hotunplug requests coming from qemu handled
asynchronously by libvirt can cause data corruption as they modify
vcpu data during refresh by libvirt.
Lock each vcpu before modification and then release the lock
Signed-off-by: Shaleen Bathla <shaleen.bathla(a)oracle.com>
---
src/qemu/qemu_domain.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 3469f0d40c59..15ec1b0a771a 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -10084,6 +10084,7 @@ qemuDomainRefreshVcpuInfo(virDomainObj *vm,
for (i = 0; i < maxvcpus; i++) {
vcpu = virDomainDefGetVcpu(vm->def, i);
vcpupriv = QEMU_DOMAIN_VCPU_PRIVATE(vcpu);
+ virObjectLock(vcpupriv);
if (validTIDs)
vcpupriv->tid = info[i].tid;
@@ -10113,6 +10114,7 @@ qemuDomainRefreshVcpuInfo(virDomainObj *vm,
else
vcpu->hotpluggable = VIR_TRISTATE_BOOL_NO;
}
+ virObjectUnlock(vcpupriv);
}
ret = 0;
--
2.39.3
6 months, 1 week
[PATCH 0/2] tests: Fix 'qemucapsprobe' and update caps for qemu-9.0 release
by Peter Krempa
Peter Krempa (2):
tests: qemucapsprobe: Fix construction of path to
libqemucapsprobemock.so
qemucapabilitiestest: Update qemu capability dump for qemu-9.0 release
.../caps_9.0.0_x86_64.replies | 50 ++-----------------
.../caps_9.0.0_x86_64.xml | 4 +-
tests/qemucapsprobe.c | 2 +-
3 files changed, 7 insertions(+), 49 deletions(-)
--
2.44.0
6 months, 1 week
[PATCH] qemu: migration: Don't use empty string for 'tls-hostname' NBD blockdev
by Peter Krempa
While QEMU accepts and interprets an empty string in the tls-hostname
field in migration parametes as if it's unset, the same does not apply
for the 'tls-hostname' field when 'blockdev-add'-ing a NBD backend for
non-shared storage migration.
When libvirt sets up migation with TLS in 'qemuMigrationParamsEnableTLS'
the QEMU_MIGRATION_PARAM_TLS_HOSTNAME migration parameter will be set to
empty string in case when the 'hostname' argument is passed as NULL.
Later on when setting up the NBD connections for non-shared storage
migration 'qemuMigrationParamsGetTLSHostname', which fetches the value
of the aforementioned TLS parameter.
This bug was mostly latent until recently as libvirt used
MIGRATION_DEST_CONNECT_HOST mode in most cases which required the
hostname to be passed, thus the parameter was set properly.
This changed with 8d693d79c40 for post-copy migration, where libvirt now
instructs qemu to connect and thus passes NULL hostname to
qemuMigrationParamsEnableTLS, which in turn causes libvirt to try to
add NBD connection with empty string as tls-hostname resulting in:
error: internal error: unable to execute QEMU command 'blockdev-add': Certificate does not match the hostname
To address this modify 'qemuMigrationParamsGetTLSHostname' to undo the
weird semantics the migration code uses to handle TLS hostname and make
it return NULL if the hostname is an empty string.
Fixes: e8fa09d66bc
Resolves: https://issues.redhat.com/browse/RHEL-32880
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_migration_params.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index e955822f68..48f8657f71 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -1158,6 +1158,7 @@ qemuMigrationParamsEnableTLS(virQEMUDriver *driver,
*tlsAlias) < 0)
return -1;
+ /* QEMU interprets an empty string for hostname as if it is not populated */
if (!migParams->params[QEMU_MIGRATION_PARAM_TLS_HOSTNAME].set &&
qemuMigrationParamsSetString(migParams,
QEMU_MIGRATION_PARAM_TLS_HOSTNAME,
@@ -1659,13 +1660,23 @@ qemuMigrationCapsGet(virDomainObj *vm,
* @migParams: Migration params object
*
* Fetches the value of the QEMU_MIGRATION_PARAM_TLS_HOSTNAME parameter which is
- * passed from the user as VIR_MIGRATE_PARAM_TLS_DESTINATION
+ * passed from the user as VIR_MIGRATE_PARAM_TLS_DESTINATION.
+ *
+ * In contrast with the migration parameter semantics, where an empty string
+ * is considered as if the hostname was not provided, this function will return
+ * NULL instead of an empty string as other parts of QEMU expect that the
+ * hostname is not provided at all.
*/
const char *
qemuMigrationParamsGetTLSHostname(qemuMigrationParams *migParams)
{
+ const char *hostname = migParams->params[QEMU_MIGRATION_PARAM_TLS_HOSTNAME].value.s;
+
if (!migParams->params[QEMU_MIGRATION_PARAM_TLS_HOSTNAME].set)
return NULL;
- return migParams->params[QEMU_MIGRATION_PARAM_TLS_HOSTNAME].value.s;
+ if (STREQ(hostname, ""))
+ return NULL;
+
+ return hostname;
}
--
2.44.0
6 months, 1 week
RFC: Drop micro part of our release versioning scheme
by Jiri Denemark
Hi,
Does anyone feel strongly against dropping the "micro" part from
libvirt(-python) versions? I think the original idea was to use this
number for maintenance releases in -maint branches, but we stopped doing
those a long time ago (v3.2.1 was the last and most likely even the only
release with micro > 0 since the change in numbering libvirt releases).
So the micro part looks quite useless, not to mention I am lazy to type
the .0 suffix all the time :-)
And if we decide to drop it, what would be the right time? This 10.3
release, the following 10.4 release or should we wait until 11.0?
Personally I'd do it just now, but someone might be relying on the
numbers and would prefer to know about such change in advance to prepare
for it. So perhaps 10.4 or the most conservative 11.0 would be better
options.
Jirka
6 months, 1 week
[PATCH v2 00/27] native support for nftables in virtual network driver
by Laine Stump
V1: https://listman.redhat.com/archives/libvir-list/2023-May/239720.html
Finally, a V2! :-/
This patch series enables libvirt to use nftables rules rather than
iptables *when setting up virtual networks* (it does *not* add
nftables support to the nwfilter driver).
This is accomplished by
1) moving all virtual network iptables-related code from both
util/viriptables.c and network/bridge_driver_linux.c into
util/network_iptables.c, leaving only 3 iptables-related functions
that are called from the bridge driver:
networkAddFirewallRules()
networkRemoveFirewallRules()
networkSetupPrivateChains()
2) creating a network/network_nftables.c that implements nftables
equivalents for 2 of those 3 functions
(networkRemoveFirewallRules() isn't needed for nftables because
other patches in this series update virFirewall to automatically
create the list of commands needed to remove all the rules added by
a particular virFirewall).
There's a bunch of other cleanup and reorganization going on that's
described in the individual patches.
Changes from V1:
* The biggest change is that in V1 I had made a virNetFilter API that
was at the same level as all the low level functions in
viriptable.c. But in the end I realized that, while this would
guarantee that the rules added by the nftables backend were as close
as possible to those created by the iptables backend, it also meant
that any modifications to improve the nftables rules would anyway
necessitate splitting off at a higher level (the 3 functions listed
above), while at the same time rendering the virNetfilter API
unnecessary. So instead I consolidated everything at/below the level
of the 3 above functions into a single file, with a very simple
interface, then duplicated that file and modified the duplicate to
produce nftables rules instead of iptables. The result is that I've
copied slightly more code, but any changes to nftables rules won't
have any effect on the iptables backend.
* util/viriptables.c was moved to network/network_iptables.c since it
is a specific enough API that it was only ever used by the network
driver.
* There is no more circular dependency between virfirewall,
virnetfilter, & virXXtables as pointed out by danpb in his review of
V1. virFirewall does still have the functionality of automatically
generating the necessary commands to remove a firewall (which was
the reason for the circle), but it is self-contained in a couple of
functions in virfirewall.c rather than calling out to virnetfilter.c
(which, btw, doesn't even exist in V2).
* Based on the exchange in the responses to V1, I went ahead and made
nftables the default backend when available (V1 left iptables as the
default). The only behavioral difference between iptables and
nftables is the lack of checksum fixup of bad DHCP packets which is
only an issue for very old guest OSes, and is easy to workaround
(see patches 24 & 26 for details)
The firewall unit tests have been parameterized so that all the tests
are run for both backends. This of course does nothing for all the
tests in libvirt-tck (and any other tests that validate via checking
the output of e.g. "iptables -S"). That is going to take some work,
somewhere, by somebody :-)
One thing I'm undecided about is the firewall object stored in the
networkobj (patches 19 & 20) - the way the code is currently written,
the xml element is called <firewall>, and it contains the virFirewall
object that will remove the network's firewall. I have pondered the
idea of saving the entire original virFirewall object (which includes
all the commands that were used to *create* the firewall, as well as
all the commands needed to remove it), since this might be useful in
debugging. It is quite a lot of data though, and not easily readable
by a human (there is a separate element for each option of each
commandline), so I haven't decided if it's worthwhile. (Alternately,
if I leave it as is, maybe I should change the element name to
<fwRemoval>? Does anyone have an opinion?)
Laine Stump (27):
util/network: move viriptables.[ch] from util to network directory
network: move all functions manipulating iptables rules into
network_iptables.c
network: make all iptables functions used only in network_iptables.c
static
util: #define the names used for private packet filter chains
util: change name of virFirewallRule to virFirewallCmd
util: rename virNetFilterAction to iptablesAction, and add
VIR_ENUM_DECL/IMPL
util: check for 0 args when applying iptables rule
util: add -w/--concurrent when applying a FirewallCmd rather than when
building it
util: determine ignoreErrors value when creating virFirewallCmd, not
when applying
util/network: new virFirewallBackend enum
network: add (empty) network.conf file to distribution files
network: support setting firewallBackend from network.conf
network: framework to call backend-specific function to init private
filter chains
util: new functions to support adding individual firewall rollback
commands
util: implement rollback rule autocreation for iptables commands
network: turn on auto-rollback for the rules added for virtual
networks
util: new function virFirewallNewFromRollback()
util: new functions virFirewallParseXML() and virFirewallFormat()
conf: add a virFirewall object to virNetworkObj
network: use previously saved list of firewall removal commands
network: save network status when firewall rules are reloaded
meson: stop looking for iptables/ip6tables/ebtables at build time
rpm: drop BuildRequires for iptables and ebtables
network: add an nftables backend for network driver's firewall
construction
tests: test cases for nftables backend
network: prefer the nftables backend over iptables
RFC: spec: change iptables/ebtables from Requires to Recommends, add
nftables
libvirt.spec.in | 12 +-
meson.build | 3 -
po/POTFILES | 3 +-
src/conf/virnetworkobj.c | 40 +
src/conf/virnetworkobj.h | 11 +
src/libvirt_private.syms | 57 +-
src/network/bridge_driver.c | 35 +-
src/network/bridge_driver_conf.c | 45 +
src/network/bridge_driver_conf.h | 3 +
src/network/bridge_driver_linux.c | 639 +------
src/network/bridge_driver_nop.c | 6 +-
src/network/bridge_driver_platform.h | 6 +-
src/network/libvirtd_network.aug | 39 +
src/network/meson.build | 13 +
src/network/network.conf | 27 +
src/network/network_iptables.c | 1677 +++++++++++++++++
src/network/network_iptables.h | 30 +
src/network/network_nftables.c | 940 +++++++++
src/network/network_nftables.h | 28 +
src/network/test_libvirtd_network.aug.in | 5 +
src/nwfilter/nwfilter_ebiptables_driver.c | 1004 +++++-----
src/util/meson.build | 1 -
src/util/virebtables.c | 36 +-
src/util/virfirewall.c | 801 ++++++--
src/util/virfirewall.h | 86 +-
src/util/viriptables.c | 1072 -----------
src/util/viriptables.h | 155 --
.../{base.args => base.iptables} | 0
tests/networkxml2firewalldata/base.nftables | 256 +++
...-linux.args => nat-default-linux.iptables} | 0
.../nat-default-linux.nftables | 248 +++
...pv6-linux.args => nat-ipv6-linux.iptables} | 0
.../nat-ipv6-linux.nftables | 384 ++++
...rgs => nat-ipv6-masquerade-linux.iptables} | 0
.../nat-ipv6-masquerade-linux.nftables | 456 +++++
...linux.args => nat-many-ips-linux.iptables} | 0
.../nat-many-ips-linux.nftables | 472 +++++
...-linux.args => nat-no-dhcp-linux.iptables} | 0
.../nat-no-dhcp-linux.nftables | 384 ++++
...ftp-linux.args => nat-tftp-linux.iptables} | 0
.../nat-tftp-linux.nftables | 274 +++
...inux.args => route-default-linux.iptables} | 0
.../route-default-linux.nftables | 162 ++
tests/networkxml2firewalltest.c | 56 +-
tests/virfirewalltest.c | 424 ++---
45 files changed, 7138 insertions(+), 2752 deletions(-)
create mode 100644 src/network/libvirtd_network.aug
create mode 100644 src/network/network.conf
create mode 100644 src/network/network_iptables.c
create mode 100644 src/network/network_iptables.h
create mode 100644 src/network/network_nftables.c
create mode 100644 src/network/network_nftables.h
create mode 100644 src/network/test_libvirtd_network.aug.in
delete mode 100644 src/util/viriptables.c
delete mode 100644 src/util/viriptables.h
rename tests/networkxml2firewalldata/{base.args => base.iptables} (100%)
create mode 100644 tests/networkxml2firewalldata/base.nftables
rename tests/networkxml2firewalldata/{nat-default-linux.args => nat-default-linux.iptables} (100%)
create mode 100644 tests/networkxml2firewalldata/nat-default-linux.nftables
rename tests/networkxml2firewalldata/{nat-ipv6-linux.args => nat-ipv6-linux.iptables} (100%)
create mode 100644 tests/networkxml2firewalldata/nat-ipv6-linux.nftables
rename tests/networkxml2firewalldata/{nat-ipv6-masquerade-linux.args => nat-ipv6-masquerade-linux.iptables} (100%)
create mode 100644 tests/networkxml2firewalldata/nat-ipv6-masquerade-linux.nftables
rename tests/networkxml2firewalldata/{nat-many-ips-linux.args => nat-many-ips-linux.iptables} (100%)
create mode 100644 tests/networkxml2firewalldata/nat-many-ips-linux.nftables
rename tests/networkxml2firewalldata/{nat-no-dhcp-linux.args => nat-no-dhcp-linux.iptables} (100%)
create mode 100644 tests/networkxml2firewalldata/nat-no-dhcp-linux.nftables
rename tests/networkxml2firewalldata/{nat-tftp-linux.args => nat-tftp-linux.iptables} (100%)
create mode 100644 tests/networkxml2firewalldata/nat-tftp-linux.nftables
rename tests/networkxml2firewalldata/{route-default-linux.args => route-default-linux.iptables} (100%)
create mode 100644 tests/networkxml2firewalldata/route-default-linux.nftables
--
2.44.0
6 months, 1 week
[PATCH v4 0/3] test: fix nodedev mdev XML regression
by Cole Robinson
See last patch for explanation. First two patches are related
bugfixes/improvements
v4 changes:
- 3 patches pushed
- mark parsed devices as persistent too
- add GetXML fix patch
Cole Robinson (3):
test: make parsed nodedevs active and persistent
test: Sync GetXML INACTIVE behavior with live driver
conf: nodedev: Fill active_config at XML parse time
src/conf/node_device_conf.c | 5 ++++-
src/test/test_driver.c | 19 ++++++++++++++++++-
tests/nodedevxml2xmltest.c | 15 ---------------
3 files changed, 22 insertions(+), 17 deletions(-)
--
2.44.0
6 months, 1 week
[PATCH] virnetdevopenvswitch: Create OVS ports as transient
by Michal Privoznik
Since OVS keeps desired state in a DB, upon sudden crash of the
host we may leave a port behind. There's no problem on VM
shutdown or NIC hotunplug as we call corresponding del-port
function (virNetDevOpenvswitchRemovePort()). But if the host
suddenly crashes we won't ever do that. What happens next, is
when OVS starts it finds desired state in its DB and creates a
stale port.
OVS added support for transient ports in v2.5.0 (Feb 2016) and
since its v2.9.0 it even installs a systemd service
(ovs-delete-transient-ports) that automatically deletes transient
ports on system startup. If we mark a port as transient then OVS
won't restore its state on restart after crash.
This change may render "--may-exist" argument redundant, but I'm
not sure about all the implications if it was removed. Let's keep
it for now.
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/615
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virnetdevopenvswitch.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
index f1765ae1c8..e23f4c83b6 100644
--- a/src/util/virnetdevopenvswitch.c
+++ b/src/util/virnetdevopenvswitch.c
@@ -164,7 +164,9 @@ int virNetDevOpenvswitchAddPort(const char *brname, const char *ifname,
cmd = virNetDevOpenvswitchCreateCmd(&errbuf);
virCommandAddArgList(cmd, "--", "--may-exist",
- "add-port", brname, ifname, NULL);
+ "add-port", brname, ifname,
+ "--", "set", "Port", ifname, "other_config:transient=true",
+ NULL);
virNetDevOpenvswitchConstructVlans(cmd, virtVlan);
--
2.43.2
6 months, 1 week
[PATCH 0/3] qemu_validate: Reject virtiofs with bootindex on s390 with ccw bus
by Peter Krempa
qemu doesn't support booting there and thus doesn't even expose
bootindex.
Peter Krempa (3):
qemuxmlconftest: Add test case for virtiofs on s390 using 'ccw'
addresses
qemuxmlconftest: Decouple input and output files of
'vhost-user-fs-hugepage' case
qemu_validate: Reject virtiofs with bootindex on s390x with CCW
src/qemu/qemu_validate.c | 19 ++--
...ost-user-fs-ccw-bootindex.s390x-latest.err | 1 +
.../vhost-user-fs-ccw-bootindex.xml | 38 ++++++++
.../vhost-user-fs-ccw.s390x-latest.args | 37 ++++++++
.../vhost-user-fs-ccw.s390x-latest.xml | 43 +++++++++
tests/qemuxmlconfdata/vhost-user-fs-ccw.xml | 40 +++++++++
...vhost-user-fs-hugepages.x86_64-latest.args | 2 +
.../vhost-user-fs-hugepages.x86_64-latest.xml | 87 ++++++++++++++++++-
.../vhost-user-fs-hugepages.xml | 8 ++
tests/qemuxmlconftest.c | 3 +
10 files changed, 272 insertions(+), 6 deletions(-)
create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.s390x-latest.err
create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-ccw-bootindex.xml
create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-ccw.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-ccw.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/vhost-user-fs-ccw.xml
mode change 120000 => 100644 tests/qemuxmlconfdata/vhost-user-fs-hugepages.x86_64-latest.xml
--
2.44.0
6 months, 1 week