[libvirt PATCH 00/11] improve and cleanup internal snapshot revert
by Pavel Hrdina
This fixes few issues with reverting internal snapshot where the VM was
modified and our compatibility check code failed to detect it, for
example changing one of the VM disks.
It also cleanups the code significantly as a preparation for other
cleanups and future external snapshot implementation.
Pavel Hrdina (11):
qemu_snapshot: revert: always error out if VM XML is missing
qemu_snapshot: revert: always restart QEMU process for running VM
qemu_snapshot: revert: drop unused loadvm code
qemu_snapshot: revert: fix emitting events
qemu_snapshot: revert: drop error that QEMU process must be restarted
test: snapshot revert: always error out if VM XML is missing
test: snapshot revert: always emulate VM process stop
test: snapshot revert: drop unused code
test: snapshot revert: fix emitting events
test: snapshot revert: drop error the VM must be restarted
domain_snapshot: update virDomainRevertToSnapshot description
src/libvirt-domain-snapshot.c | 5 +
src/qemu/qemu_snapshot.c | 244 +++++++++-------------------------
src/test/test_driver.c | 121 ++++-------------
3 files changed, 93 insertions(+), 277 deletions(-)
--
2.31.1
2 years, 12 months
[PATCH v6 0/4] Dirty Ring support (Libvirt)
by huangy81@chinatelecom.cn
From: "Hyman Huang(黄勇)" <huangy81(a)chinatelecom.cn>
Ping for this series.
I still keep thinking the dirty ring feature is something good to
have for libvirt.
qemu-6.1 has supported dirty ring feature and followed up with the
commit 0e21bf24 "support dirtyrate at the granualrity of vcpu",
which is a typical usage scenario of dirty ring. another usage
scenario may be the implementation of per-vcpu auto-converge during
live migration which is already being reviewed. so we can make full
use of dirty ring feature if libvirt supports. and any corrections
and comments about this series would be very appreciated.
Please review, Thanks!
Hyman
v6
- rebase on master
v5,v4: blank, just make v6 be the the latest version.
v3
- rebase master and fix the confilict when apply
"conf: introduce dirty_ring_size in struct "_virDomainDef" to current
master.
v2
- split patchset into 4 patches
- leave out the tcg case when building commandline.
- handle the VIR_DOMAIN_KVM_DIRTY_RING case independently in ,
virDomainFeatureDefParse and virDomainDefFeaturesCheckABIStability,
do not integrate it with other cases...
- add dirty ring size check in virDomainDefFeaturesCheckABIStability
- modify zero checks on integers of dirty ring size in a explicit way.
- set the default value of dirty ring size in a post-parser callback.
- check the absence of kvm_feature in a explicit way.
- code clean of virTristateSwitchTypeToString function.
this version's modification base on Peter's advices mostly, thanks
a lot, please review !
v1
since qemu has introduced a dirty ring feature in 6.1.0, may be it's
the right time to introduce dirty ring in libvirt meanwhile.
this patch add feature named 'dirty-ring', which enable dirty ring
feature when starting vm. to try this out, three things has done
in this patchset:
- introduce QEMU_CAPS_ACCEL so the the libvirt can use it to select
the right option when specifying the accelerator type.
- switch the option "-machine accel=xxx" to "-accel xxx" when specifying
accelerator type once libvirt build QEMU command line, so that
dirty-ring-size property can be passed to qemu when start vm.
- introduce dirty_ring_size to hold the ring size configured by user
and pass dirty_ring_size when building qemu commandline if dirty
ring feature enabled.
though dirty ring is per-cpu logically, the size of dirty ring is
registered by 'struct kvm' in QEMU. so we would like to place the
dirty_ring_size as a property of vm in Libvirt as the QEMU do.
the dirty ring feature is disabled by default, and if enabled, the
default value of ring size if 4096 if size not configured.
for more details about dirty ring and "-accel" option, please refer to:
https://lore.kernel.org/qemu-devel/20210108165050.406906-10-peterx@redhat...
https://lore.kernel.org/qemu-devel/3aa73987-40e8-3619-0723-9f17f73850bd@r...
please review, Thanks!
Best Regards !
Hyman Huang(黄勇) (4):
qemu_capabilities: introduce QEMU_CAPS_ACCEL
qemu_command: switch accelerator option to new style
conf: introduce dirty_ring_size field
qemu: support dirty ring feature
docs/formatdomain.rst | 18 +++--
docs/schemas/domaincommon.rng | 10 +++
src/conf/domain_conf.c | 76 ++++++++++++++++++-
src/conf/domain_conf.h | 4 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 40 +++++++++-
.../caps_2.11.0.s390x.xml | 1 +
.../caps_2.11.0.x86_64.xml | 1 +
.../caps_2.12.0.aarch64.xml | 1 +
.../caps_2.12.0.ppc64.xml | 1 +
.../caps_2.12.0.s390x.xml | 1 +
.../caps_2.12.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
.../caps_3.0.0.riscv32.xml | 1 +
.../caps_3.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
.../caps_3.0.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
.../caps_3.1.0.x86_64.xml | 1 +
.../caps_4.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
.../caps_4.0.0.riscv32.xml | 1 +
.../caps_4.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
.../caps_4.0.0.x86_64.xml | 1 +
.../caps_4.1.0.x86_64.xml | 1 +
.../caps_4.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 +
.../caps_4.2.0.x86_64.xml | 1 +
.../caps_5.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
.../caps_5.0.0.riscv64.xml | 1 +
.../caps_5.0.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 +
.../caps_5.1.0.x86_64.xml | 1 +
.../caps_5.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 +
.../caps_5.2.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 +
.../caps_5.2.0.x86_64.xml | 1 +
.../caps_6.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 +
.../caps_6.0.0.x86_64.xml | 1 +
.../caps_6.1.0.x86_64.xml | 1 +
.../caps_6.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 +
.../caps_6.2.0.x86_64.xml | 1 +
...fault-cpu-kvm-virt-4.2.aarch64-latest.args | 3 +-
.../aarch64-features-sve.aarch64-latest.args | 3 +-
.../channel-unix-guestfwd.x86_64-latest.args | 3 +-
.../clock-timer-armvtimer.aarch64-latest.args | 3 +-
.../console-virtio-unix.x86_64-latest.args | 3 +-
...u-Icelake-Server-pconfig.x86_64-3.1.0.args | 3 +-
...-Icelake-Server-pconfig.x86_64-latest.args | 3 +-
.../cpu-host-model.x86_64-2.11.0.args | 3 +-
.../cpu-host-model.x86_64-2.12.0.args | 3 +-
.../cpu-host-model.x86_64-3.0.0.args | 3 +-
.../cpu-host-model.x86_64-3.1.0.args | 3 +-
.../cpu-host-model.x86_64-4.0.0.args | 3 +-
.../cpu-host-model.x86_64-4.1.0.args | 3 +-
.../cpu-host-model.x86_64-4.2.0.args | 3 +-
.../cpu-host-model.x86_64-5.0.0.args | 3 +-
.../cpu-host-model.x86_64-5.1.0.args | 3 +-
.../cpu-host-model.x86_64-5.2.0.args | 3 +-
.../cpu-host-model.x86_64-6.0.0.args | 3 +-
.../cpu-host-model.x86_64-6.1.0.args | 3 +-
.../cpu-host-model.x86_64-latest.args | 3 +-
.../cpu-tsc-frequency.x86_64-4.0.0.args | 3 +-
...ult-video-type-aarch64.aarch64-latest.args | 3 +-
...default-video-type-ppc64.ppc64-latest.args | 3 +-
...default-video-type-s390x.s390x-latest.args | 3 +-
.../disk-cdrom-network.x86_64-2.12.0.args | 3 +-
.../disk-cdrom-network.x86_64-latest.args | 3 +-
.../disk-network-http.x86_64-latest.args | 3 +-
.../disk-serial.x86_64-latest.args | 3 +-
.../graphics-spice-timeout.x86_64-latest.args | 3 +-
.../hugepages-memaccess3.x86_64-latest.args | 3 +-
.../intel-iommu-aw-bits.x86_64-latest.args | 3 +-
...ntel-iommu-caching-mode.x86_64-latest.args | 3 +-
...ntel-iommu-device-iotlb.x86_64-latest.args | 3 +-
.../intel-iommu-eim.x86_64-latest.args | 3 +-
.../launch-security-s390-pv.s390x-latest.args | 3 +-
...v-missing-platform-info.x86_64-2.12.0.args | 3 +-
.../launch-security-sev.x86_64-2.12.0.args | 3 +-
.../launch-security-sev.x86_64-6.0.0.args | 3 +-
...memory-default-hugepage.x86_64-latest.args | 3 +-
.../memfd-memory-numa.x86_64-latest.args | 3 +-
...mory-hotplug-virtio-mem.x86_64-latest.args | 3 +-
...mory-hotplug-virtio-pmem.x86_64-5.2.0.args | 3 +-
...ory-hotplug-virtio-pmem.x86_64-latest.args | 3 +-
.../os-firmware-bios.x86_64-latest.args | 3 +-
...re-efi-no-enrolled-keys.x86_64-latest.args | 3 +-
...os-firmware-efi-secboot.x86_64-latest.args | 3 +-
.../os-firmware-efi.x86_64-latest.args | 3 +-
.../parallel-unix-chardev.x86_64-latest.args | 3 +-
...ault-cpu-kvm-pseries-2.7.ppc64-latest.args | 3 +-
...ault-cpu-kvm-pseries-3.1.ppc64-latest.args | 3 +-
...ault-cpu-kvm-pseries-4.2.ppc64-latest.args | 3 +-
...t-cpu-kvm-ccw-virtio-2.7.s390x-latest.args | 3 +-
...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 3 +-
...rtcard-passthrough-unix.x86_64-latest.args | 3 +-
.../usb-redir-unix.x86_64-latest.args | 3 +-
...vhost-user-fs-fd-memory.x86_64-latest.args | 3 +-
.../virtio-rng-builtin.x86_64-5.2.0.args | 3 +-
.../virtio-rng-builtin.x86_64-latest.args | 3 +-
.../virtio-rng-egd-unix.x86_64-5.2.0.args | 3 +-
.../virtio-rng-egd-unix.x86_64-latest.args | 3 +-
...-default-cpu-kvm-pc-4.2.x86_64-latest.args | 3 +-
...default-cpu-kvm-q35-4.2.x86_64-latest.args | 3 +-
111 files changed, 307 insertions(+), 72 deletions(-)
--
2.27.0
3 years
[libvirt PATCH 00/13] cgroup and thread management in ch driver.
by Praveen K Paladugu
This patchset adds support for cgroup management of ch threads. This version
correctly manages cgroups for vcpu and emulator threads created by ch. cgroup
management for iothreads is not yet supported.
Along with cgroup management, this patchset also enables support for pinning
vcpu and emulator threads to selected host cpus.
Praveen K Paladugu (2):
ch_process: Setup emulator and iothread settings
ch_driver: emulator threadinfo & pinning callbacks
Vineeth Pillai (11):
util: Helper functions to get process info
ch: Explicitly link to virt_util_lib
ch_domain: add virCHDomainGetMonitor helper method
ch_domain: add methods to manage private vcpu data
ch_driver,ch_domain: vcpu info getter callbacks
ch_driver: domainGetVcpuPinInfo and nodeGetCPUMap
ch_monitor: Get nicindexes in prep for cgroup mgmt
ch_cgroup: methods for cgroup mgmt in ch driver
ch_driver,ch_domain: vcpupin callback in ch driver
ch_driver: enable typed param string for numatune
ch_driver: add numatune callbacks for CH driver
po/POTFILES.in | 1 +
src/ch/ch_cgroup.c | 457 ++++++++++++++++++++++++
src/ch/ch_cgroup.h | 45 +++
src/ch/ch_conf.c | 2 +
src/ch/ch_conf.h | 9 +-
src/ch/ch_domain.c | 170 ++++++++-
src/ch/ch_domain.h | 32 +-
src/ch/ch_driver.c | 810 +++++++++++++++++++++++++++++++++++++++++-
src/ch/ch_monitor.c | 254 ++++++++++++-
src/ch/ch_monitor.h | 60 +++-
src/ch/ch_process.c | 368 ++++++++++++++++++-
src/ch/ch_process.h | 3 +
src/ch/meson.build | 6 +
src/util/virprocess.c | 136 +++++++
src/util/virprocess.h | 5 +
15 files changed, 2329 insertions(+), 29 deletions(-)
create mode 100644 src/ch/ch_cgroup.c
create mode 100644 src/ch/ch_cgroup.h
--
2.27.0
3 years
[libvirt PATCH] util: fix various ATTRIBUTE_NONNULL calls
by Pavel Hrdina
Git bisect took me to commit where incorrect usage of ATTRIBUTE_NONNULL
was introduced and caused coverity scan to fail. This patch fixes the
issue where the index starts from 1 and not 0 and two other different
cases.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/util/viralloc.h | 2 +-
src/util/virnetdevopenvswitch.h | 2 +-
src/util/virxml.h | 18 +++++++++---------
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/util/viralloc.h b/src/util/viralloc.h
index 3a09af65c5..fe4ecb6620 100644
--- a/src/util/viralloc.h
+++ b/src/util/viralloc.h
@@ -53,7 +53,7 @@ void virAppendElement(void *ptrptr,
void *newelem,
bool clearOriginal,
bool inPlace)
- ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
int virDeleteElementsN(void *ptrptr, size_t size, size_t at, size_t *countptr,
size_t toremove, bool inPlace)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitch.h
index 4478f2bb37..e275af59df 100644
--- a/src/util/virnetdevopenvswitch.h
+++ b/src/util/virnetdevopenvswitch.h
@@ -82,7 +82,7 @@ int virNetDevOpenvswitchInterfaceClearQos(const char *ifname,
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevOpenvswitchInterfaceClearRxQos(const char *ifname)
-ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
+ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevOpenvswitchInterfaceClearTxQos(const char *ifname,
const unsigned char *vmid)
diff --git a/src/util/virxml.h b/src/util/virxml.h
index 06fb7aebd8..5e42fc3591 100644
--- a/src/util/virxml.h
+++ b/src/util/virxml.h
@@ -109,14 +109,14 @@ virXMLPropTristateBool(xmlNodePtr node,
const char *name,
virXMLPropFlags flags,
virTristateBool *result)
- ATTRIBUTE_NONNULL(0) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4);
int
virXMLPropTristateSwitch(xmlNodePtr node,
const char *name,
virXMLPropFlags flags,
virTristateSwitch *result)
- ATTRIBUTE_NONNULL(0) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4);
int
virXMLPropInt(xmlNodePtr node,
@@ -125,7 +125,7 @@ virXMLPropInt(xmlNodePtr node,
virXMLPropFlags flags,
int *result,
int defaultResult)
- ATTRIBUTE_NONNULL(0) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(5);
int
virXMLPropUInt(xmlNodePtr node,
@@ -133,7 +133,7 @@ virXMLPropUInt(xmlNodePtr node,
int base,
virXMLPropFlags flags,
unsigned int *result)
- ATTRIBUTE_NONNULL(0) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(5);
int
virXMLPropULongLong(xmlNodePtr node,
@@ -141,7 +141,7 @@ virXMLPropULongLong(xmlNodePtr node,
int base,
virXMLPropFlags flags,
unsigned long long *result)
- ATTRIBUTE_NONNULL(0) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(5);
int
virXMLPropEnum(xmlNodePtr node,
@@ -149,8 +149,8 @@ virXMLPropEnum(xmlNodePtr node,
int (*strToInt)(const char*),
virXMLPropFlags flags,
unsigned int *result)
- ATTRIBUTE_NONNULL(0) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
- ATTRIBUTE_NONNULL(4);
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
+ ATTRIBUTE_NONNULL(5);
int
virXMLPropEnumDefault(xmlNodePtr node,
@@ -159,8 +159,8 @@ virXMLPropEnumDefault(xmlNodePtr node,
virXMLPropFlags flags,
unsigned int *result,
unsigned int defaultResult)
- ATTRIBUTE_NONNULL(0) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
- ATTRIBUTE_NONNULL(4);
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
+ ATTRIBUTE_NONNULL(5);
/* Internal function; prefer the macros below. */
--
2.31.1
3 years
[PATCH 0/2] Fix /proc/*/stat parsing
by Martin Kletzander
While working on some polkit stuff I found out that we are inconsistent with the
way we parse /proc/*/stat files, so I added a new helper instead along with some
tests. Unfortunately using it for the thing I wanted is not really viable in
the end, so it "violates" the Rule of three, but at least it does something
correctly.
Martin Kletzander (2):
util: Add virProcessGetStat
Use virProcessGetStat
src/libvirt_linux.syms | 3 +
src/qemu/qemu_driver.c | 29 ++----
src/util/virprocess.c | 126 +++++++++++++++++---------
src/util/virprocess.h | 4 +
tests/meson.build | 1 +
tests/virprocessstatdata/complex/stat | 2 +
tests/virprocessstatdata/simple/stat | 1 +
tests/virprocessstattest.c | 84 +++++++++++++++++
8 files changed, 185 insertions(+), 65 deletions(-)
create mode 100644 tests/virprocessstatdata/complex/stat
create mode 100644 tests/virprocessstatdata/simple/stat
create mode 100644 tests/virprocessstattest.c
--
2.34.0
3 years
[PATCH v2 0/3] chardev handling cleanups (chardev refactors part 1)
by Peter Krempa
All patches except for 6/16 are now pushed.
Pathces 1 and 2 in this series are new, split of 6/16 as requested in
the review.
Patch 3 is the rebase of 6/16 on top of the split out stuff and fix to
the [B] point in the original review.
Peter Krempa (3):
qemuMonitorJSONAttachCharDevGetProps: Rename 'backend_type' and 'data'
qemuMonitorJSONBuildChrChardevReconnect: Unify with
qemuBuildChrChardevReconnectStr
qemuMonitorJSONAttachCharDevGetProps: Modernize construction of JSON
objects
src/qemu/qemu_monitor_json.c | 192 +++++++++++++++++------------------
1 file changed, 96 insertions(+), 96 deletions(-)
--
2.31.1
3 years
[PATCH] qemu: Fix the check of AMD secure guest support
by Vasiliy Ulyanov
The content of /sys/module/kvm_amd/parameters/sev may vary depending on
the kernel version. Check also for 'Y' and 'y' in addition to '1' to
cover several possible variants. The fix is similar to the one
introduced in commit 3f9c1a4bb841.
Signed-off-by: Vasiliy Ulyanov <vulyanov(a)suse.de>
---
src/qemu/qemu_capabilities.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 67fae46a34..b864f4d7df 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4681,7 +4681,7 @@ virQEMUCapsKVMSupportsSecureGuestAMD(void)
if (virFileReadValueString(&modValue, "/sys/module/kvm_amd/parameters/sev") < 0)
return false;
- if (modValue[0] != '1')
+ if (modValue[0] != '1' && modValue[0] != 'Y' && modValue[0] != 'y')
return false;
if (virFileExists(QEMU_DEV_SEV))
--
2.33.1
3 years
[PATCH v2 0/8] some cleanups around CPU related code
by Daniel Henrique Barboza
Changes from v1, all suggested by Jano:
- helper functions were added to virQEMUCapsLoadCache() to eliminate the
cleanup label without mixing automatic and manual freeing
- create extra strings with different scopes in
virQEMUCapsLoadHostCPUModelInfo() to avoid mixing automatic and manual
freeing
- v1 link: https://listman.redhat.com/archives/libvir-list/2021-November/msg00497.html
Daniel Henrique Barboza (8):
qemu_capabilities.c: add virQEMUCapsParseFlags()
qemu_capabilities.c: add virQEMUCapsParseGIC()
qemu_capabilities.c: del 'nodes' var from virQEMUCapsLoadCache()
qemu_capabilities.c: add virQEMUCapsValidateEmulator()
qemu_capabilities.c: add virQEMUCapsValidateArch()
qemu_capabilities.c: remove cleanup label from virQEMUCapsLoadCache()
cpu_ppc64.c: remove 'guest' param from ppc64Compute()
qemu_capabilities.c: del 'cleanup' label in
virQEMUCapsLoadHostCPUModelInfo()
src/cpu/cpu_ppc64.c | 26 +--
src/qemu/qemu_capabilities.c | 356 +++++++++++++++++++----------------
2 files changed, 198 insertions(+), 184 deletions(-)
--
2.31.1
3 years
[PATCH 00/16] chardev handling cleanups (chardev refactors part 1)
by Peter Krempa
This is a collection of cleanup patches from my ever-growing branch
refactoring handling of chardevs in the qemu driver.
Peter Krempa (16):
qemuBuildCommandLine: Properly check return value of
qemuBuildShmemCommandLine
qemu: hotplug: Add wrapper for qemuMonitorAttachCharDev
qemuMonitorJSONAddDeviceProps: Simplify construction of the command
qemuMonitorJSONAttachCharDevCommand: Format only the properties
qemuMonitorJSONAttachCharDevGetProps: Simplify handling of unsupported
types
qemuMonitorJSONAttachCharDevGetProps: Modernize construction of JSON
objects
qemu: command: Rename qemuBuildHostNetStr -> qemuBuildHostNetProps
qemuBuildChrChardevStr: Use proper type for the switch statement
conf: Convert 'chr' in virDomainShmemDef to proper pointer
qemuDomainAddChardevTLSObjects: Refactor cleanup
qemuDomainEnsurePCIAddress: Don't pass virQEMUDriver explicitly
qemuDomainAttachChrDeviceAssignAddr: Simplify return value handling
qemuDomainAttachChrDevice: Drop 'dev' variable
qemuBuildStorageSourceAttachPrepare(Drive|Chardev): Unexport
conf: Properly instantiate virDomainChrSourceDef in virDomainTPMDef
qemuxml2argvtest: Fix type for faked chardev backing a TPM
src/conf/domain_audit.c | 6 +-
src/conf/domain_conf.c | 31 +++--
src/conf/domain_conf.h | 6 +-
src/qemu/qemu_cgroup.c | 2 +-
src/qemu/qemu_command.c | 40 +++---
src/qemu/qemu_command.h | 22 ++-
src/qemu/qemu_domain.c | 6 +-
src/qemu/qemu_domain_address.c | 13 +-
src/qemu/qemu_domain_address.h | 8 +-
src/qemu/qemu_hotplug.c | 101 +++++++-------
src/qemu/qemu_monitor_json.c | 236 ++++++++++++++++----------------
src/qemu/qemu_namespace.c | 2 +-
src/qemu/qemu_tpm.c | 10 +-
src/security/security_dac.c | 6 +-
src/security/security_selinux.c | 6 +-
tests/qemuxml2argvtest.c | 6 +-
16 files changed, 250 insertions(+), 251 deletions(-)
--
2.31.1
3 years
[libvirt PATCH] conf: match by network alias only if aliases are assigned
by Ján Tomko
Commit 114e3b423210d316b3326816fd2c33335b1167fe added matching by
aliases for interfaces with same MAC address.
( https://bugzilla.redhat.com/show_bug.cgi?id=1926190 )
However, unless the domain is using user aliases (prefixed ua-),
there are no aliases in the persistent definition.
Only match by MAC/PCI/other addresses in that case, to fix update-device
with --persistent flag (AFFECT_LIVE | AFFECT_CONFIG).
https://bugzilla.redhat.com/show_bug.cgi?id=2024098
Fixes: 114e3b423210d316b3326816fd2c33335b1167fe
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/conf/domain_conf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index da0c64b460..0d7489094b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -15763,8 +15763,8 @@ virDomainNetFindIdx(virDomainDef *def, virDomainNetDef *net)
&net->info.addr.ccw))
continue;
- if (net->info.alias &&
- STRNEQ_NULLABLE(def->nets[i]->info.alias, net->info.alias)) {
+ if (net->info.alias && def->nets[i]->info.alias &&
+ STRNEQ(def->nets[i]->info.alias, net->info.alias)) {
continue;
}
--
2.31.1
3 years