[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
6 months, 1 week
[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
6 months, 2 weeks
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
6 months, 2 weeks
[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
6 months, 2 weeks
[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
6 months, 2 weeks
[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
6 months, 2 weeks
[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
6 months, 2 weeks
[PATCH 0/2] qemu: Fix migration with custom XML
by Jiri Denemark
Jiri Denemark (2):
qemu: Fix migration with custom XML
NEWS: Mention migration bug with custom XML
NEWS.rst | 8 ++++++++
src/qemu/qemu_domain.c | 38 +++++++++++++++++++++-----------------
src/qemu/qemu_process.c | 14 ++------------
3 files changed, 31 insertions(+), 29 deletions(-)
--
2.44.0
6 months, 2 weeks
[PATCH] network: ensure nparams is non-negative
by Daniel P. Berrangé
The typed parameter array must be either 0, or a positive
number.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/libvirt-network.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libvirt-network.c b/src/libvirt-network.c
index ef17a8a04d..e467716b6a 100644
--- a/src/libvirt-network.c
+++ b/src/libvirt-network.c
@@ -1577,6 +1577,8 @@ virNetworkPortGetParameters(virNetworkPortPtr port,
virCheckNetworkPortReturn(port, -1);
conn = port->net->conn;
+ virCheckNonNegativeArgGoto(*nparams, error);
+
if (conn->networkDriver && conn->networkDriver->networkPortGetParameters) {
int ret;
ret = conn->networkDriver->networkPortGetParameters(port, params, nparams, flags);
--
2.43.0
6 months, 2 weeks
[PATCH] qemu: Deliver shutoff reason with qemu hooks
by Sun Feng
For abnormal shutoff reasons, we can start guest again with qemu hooks.
Signed-off-by: Sun Feng <loyou85(a)gmail.com>
---
docs/hooks.rst | 3 ++-
src/qemu/qemu_process.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/docs/hooks.rst b/docs/hooks.rst
index 1dbc492bd4..45856e4ca4 100644
--- a/docs/hooks.rst
+++ b/docs/hooks.rst
@@ -204,7 +204,8 @@ operation. There is no specific operation to indicate a "restart" is occurring.
- When a QEMU guest is stopped, the qemu hook script is called in two
locations, to match the startup. First, :since:`since 0.8.0`, the hook is
- called before libvirt restores any labels:
+ called before libvirt restores any labels, :since:`since 9.10.0`, shutoff
+ reason is delivered with **extra argument**:
::
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index e4bcb628cf..c42f5c9139 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -8564,7 +8564,8 @@ void qemuProcessStop(virQEMUDriver *driver,
/* we can't stop the operation even if the script raised an error */
ignore_value(virHookCall(VIR_HOOK_DRIVER_QEMU, vm->def->name,
VIR_HOOK_QEMU_OP_STOPPED, VIR_HOOK_SUBOP_END,
- NULL, xml, NULL));
+ virDomainShutoffReasonTypeToString(reason),
+ xml, NULL));
}
/* Reset Security Labels unless caller don't want us to */
--
2.34.1
6 months, 2 weeks