[PATCH 0/8] Enable virtio-mem-ccw
by Michal Privoznik
To test these you'll need:
QEMU: v9.2.0-492-gaa910c20ec
Kernel: v6.13-rc1~206^2~46^2~3
or newer.
Michal Prívozník (8):
qemu: Do NOT autoadd NUMA node for s390
qemu_command: Use qemuBuildVirtioDevProps() to build cmd line for
virtio-mem and virtio-pmem
qemuxmlconftest: Introduce memory-hotplug-virtio-mem-s390x.xml
qemu_caps: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW
qemu: Validate virtio-mem-ccw
qemu: Allow virtio-mem on CCW
qemuxmlconftest: Update memory-hotplug-virtio-mem-s390x.xml
NEWS: Document virtio-mem-ccw
NEWS.rst | 5 ++
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 28 +++++++--
src/qemu/qemu_domain.c | 6 +-
src/qemu/qemu_postparse.c | 1 +
src/qemu/qemu_validate.c | 35 ++++++++++-
.../caps_10.0.0_s390x.xml | 1 +
...hotplug-virtio-mem-s390x.s390x-latest.args | 39 ++++++++++++
...-hotplug-virtio-mem-s390x.s390x-latest.xml | 60 +++++++++++++++++++
.../memory-hotplug-virtio-mem-s390x.xml | 57 ++++++++++++++++++
tests/qemuxmlconftest.c | 1 +
12 files changed, 227 insertions(+), 9 deletions(-)
create mode 100644 tests/qemuxmlconfdata/memory-hotplug-virtio-mem-s390x.s390x-latest.args
create mode 100644 tests/qemuxmlconfdata/memory-hotplug-virtio-mem-s390x.s390x-latest.xml
create mode 100644 tests/qemuxmlconfdata/memory-hotplug-virtio-mem-s390x.xml
--
2.45.2
2 weeks
[PATCH 0/5] qemu: IO error reporting fixes and improvements (part 1?)
by Peter Krempa
This series:
- fixed bug in lookup of devices for the IO error which made them
useless (2/5)
- adds framework to return error messages (3/5)
- implements the passthrough of errors (4/5)
- logs the I/O errors in the VM log (5/5)
Peter Krempa (5):
qemuProcessHandleIOError: Refactor to extract 'priv' instead of
'driver'
qemuProcessHandleIOError: Fix logic for lookup of disk
API: Document more possibilities for @reason field of
VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON event
qemu: monitor: Plumb in disk IO error message passthrough to
VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
qemuProcessHandleIOError: Log IO errors in the VM log file
include/libvirt/libvirt-domain.h | 8 +++--
src/qemu/qemu_monitor_json.c | 19 ++++++++++--
src/qemu/qemu_process.c | 51 ++++++++++++++++++--------------
3 files changed, 51 insertions(+), 27 deletions(-)
--
2.48.1
2 weeks
[PATCH V2 00/20] qemu: support mapped-ram+directio+mulitfd
by Jim Fehlig
I'm claiming this to be V2 of a series to support QEMU's mapped-ram stream
format [1] and migration capability, even though the approach to control
the feature is different than V1. To control mapped-ram in V1, I bumped
the save format version and added a 'features' field to the save image
header. In V2, I use the save_image_format setting in qemu.conf, extending
it with a 'sparse' option to enable mapped-ram. IMO, the latter is nicer
approach that fits better with existing save options.
V2 leaves the "raw" save image format as default. save_image_format must
be set to "sparse" to enable use of mapped-ram. Like V1, this version of
the series also includes patches that leverage mapped-ram to add support
for parallel save/restore.
In one of the previous threads on this topic we discussed per-VM control of
save image format by adding a 'format' parameter to virDomainSaveParams.
I can do that as a followup series if folks agree its useful.
Changes in V2
* Use save_image_format setting to control mapped-ram instead of
introducing a new field to the header and bumping the save image version
* Rename save parameter parallel-connections to parallel-channels
* Address other minor comments from V1
[1] https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/M...
Claudio Fontana (3):
include: Define constants for parallel save/restore
tools: add parallel parameter to virsh save command
tools: add parallel parameter to virsh restore command
Jim Fehlig (17):
lib: virDomain{Save,Restore}Params: Ensure absolute path
qemu_fd: Add function to retrieve fdset ID
qemu: Add function to check capability in migration params
qemu: Add function to get bool value from migration params
qemu: Add mapped-ram migration capability
qemu: Add function to get migration params for save
qemu_saveimage: add "sparse" to supported save image formats
qemu: Add helper function for creating save image fd
qemu: Move declaration of virQEMUSaveFormat to header file
qemu: Add support for mapped-ram on save
qemu: Decompose qemuSaveImageOpen
qemu: Move creation of qemuProcessIncomingDef struct
qemu: Apply migration parameters in qemuMigrationDstRun
qemu: Add support for mapped-ram on restore
qemu: Support O_DIRECT with mapped-ram on save
qemu: Support O_DIRECT with mapped-ram on restore
qemu: Add support for parallel save and restore
docs/manpages/virsh.rst | 21 ++-
include/libvirt/libvirt-domain.h | 11 ++
src/libvirt-domain.c | 95 +++++++++++---
src/qemu/qemu.conf.in | 9 +-
src/qemu/qemu_driver.c | 108 +++++++++++-----
src/qemu/qemu_fd.c | 18 +++
src/qemu/qemu_fd.h | 3 +
src/qemu/qemu_migration.c | 194 +++++++++++++++++++---------
src/qemu/qemu_migration.h | 10 +-
src/qemu/qemu_migration_params.c | 92 ++++++++++++++
src/qemu/qemu_migration_params.h | 17 +++
src/qemu/qemu_monitor.c | 40 ++++++
src/qemu/qemu_monitor.h | 5 +
src/qemu/qemu_process.c | 117 ++++++++++++-----
src/qemu/qemu_process.h | 19 ++-
src/qemu/qemu_saveimage.c | 211 ++++++++++++++++++-------------
src/qemu/qemu_saveimage.h | 39 +++++-
src/qemu/qemu_snapshot.c | 29 +++--
tools/virsh-domain.c | 79 ++++++++++--
19 files changed, 856 insertions(+), 261 deletions(-)
--
2.43.0
2 weeks, 3 days
[PATCH v5 0/5] ch: handle events from cloud-hypervisor
by Purna Pavan Chandra Aekkaladevi
changes from v4->v5:
* Incase of invalid events, exit VirCHEventHandler
* Open eventmonitor fifo (Reader end) in virCHMonitorNew itself.
This way, we can clean exit incase open fails for some reason.
changes from v3->v4:
* Don't abort; instead kill the VM and exit
* use g_clear_pointer along with g_free
* Fix possible memory leak
changes from v2->v3:
* Remove patch 'utils: Implement virFileIsNamedPipe' as it is no more needed.
* Remove the eventmonitorpath only if it exists
* Added domain name as a prefix to logs from ch_events.c. This will make
debugging easier.
* Simplified event parsing logic by reserving a byte for null char.
changes from v1->v2:
* Rebase on latest master
* Use /* */ for comments
* Remove fifo file if already exists
* Address other comments from Praveen Paladugu
cloud-hypervisor raises various events, including VM lifecylce operations
such as boot, shutdown, pause, resume, etc. Libvirt will now read these
events and take the necessary actions, such as correctly updating the
domain state. A FIFO file is passed to `--event-monitor` option of
cloud-hypervisor. Libvirt creates a new thread that acts as the reader
of the fifo file and continuously monitors for new events. Currently,
shutdown events are handled by updating the domain state appropriately.
Purna Pavan Chandra Aekkaladevi (5):
ch: pass --event-monitor option to cloud-hypervisor
ch: start a new thread for handling ch events
ch: events: Read and parse cloud-hypervisor events
ch: events: facilitate lifecycle events handling
NEWS: Mention event handling support in ch driver
NEWS.rst | 7 +
po/POTFILES | 1 +
src/ch/ch_events.c | 312 ++++++++++++++++++++++++++++++++++++++++++++
src/ch/ch_events.h | 54 ++++++++
src/ch/ch_monitor.c | 76 ++++++++++-
src/ch/ch_monitor.h | 12 ++
src/ch/meson.build | 2 +
7 files changed, 458 insertions(+), 6 deletions(-)
create mode 100644 src/ch/ch_events.c
create mode 100644 src/ch/ch_events.h
--
2.34.1
2 weeks, 3 days
[PATCH] qemu: Allow virDomainBlockJobSetSpeed during migration
by Jiri Denemark
When a migration with non-shared storage is started with
VIR_MIGRATE_PARAM_BANDWIDTH set, it will be applied to both memory
migration and each block job started for storage migration. Once the
migration is running virDomainMigrateSetMaxSpeed may be used to change
the bandwidth used by memory migration, but there was no way of changing
storage migration speed. Let's allow virDomainBlockJobSetSpeed during
migration to enable the missing functionality.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/conf/virdomainjob.h | 11 +++++++----
src/qemu/qemu_driver.c | 2 +-
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/conf/virdomainjob.h b/src/conf/virdomainjob.h
index 8b2dccd298..d8685cf236 100644
--- a/src/conf/virdomainjob.h
+++ b/src/conf/virdomainjob.h
@@ -37,10 +37,13 @@ typedef enum {
VIR_JOB_MODIFY, /* May change state */
VIR_JOB_ABORT, /* Abort current async job */
VIR_JOB_MIGRATION_OP, /* Operation influencing outgoing migration */
- VIR_JOB_MODIFY_MIGRATION_SAFE, /* Internal only job for event handlers which
- need to be processed even during migration.
- The code may only change state in a way
- that does not affect migration. */
+ VIR_JOB_MODIFY_MIGRATION_SAFE, /* Modify job that is safe to be run during
+ migration. The code may only change state
+ in a way that does not affect migration.
+ Used in event handlers which need to be
+ processed even during migration or for
+ setting block job speed when migrating
+ with non-shared storage. */
/* The following two items must always be the last items before JOB_LAST */
VIR_JOB_ASYNC, /* Asynchronous job */
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index d2eddbd9ae..a1fc61bae2 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -13982,7 +13982,7 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom,
if (virDomainBlockJobSetSpeedEnsureACL(dom->conn, vm->def) < 0)
goto cleanup;
- if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY) < 0)
+ if (virDomainObjBeginJob(vm, VIR_JOB_MODIFY_MIGRATION_SAFE) < 0)
goto cleanup;
if (virDomainObjCheckActive(vm) < 0)
--
2.48.1
2 weeks, 3 days
[PATCH] ch: implement domainInterfaceAddresses
by Praveen K Paladugu
From: Anirudh Rayabharam <anrayabh(a)linux.microsoft.com>
Implement domainInterfaceAddresses for the Cloud Hypervisor driver.
Support VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE and
VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP sources. Implementation is
similar to other drivers.
Signed-off-by: Anirudh Rayabharam <anrayabh(a)linux.microsoft.com>
Signed-off-by: Praveen K Paladugu <praveenkpaladugu(a)gmail.com>
---
src/ch/ch_driver.c | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c
index 6a8da5f356..d284524337 100644
--- a/src/ch/ch_driver.c
+++ b/src/ch/ch_driver.c
@@ -2298,6 +2298,47 @@ chConnectDomainEventDeregisterAny(virConnectPtr conn,
return 0;
}
+static int
+chDomainInterfaceAddresses(virDomain *dom,
+ virDomainInterfacePtr **ifaces,
+ unsigned int source,
+ unsigned int flags)
+{
+ virDomainObj *vm = NULL;
+ int ret = -1;
+
+ virCheckFlags(0, -1);
+
+ if (!(vm = virCHDomainObjFromDomain(dom)))
+ goto cleanup;
+
+ if (virDomainInterfaceAddressesEnsureACL(dom->conn, vm->def, source) < 0)
+ goto cleanup;
+
+ if (virDomainObjCheckActive(vm) < 0)
+ goto cleanup;
+
+ switch (source) {
+ case VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE:
+ ret = virDomainNetDHCPInterfaces(vm->def, ifaces);
+ break;
+
+ case VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP:
+ ret = virDomainNetARPInterfaces(vm->def, ifaces);
+ break;
+
+ default:
+ virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
+ _("Unsupported IP address data source %1$d"),
+ source);
+ break;
+ }
+
+ cleanup:
+ virDomainObjEndAPI(&vm);
+ return ret;
+}
+
/* Function Tables */
static virHypervisorDriver chHypervisorDriver = {
@@ -2316,6 +2357,7 @@ static virHypervisorDriver chHypervisorDriver = {
.domainCreateXML = chDomainCreateXML, /* 7.5.0 */
.domainCreate = chDomainCreate, /* 7.5.0 */
.domainCreateWithFlags = chDomainCreateWithFlags, /* 7.5.0 */
+ .domainInterfaceAddresses = chDomainInterfaceAddresses, /* 10.10.1 */
.domainShutdown = chDomainShutdown, /* 7.5.0 */
.domainShutdownFlags = chDomainShutdownFlags, /* 7.5.0 */
.domainReboot = chDomainReboot, /* 7.5.0 */
--
2.47.0
2 weeks, 3 days
[PATCH v2 0/3] qemu: Add support for avail-switchover-bandwidth migration parameter
by Jiri Denemark
See documentation in 1/3 for details.
Jiri Denemark (3):
Add a migration parameter for available bandwidth in switchover
virsh migrate: Add --available-switchover-bandwidth option
qemu: Add support for avail-switchover-bandwidth migration parameter
docs/manpages/virsh.rst | 12 ++++++++++++
include/libvirt/libvirt-domain.h | 18 ++++++++++++++++++
src/qemu/qemu_migration.h | 1 +
src/qemu/qemu_migration_params.c | 9 +++++++++
src/qemu/qemu_migration_params.h | 1 +
tools/virsh-domain.c | 13 +++++++++++++
6 files changed, 54 insertions(+)
--
2.48.1
2 weeks, 3 days
[PATCH 0/3] Unify handling of directories used for loadable modules
by Andrea Bolognani
This solves the same problem as 7a8c2319acf2 but in a different, more
generic fashion.
Andrea Bolognani (3):
meson: Unify handling of directories used for loadable modules
rpm: Add missing Requires
rpm: Unify handling of directories used for loadable modules
libvirt.spec.in | 7 ++++---
meson.build | 5 +++++
src/locking/meson.build | 6 ++----
src/meson.build | 13 +++++++++++--
src/storage/meson.build | 2 --
src/storage_file/meson.build | 2 --
6 files changed, 22 insertions(+), 13 deletions(-)
--
2.48.1
2 weeks, 3 days
[PATCH v3 0/4] conf,qemu: add AIA support for RISC-V 'virt'
by Daniel Henrique Barboza
Hi,
This version has changes in patch 2 proposed by Martin. An extra patch
was added to add my contact info in .mailmap, also suggested by Martin.
Changes from v2:
- patch 2:
- use VIR_DOMAIN_AIA_DEFAULT instead of VIR_DOMAIN_AIA_NONE in virDomainFeaturesDefParse()
- use VIR_DOMAIN_AIA_DEFAULT instead of VIR_TRISTATE_SWITCH_ABSENT in both checks in qemuValidateDomainDefFeatures()
- patch 4 (new):
- add my address info in .mailmap
- v2 link: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/EA...
Daniel Henrique Barboza (4):
qemu: add capability for RISC-V AIA feature
conf,qemu: implement RISC-V 'aia' virt domain feature
qemu: add RISC-V 'aia' command line
.mailmap: add my contact info
.mailmap | 2 +
docs/formatdomain.rst | 8 ++++
src/conf/domain_conf.c | 40 +++++++++++++++++++
src/conf/domain_conf.h | 12 ++++++
src/conf/schemas/domaincommon.rng | 15 +++++++
src/libvirt_private.syms | 2 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 5 +++
src/qemu/qemu_validate.c | 15 +++++++
.../caps_8.0.0_riscv64.xml | 1 +
.../caps_9.1.0_riscv64.xml | 1 +
...cv64-virt-features-aia.riscv64-latest.args | 31 ++++++++++++++
...scv64-virt-features-aia.riscv64-latest.xml | 1 +
.../riscv64-virt-features-aia.xml | 27 +++++++++++++
tests/qemuxmlconftest.c | 2 +
16 files changed, 165 insertions(+)
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-features-aia.riscv64-latest.args
create mode 120000 tests/qemuxmlconfdata/riscv64-virt-features-aia.riscv64-latest.xml
create mode 100644 tests/qemuxmlconfdata/riscv64-virt-features-aia.xml
--
2.48.1
2 weeks, 3 days
[PATCH 1/1] virsysinfo: fix RISC-V detection
by Heinrich Schuchardt
The correct compiler define to detect the RISC-V architecture is __riscv.
Fixes: b902cfece0db ("virsysinfo: Try reading DMI table")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt(a)canonical.com>
---
src/util/virsysinfo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c
index d9b2b5e89e..b7413c3bf5 100644
--- a/src/util/virsysinfo.c
+++ b/src/util/virsysinfo.c
@@ -1254,7 +1254,7 @@ virSysinfoRead(void)
(defined(__x86_64__) || \
defined(__i386__) || \
defined(__amd64__) || \
- defined(__riscv__) || \
+ defined(__riscv) || \
defined(__mips__) || \
defined(__loongarch__))
return virSysinfoReadDMI();
--
2.47.1
2 weeks, 4 days