[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
1 year
[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
1 year
[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
1 year
[PATCH 0/2] qemu: Substract isolcpus from all online affinity
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (2):
virhostcpu: Introduce virHostCPUGetIsolated()
qemu: Substract isolcpus from all online affinity
src/libvirt_private.syms | 1 +
src/qemu/qemu_process.c | 7 +++++++
src/util/virhostcpu.c | 21 +++++++++++++++++++++
src/util/virhostcpu.h | 1 +
4 files changed, 30 insertions(+)
--
2.43.2
1 year
[PATCH 00/10] qemu: Introduce shared_filesystems configuration option
by Andrea Bolognani
An alternative take on [1] based on review feedback.
The need to have something like this in the first place is driven by
KubeVirt (see [2] and [3]). A draft version of this series has been
integrated into KubeVirt and it has been confirmed that it was
effective in removing the need to use LD_PRELOAD hacks in the storage
provider.
CC'ing Stefan so he can have a look at the TPM part and shout if I've
gotten anything wrong :)
[1] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/MM...
[2] https://issues.redhat.com/browse/CNV-34322
[3] https://issues.redhat.com/browse/CNV-39370
Andrea Bolognani (10):
security: Fix alignment
security: Fix name for _virSecurityDACChardevCallbackData
security: Drop virSecurity(DAC|SELinux)RestoreImageLabelSingle()
security: Drop virSecurity(DAC|SELinux)SetImageLabelRelative()
qemu: Tweak augeas schema
qemu: Introduce shared_filesystems configuration option
qemu: Propagate shared_filesystems
utils: Use overrides in virFileIsSharedFS()
qemu: Always set labels for TPM state
NEWS: Document qemu shared_filesystems option
NEWS.rst | 7 +++
src/lxc/lxc_controller.c | 2 +-
src/lxc/lxc_driver.c | 2 +-
src/lxc/lxc_process.c | 4 +-
src/qemu/libvirtd_qemu.aug | 11 ++--
src/qemu/qemu.conf.in | 17 ++++++
src/qemu/qemu_conf.c | 17 ++++++
src/qemu/qemu_conf.h | 2 +
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_extdevice.c | 2 +-
src/qemu/qemu_migration.c | 12 ++--
src/qemu/qemu_security.c | 14 ++++-
src/qemu/qemu_tpm.c | 36 ++++++------
src/qemu/qemu_tpm.h | 8 ++-
src/qemu/test_libvirtd_qemu.aug.in | 5 ++
src/security/security_apparmor.c | 2 +
src/security/security_dac.c | 67 +++++++++-------------
src/security/security_driver.h | 4 ++
src/security/security_manager.c | 34 +++++++-----
src/security/security_manager.h | 20 ++++---
src/security/security_nop.c | 4 ++
src/security/security_selinux.c | 58 ++++++++-----------
src/security/security_stack.c | 16 ++++--
src/util/virfile.c | 89 +++++++++++++++++++++++++-----
src/util/virfile.h | 3 +-
tests/securityselinuxlabeltest.c | 2 +-
tests/virfiletest.c | 2 +-
27 files changed, 289 insertions(+), 153 deletions(-)
--
2.44.0
1 year
Plans for 10.3.0 release (freeze on Friday 26 Apr)
by Jiri Denemark
We are getting close to 10.3.0 release of libvirt. To aim for the
release on Thursday 02 May I suggest entering the freeze on Friday
26 Apr and tagging RC2 on Tuesday 30 Apr.
I hope this works for everyone.
Jirka
1 year
[RFC PATCH v1 00/15] node_dev_udev: use workerpool and improve nodedev events
by Marc Hartmayer
When an udev event occurs for a mediated device (mdev) the mdev config data
requires an update via mdevctl as the udev event does not contain all config
data. This update needs to occur immediate and to be finished before the libvirt
nodedev event is issued to keep the API usage reliable.
This patch series already contains the patches from a previous patch series
"[RFC PATCH v1 0/5] node_device_udev: small improvements" and has still some
TODO's included and is sent therefore as a RFC.
Boris Fiuczynski (3):
nodedev: fix mdev add udev event data handling
nodedev: immediate update of active config on udev add
nodedev: reset active config data on udev remove event
Marc Hartmayer (12):
node_device_udev: Set @def to NULL
node_device_udev: Remove the timeout if the data is disposed
node_device_udev: Test for mdevctlTimeout != -1
node_device_udev: Add comments about locking
node_device_udev: Take lock if `driver->privateData` is modified
node_device_udev: Add prefix `udev` for udev related data
node_device_udev: Inline `udevRemoveOneDevice`
node_device_udev: Use `stateShutdownPrepare` and `stateShutdownWait`
node_device_udev: Use a worker pool for processing the udev events
node_device_udev: Call `nodeDeviceUpdateMediatedDevices` directly
node_device_udev: Don't take `mdevctl` lock for querying `mdevctl
list`
node_device_udev: Make the code easier to read
src/node_device/node_device_driver.h | 5 +-
src/util/virmdev.h | 4 +
src/conf/node_device_conf.c | 10 +-
src/node_device/node_device_driver.c | 19 +-
src/node_device/node_device_udev.c | 435 ++++++++++++++++++---------
src/test/test_driver.c | 3 +-
src/util/virmdev.c | 20 ++
src/libvirt_private.syms | 2 +
8 files changed, 339 insertions(+), 159 deletions(-)
base-commit: 4b5cc57ed35dc24d11673dd3f04bfb8073c0340d
--
2.34.1
1 year
[PATCH v3 0/5] test: fix nodedev mdev XML regression
by Cole Robinson
The virt-manager test suite is busted with libvirt 10.1.0+ after
this commit:
commit e67bca23e4fe38a3491749f724b9edf743d0e916
Author: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
Date: Thu Feb 22 14:02:01 2024 +0100
nodedev: add an active config to mdev
See patch #5 for the full explanation. First 4 patches are nodedev
test driver improvements I hit when debugging this
v3:
really truly send to the correct list
v2:
Send to the correct mailing list
Fix version strings in test driver table
Cole Robinson (5):
test: Fix `virsh nodedev-list`
test: Implement virNodeDeviceIsActive
test: Implement virNodeDeviceIsPersistent
test: make nodedevs active by default
conf: nodedev: Fill active_config at XML parse time
src/conf/node_device_conf.c | 5 ++++-
src/test/test_driver.c | 35 ++++++++++++++++++++++++++++++++++-
tests/nodedevxml2xmltest.c | 15 ---------------
3 files changed, 38 insertions(+), 17 deletions(-)
--
2.44.0
1 year
[PATCH] libvirt_nss: Fix ERROR() macro
by Michal Privoznik
The purpose of ERROR() macro in our NSS module is to print error
message provided as arguments followed by error string
corresponding to errno. Historically, we've used strerror_r() for
that (please note, we want our NSS module to be free of libvirt
internal functions, or glib even - hence, g_strerror() is off the
table).
Now strerror_r() is documented as:
Returns ... a pointer to a string that the function stores in
buf, or a pointer to some (immutable) static string (in which
case buf is unused).
Therefore, we can't rely the string being stored in the buf and
really need to store the retval and print that instead.
While touching this area, decrease the ebuf size, since its
current size (1KiB) is triggering our stack limit (2KiB) in some
cases.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tools/nss/libvirt_nss.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/nss/libvirt_nss.h b/tools/nss/libvirt_nss.h
index 2bb313f329..5f356618f3 100644
--- a/tools/nss/libvirt_nss.h
+++ b/tools/nss/libvirt_nss.h
@@ -37,11 +37,11 @@
# define NULLSTR(s) ((s) ? (s) : "<null>")
# define ERROR(...) \
do { \
- char ebuf[1024]; \
- strerror_r(errno, ebuf, sizeof(ebuf)); \
+ char ebuf[512]; \
+ const char *errmsg = strerror_r(errno, ebuf, sizeof(ebuf)); \
fprintf(stderr, "ERROR %s:%d : ", __FUNCTION__, __LINE__); \
fprintf(stderr, __VA_ARGS__); \
- fprintf(stderr, " : %s\n", ebuf); \
+ fprintf(stderr, " : %s\n", errmsg); \
fprintf(stderr, "\n"); \
} while (0)
--
2.43.2
1 year
[PATCH v2 0/4] qemu: Fix migration with custom XML
by Jiri Denemark
Version 2:
- see patch 1/4 for more details
- added two cleanups
Jiri Denemark (4):
qemu: Fix migration with custom XML
NEWS: Mention migration bug with custom XML
qemu: Change return type of qemuDomainUpdateCPU to void
qemu: Change return type of qemuDomainFixupCPUs to void
NEWS.rst | 8 +++++++
src/qemu/qemu_domain.c | 51 ++++++++++++++++++++---------------------
src/qemu/qemu_domain.h | 4 ++--
src/qemu/qemu_process.c | 29 ++++++++---------------
4 files changed, 45 insertions(+), 47 deletions(-)
--
2.44.0
1 year