[PATCH 0/5] Add "support" for VMWare Distributed Switch
by Martin Kletzander
Previously (but still in this release) such interfaces were represented as dummy
ones, but hopefully we can properly represent them still in the same release.
Martin Kletzander (5):
tests: Fix vmx/xml filenames
conf: Rewrite virNetDevVPortProfileCopy
vmx: Require networkName for bridged and custom NICs
conf, docs, schemas: Add support for interface type vds
vmx: Add support for VDS interface
docs/formatdomain.rst | 30 ++++++--
src/ch/ch_monitor.c | 1 +
src/conf/domain_conf.c | 73 ++++++++++++++++--
src/conf/domain_conf.h | 7 ++
src/conf/netdev_bandwidth_conf.c | 1 +
src/conf/schemas/domaincommon.rng | 23 ++++++
src/libxl/libxl_conf.c | 1 +
src/libxl/xen_common.c | 1 +
src/lxc/lxc_controller.c | 1 +
src/lxc/lxc_driver.c | 3 +
src/lxc/lxc_process.c | 2 +
src/qemu/qemu_command.c | 4 +
src/qemu/qemu_domain.c | 1 +
src/qemu/qemu_hotplug.c | 3 +
src/qemu/qemu_interface.c | 2 +
src/qemu/qemu_process.c | 2 +
src/qemu/qemu_validate.c | 1 +
src/util/virnetdevvportprofile.c | 18 +++--
src/util/virnetdevvportprofile.h | 5 +-
src/vmx/vmx.c | 77 +++++++++++++++----
...unmanaged-nodev.vmx => ethernet-dummy.vmx} | 0
...unmanaged-nodev.xml => ethernet-dummy.xml} | 0
tests/vmx2xmldata/ethernet-vds.vmx | 11 +++
tests/vmx2xmldata/ethernet-vds.xml | 24 ++++++
tests/vmx2xmltest.c | 3 +-
...d-nodev.vmx => xml2vmx-ethernet-dummy.vmx} | 0
...d-nodev.xml => xml2vmx-ethernet-dummy.xml} | 0
tests/xml2vmxdata/xml2vmx-ethernet-vds.vmx | 18 +++++
tests/xml2vmxdata/xml2vmx-ethernet-vds.xml | 15 ++++
tests/xml2vmxtest.c | 3 +-
tools/virsh-domain.c | 1 +
31 files changed, 292 insertions(+), 39 deletions(-)
rename tests/vmx2xmldata/{ethernet-unmanaged-nodev.vmx => ethernet-dummy.vmx} (100%)
rename tests/vmx2xmldata/{ethernet-unmanaged-nodev.xml => ethernet-dummy.xml} (100%)
create mode 100644 tests/vmx2xmldata/ethernet-vds.vmx
create mode 100644 tests/vmx2xmldata/ethernet-vds.xml
rename tests/xml2vmxdata/{xml2vmx-ethernet-unmanaged-nodev.vmx => xml2vmx-ethernet-dummy.vmx} (100%)
rename tests/xml2vmxdata/{xml2vmx-ethernet-unmanaged-nodev.xml => xml2vmx-ethernet-dummy.xml} (100%)
create mode 100644 tests/xml2vmxdata/xml2vmx-ethernet-vds.vmx
create mode 100644 tests/xml2vmxdata/xml2vmx-ethernet-vds.xml
--
2.37.2
2 years, 3 months
[libvirt PATCH] tests: add better QEMU capabilities example
by Daniel P. Berrangé
Updated example covers:
* UUID
* CPU model, vendor, microcode, signature, counters,
topology, maxphysaddr, features,
* Power management
* NUMA page size info, multiple nodes, CPU topology IDs, distances
* CPU cache bank info
* Multiple secmodels
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
tests/capabilityschemadata/caps-qemu-kvm.xml | 95 ++++++++++++++++++--
1 file changed, 89 insertions(+), 6 deletions(-)
diff --git a/tests/capabilityschemadata/caps-qemu-kvm.xml b/tests/capabilityschemadata/caps-qemu-kvm.xml
index 65c3bba7c4..acdbb362cc 100644
--- a/tests/capabilityschemadata/caps-qemu-kvm.xml
+++ b/tests/capabilityschemadata/caps-qemu-kvm.xml
@@ -1,9 +1,50 @@
<capabilities>
<host>
+ <uuid>a25c794c-34ad-11b2-a85c-b030533115b8</uuid>
<cpu>
<arch>x86_64</arch>
+ <model>Haswell-noTSX</model>
+ <vendor>Intel</vendor>
+ <microcode version='45'/>
+ <counter name='tsc' frequency='2596991000' scaling='no'/>
+ <topology sockets='1' dies='1' cores='8' threads='1'/>
+ <maxphysaddr mode='emulate' bits='39'/>
+ <feature name='vme'/>
+ <feature name='ds'/>
+ <feature name='acpi'/>
+ <feature name='ss'/>
+ <feature name='ht'/>
+ <feature name='tm'/>
+ <feature name='pbe'/>
+ <feature name='dtes64'/>
+ <feature name='ds_cpl'/>
+ <feature name='vmx'/>
+ <feature name='smx'/>
+ <feature name='est'/>
+ <feature name='tm2'/>
+ <feature name='xtpr'/>
+ <feature name='pdcm'/>
+ <feature name='dca'/>
+ <feature name='osxsave'/>
+ <feature name='f16c'/>
+ <feature name='rdrand'/>
+ <feature name='arat'/>
+ <feature name='tsc_adjust'/>
+ <feature name='cmt'/>
+ <feature name='xsaveopt'/>
+ <feature name='pdpe1gb'/>
+ <feature name='abm'/>
+ <feature name='invtsc'/>
+ <pages unit='KiB' size='4'/>
+ <pages unit='KiB' size='2048'/>
+ <pages unit='KiB' size='1048576'/>
</cpu>
+ <power_management>
+ <suspend_mem/>
+ <suspend_disk/>
+ <suspend_hybrid/>
+ </power_management>
<migration_features>
<live/>
<uri_transports>
@@ -12,23 +53,65 @@
</uri_transports>
</migration_features>
<topology>
- <cells num='1'>
+ <cells num='2'>
<cell id='0'>
- <cpus num='4'>
- <cpu id='0'/>
- <cpu id='1'/>
- <cpu id='2'/>
- <cpu id='3'/>
+ <memory unit='KiB'>16175540</memory>
+ <pages unit='KiB' size='4'>4043885</pages>
+ <pages unit='KiB' size='2048'>0</pages>
+ <pages unit='KiB' size='1048576'>0</pages>
+ <distances>
+ <sibling id='0' value='10'/>
+ <sibling id='1' value='21'/>
+ </distances>
+ <cpus num='8'>
+ <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0'/>
+ <cpu id='2' socket_id='0' die_id='0' core_id='1' siblings='2'/>
+ <cpu id='4' socket_id='0' die_id='0' core_id='2' siblings='4'/>
+ <cpu id='6' socket_id='0' die_id='0' core_id='3' siblings='6'/>
+ <cpu id='8' socket_id='0' die_id='0' core_id='4' siblings='8'/>
+ <cpu id='10' socket_id='0' die_id='0' core_id='5' siblings='10'/>
+ <cpu id='12' socket_id='0' die_id='0' core_id='6' siblings='12'/>
+ <cpu id='14' socket_id='0' die_id='0' core_id='7' siblings='14'/>
+ </cpus>
+ </cell>
+ <cell id='1'>
+ <memory unit='KiB'>16510060</memory>
+ <pages unit='KiB' size='4'>4127515</pages>
+ <pages unit='KiB' size='2048'>0</pages>
+ <pages unit='KiB' size='1048576'>0</pages>
+ <distances>
+ <sibling id='0' value='21'/>
+ <sibling id='1' value='10'/>
+ </distances>
+ <cpus num='8'>
+ <cpu id='1' socket_id='1' die_id='0' core_id='0' siblings='1'/>
+ <cpu id='3' socket_id='1' die_id='0' core_id='1' siblings='3'/>
+ <cpu id='5' socket_id='1' die_id='0' core_id='2' siblings='5'/>
+ <cpu id='7' socket_id='1' die_id='0' core_id='3' siblings='7'/>
+ <cpu id='9' socket_id='1' die_id='0' core_id='4' siblings='9'/>
+ <cpu id='11' socket_id='1' die_id='0' core_id='5' siblings='11'/>
+ <cpu id='13' socket_id='1' die_id='0' core_id='6' siblings='13'/>
+ <cpu id='15' socket_id='1' die_id='0' core_id='7' siblings='15'/>
</cpus>
</cell>
</cells>
</topology>
+ <cache>
+ <bank id='0' level='3' type='both' size='20' unit='MiB' cpus='0,2,4,6,8,10,12,14'/>
+ <bank id='1' level='3' type='both' size='20' unit='MiB' cpus='1,3,5,7,9,11,13,15'/>
+ </cache>
<secmodel>
<model>selinux</model>
<doi>0</doi>
<baselabel type='kvm'>system_u:system_r:svirt_t:s0</baselabel>
<baselabel type='qemu'>system_u:system_r:svirt_tcg_t:s0</baselabel>
</secmodel>
+ <secmodel>
+ <model>dac</model>
+ <doi>0</doi>
+ <baselabel type='kvm'>+107:+107</baselabel>
+ <baselabel type='qemu'>+107:+107</baselabel>
+ </secmodel>
</host>
<guest>
--
2.37.2
2 years, 3 months
[PATCH] qemu: command: Don't use deprecated chardev backend drivers 'tty' and 'parport'
by Peter Krempa
The replacement is 'serial' and 'parallel' respectively introduced at
least in qemu-2.9 and the old versions are deprecated since qemu-6.0.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_command.c | 12 ++++++++----
.../qemuxml2argvdata/name-escape.x86_64-latest.args | 2 +-
tests/qemuxml2argvdata/parallel-parport-chardev.args | 2 +-
.../parallel-parport-chardev.x86_64-latest.args | 2 +-
tests/qemuxml2argvdata/pci-serial-dev-chardev.args | 2 +-
.../pci-serial-dev-chardev.x86_64-latest.args | 2 +-
.../qemuxml2argvdata/serial-dev-chardev-iobase.args | 2 +-
.../serial-dev-chardev-iobase.x86_64-latest.args | 2 +-
tests/qemuxml2argvdata/serial-dev-chardev.args | 2 +-
.../serial-dev-chardev.x86_64-latest.args | 2 +-
10 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index a31b8ee438..da04537234 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1314,12 +1314,16 @@ qemuBuildChardevStr(const virDomainChrSourceDef *dev,
virBufferAsprintf(&buf, "pty,id=%s", charAlias);
break;
- case VIR_DOMAIN_CHR_TYPE_DEV:
- virBufferAsprintf(&buf, "%s,id=%s,path=",
- STRPREFIX(charAlias, "charparallel") ? "parport" : "tty",
- charAlias);
+ case VIR_DOMAIN_CHR_TYPE_DEV: {
+ const char *backend = "serial";
+
+ if (STRPREFIX(charAlias, "charparallel"))
+ backend = "parallel";
+
+ virBufferAsprintf(&buf, "%s,id=%s,path=", backend, charAlias);
virQEMUBuildBufferEscapeComma(&buf, dev->data.file.path);
break;
+ }
case VIR_DOMAIN_CHR_TYPE_FILE:
virBufferAsprintf(&buf, "file,id=%s", charAlias);
diff --git a/tests/qemuxml2argvdata/name-escape.x86_64-latest.args b/tests/qemuxml2argvdata/name-escape.x86_64-latest.args
index b8ac17eee6..42b0ad3230 100644
--- a/tests/qemuxml2argvdata/name-escape.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/name-escape.x86_64-latest.args
@@ -33,7 +33,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-foo=1,bar=2/.config \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":true,"no-flush":false},"driver":"qcow2","file":"libvirt-1-storage"}' \
-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1,"write-cache":"on"}' \
-device '{"driver":"ccid-card-emulated","backend":"certificates","cert1":"cert1,foo","cert2":"cert2","cert3":"cert3","db":"/etc/pki/nssdb,foo","id":"smartcard0","bus":"ccid0.0"}' \
--chardev tty,id=charserial0,path=/dev/ttyS2,,foo \
+-chardev serial,id=charserial0,path=/dev/ttyS2,,foo \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":1}' \
-add-fd set=0,fd=1750,opaque=serial1-source \
-chardev file,id=charserial1,path=/dev/fdset/0,append=on \
diff --git a/tests/qemuxml2argvdata/parallel-parport-chardev.args b/tests/qemuxml2argvdata/parallel-parport-chardev.args
index e3d3d6f3db..66b398fe64 100644
--- a/tests/qemuxml2argvdata/parallel-parport-chardev.args
+++ b/tests/qemuxml2argvdata/parallel-parport-chardev.args
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
--chardev parport,id=charparallel0,path=/dev/parport0 \
+-chardev parallel,id=charparallel0,path=/dev/parport0 \
-device isa-parallel,chardev=charparallel0,id=parallel0 \
-audiodev '{"id":"audio1","driver":"none"}' \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
diff --git a/tests/qemuxml2argvdata/parallel-parport-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/parallel-parport-chardev.x86_64-latest.args
index 2ce2e381bb..6200251f1e 100644
--- a/tests/qemuxml2argvdata/parallel-parport-chardev.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/parallel-parport-chardev.x86_64-latest.args
@@ -31,7 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
--chardev parport,id=charparallel0,path=/dev/parport0 \
+-chardev parallel,id=charparallel0,path=/dev/parport0 \
-device '{"driver":"isa-parallel","chardev":"charparallel0","id":"parallel0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \
diff --git a/tests/qemuxml2argvdata/pci-serial-dev-chardev.args b/tests/qemuxml2argvdata/pci-serial-dev-chardev.args
index 651b2732f5..0cc0ef2c14 100644
--- a/tests/qemuxml2argvdata/pci-serial-dev-chardev.args
+++ b/tests/qemuxml2argvdata/pci-serial-dev-chardev.args
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
--chardev tty,id=charserial0,path=/dev/ttyS2 \
+-chardev serial,id=charserial0,path=/dev/ttyS2 \
-device pci-serial,chardev=charserial0,id=serial0,bus=pci.0,addr=0x4 \
-audiodev '{"id":"audio1","driver":"none"}' \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
diff --git a/tests/qemuxml2argvdata/pci-serial-dev-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/pci-serial-dev-chardev.x86_64-latest.args
index c513ae0316..94d90b215c 100644
--- a/tests/qemuxml2argvdata/pci-serial-dev-chardev.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/pci-serial-dev-chardev.x86_64-latest.args
@@ -31,7 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
--chardev tty,id=charserial0,path=/dev/ttyS2 \
+-chardev serial,id=charserial0,path=/dev/ttyS2 \
-device '{"driver":"pci-serial","chardev":"charserial0","id":"serial0","bus":"pci.0","addr":"0x4"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \
diff --git a/tests/qemuxml2argvdata/serial-dev-chardev-iobase.args b/tests/qemuxml2argvdata/serial-dev-chardev-iobase.args
index 735dcd053a..32218842ef 100644
--- a/tests/qemuxml2argvdata/serial-dev-chardev-iobase.args
+++ b/tests/qemuxml2argvdata/serial-dev-chardev-iobase.args
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
--chardev tty,id=charserial0,path=/dev/ttyS2 \
+-chardev serial,id=charserial0,path=/dev/ttyS2 \
-device isa-serial,chardev=charserial0,id=serial0,index=0,iobase=1016,irq=4 \
-audiodev '{"id":"audio1","driver":"none"}' \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
diff --git a/tests/qemuxml2argvdata/serial-dev-chardev-iobase.x86_64-latest.args b/tests/qemuxml2argvdata/serial-dev-chardev-iobase.x86_64-latest.args
index a22237b680..3b5ce0a59b 100644
--- a/tests/qemuxml2argvdata/serial-dev-chardev-iobase.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/serial-dev-chardev-iobase.x86_64-latest.args
@@ -31,7 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
--chardev tty,id=charserial0,path=/dev/ttyS2 \
+-chardev serial,id=charserial0,path=/dev/ttyS2 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0,"iobase":1016,"irq":4}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \
diff --git a/tests/qemuxml2argvdata/serial-dev-chardev.args b/tests/qemuxml2argvdata/serial-dev-chardev.args
index 52f9c3d0bb..ba8832f64f 100644
--- a/tests/qemuxml2argvdata/serial-dev-chardev.args
+++ b/tests/qemuxml2argvdata/serial-dev-chardev.args
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
-device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
--chardev tty,id=charserial0,path=/dev/ttyS2 \
+-chardev serial,id=charserial0,path=/dev/ttyS2 \
-device isa-serial,chardev=charserial0,id=serial0,index=0 \
-audiodev '{"id":"audio1","driver":"none"}' \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
diff --git a/tests/qemuxml2argvdata/serial-dev-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-dev-chardev.x86_64-latest.args
index a19d3bb209..ffa9bac136 100644
--- a/tests/qemuxml2argvdata/serial-dev-chardev.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/serial-dev-chardev.x86_64-latest.args
@@ -31,7 +31,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}' \
--chardev tty,id=charserial0,path=/dev/ttyS2 \
+-chardev serial,id=charserial0,path=/dev/ttyS2 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \
--
2.37.1
2 years, 3 months
[PATCH] NEWS: Mention bumping of minimum qemu version to 4.2
by Peter Krempa
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
NEWS.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index bd848a8867..ff618d5848 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -15,6 +15,11 @@ v8.7.0 (unreleased)
* **Removed features**
+ * qemu: Remove support for QEMU < 4.2
+
+ In accordance with our platform support policy, the oldest supported QEMU
+ version is now bumped from 3.1 to 4.2.
+
* **New features**
* qemu: Add support for specifying vCPU physical address size in bits
--
2.37.1
2 years, 3 months
[libvirt PATCH] NEWS: memtion vdpa/vfio memlock bump in release notes
by Jonathon Jongsma
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
NEWS.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 2e0a4a7b94..8ebf67581f 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -31,6 +31,12 @@ v8.7.0 (unreleased)
* **Bug fixes**
+ * qemu: increase memlock limit for a domain with multiple vfio/vdpa devices
+
+ When multiple vfio or vdpa devices are assigned to a domain, the memory
+ limit could be too low to map memory for all devices. The memlock limit has
+ been increased to be proportional to the number of vdpa/vfio devices.
+
v8.6.0 (2022-08-01)
===================
--
2.37.1
2 years, 3 months
[PATCH v1 00/10] Dirty page rate limit support
by huangy81@chinatelecom.cn
From: Hyman Huang(黄勇) <huangy81(a)chinatelecom.cn>
Ping
How about this series? hoping to get comments if anyone has played
with it.
Thanks very much sincerely.
Yong
v1:
- rebase on master and fix conflicts
- filter out dirty page limit info for hotpluggable vcpu but not active
- drop the documents patch, which can be post later after main series
being reviewed.
- code clean
Abstract
========
Qemu introduced dirty page rate limit feature in 7.1.0, see the details in
the following link:
https://lore.kernel.org/qemu-devel/cover.1656177590.git.huangy81@chinatel...
So may be it's the right time to enabling this feature in libvirt meanwhile
so that upper user can play with it.
Expecting the upper app can use this feature to do a vcpu Qos or whatever else.
This patch add 2 new apis to implement dirty page rate limit:
1. virDomainSetVcpuDirtyLimit, which set vcpu dirty page rate
limit. virsh command 'vcpudirtylimit' also implemented correspondingly.
2. virDomainCancelVcpuDirtyLimit, which cancel vcpu dirty page rate
limit. 'cancel' option was introduced to 'vcpudirtylimit' to cancel
the limit correspondingly.
In addition, function 'qemuMonitorQueryVcpuDirtyLimit' was implemented
to query dirty page rate limit, virsh command 'vcpuinfo' was extended
so that user can query dirty page rate limit info via 'vcpuinfo'.
This series make main modifications as the following:
- introduce QEMU_CAPS_VCPU_DIRTY_LIMIT capability so that libvirt can probe
before using dirty page rate limit feature.
- implement virsh command 'vcpudirtylimit' to set/cancel dirty page rate
limit.
- extend vcpuinfo api so that it can display dirtylimit info.
Please review, thanks!
Best regards!
Hyman Huang(黄勇) (10):
qemu_capabilities: Introduce QEMU_CAPS_VCPU_DIRTY_LIMIT capability
libvirt: Add virDomainSetVcpuDirtyLimit API
qemu_driver: Implement qemuDomainSetVcpuDirtyLimit
virsh: Introduce vcpudirtylimit api
qemu_monitor: Implement qemuMonitorQueryVcpuDirtyLimit
qemu_driver: Extend qemuDomainGetVcpus for dirtylimit
virsh: Extend vcpuinfo api to display dirtylimit info
libvirt: Add virDomainCancelVcpuDirtyLimit API
qemu_driver: Implement qemuDomainCancelVcpuDirtyLimit
virsh: Add cancel option to vcpudirtylimit api
include/libvirt/libvirt-domain.h | 22 ++++
src/driver-hypervisor.h | 13 ++
src/libvirt-domain.c | 94 ++++++++++++++
src/libvirt_public.syms | 6 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_driver.c | 156 +++++++++++++++++++++++
src/qemu/qemu_monitor.c | 36 ++++++
src/qemu/qemu_monitor.h | 26 ++++
src/qemu/qemu_monitor_json.c | 138 ++++++++++++++++++++
src/qemu/qemu_monitor_json.h | 13 ++
src/remote/remote_daemon_dispatch.c | 2 +
src/remote/remote_driver.c | 4 +
src/remote/remote_protocol.x | 30 ++++-
src/remote_protocol-structs | 13 ++
tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 +
tools/virsh-domain.c | 112 ++++++++++++++++
17 files changed, 667 insertions(+), 2 deletions(-)
--
1.8.3.1
2 years, 3 months
[PATCH] lib: Drop needless ret variables
by Michal Privoznik
This patch was generated using the following spatch:
@@
type T;
constant C;
expression f;
identifier ret;
@@
(
-T ret = C;
|
-T ret;
)
... when != ret
when strict
(
-ret = f;
-return ret;
+return f;
|
-return ret;
+return C;
)
Basically, if there's a variable declared at the beginning of a
function and the variable is not changed until the very last
moment, just before return, such variable is useless.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/checkpoint_conf.c | 4 +---
src/conf/domain_addr.c | 6 +-----
src/conf/domain_conf.c | 8 ++------
src/esx/esx_driver.c | 5 +----
src/libxl/libxl_domain.c | 4 +---
src/libxl/xen_xl.c | 5 +----
src/openvz/openvz_conf.c | 3 +--
src/qemu/qemu_driver.c | 6 ++----
src/qemu/qemu_process.c | 5 +----
src/test/test_driver.c | 18 +++++++-----------
src/util/virbitmap.c | 4 +---
src/util/virerror.c | 3 +--
src/util/virxml.c | 5 +----
tests/genericxml2xmltest.c | 10 ++++------
tests/interfacexml2xmltest.c | 5 +----
tests/libxlxml2domconfigtest.c | 5 +----
tests/lxcconf2xmltest.c | 10 ++--------
tests/lxcxml2xmltest.c | 11 ++++-------
tests/networkxml2conftest.c | 5 +----
tests/networkxml2firewalltest.c | 5 +----
tests/networkxml2xmltest.c | 7 ++-----
tests/networkxml2xmlupdatetest.c | 9 +++------
tests/nodedevxml2xmltest.c | 5 +----
tests/nwfilterxml2firewalltest.c | 5 +----
tests/nwfilterxml2xmltest.c | 5 +----
tests/secretxml2xmltest.c | 5 +----
tests/vboxsnapshotxmltest.c | 5 +----
tests/virnwfilterbindingxml2xmltest.c | 5 +----
tests/vmx2xmltest.c | 5 +----
tests/xml2vmxtest.c | 5 +----
30 files changed, 48 insertions(+), 135 deletions(-)
diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c
index 338cf10d12..17aa98dc2a 100644
--- a/src/conf/checkpoint_conf.c
+++ b/src/conf/checkpoint_conf.c
@@ -119,7 +119,6 @@ virDomainCheckpointDefParse(xmlXPathContextPtr ctxt,
void *parseOpaque,
unsigned int flags)
{
- virDomainCheckpointDef *ret = NULL;
size_t i;
int n;
g_autofree xmlNodePtr *nodes = NULL;
@@ -177,8 +176,7 @@ virDomainCheckpointDefParse(xmlXPathContextPtr ctxt,
return NULL;
}
- ret = g_steal_pointer(&def);
- return ret;
+ return g_steal_pointer(&def);
}
static virDomainCheckpointDef *
diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index 76f9c12ca6..f7b2acdcc9 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -1429,11 +1429,7 @@ virDomainCCWAddressSetCreateFromDomain(virDomainDef *def)
static virDomainVirtioSerialAddrSet *
virDomainVirtioSerialAddrSetCreate(void)
{
- virDomainVirtioSerialAddrSet *ret = NULL;
-
- ret = g_new0(virDomainVirtioSerialAddrSet, 1);
-
- return ret;
+ return g_new0(virDomainVirtioSerialAddrSet, 1);
}
static void
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6950f7ec1d..bc74965d91 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -28728,7 +28728,6 @@ virSecurityLabelDef *
virDomainDefGetSecurityLabelDef(const virDomainDef *def, const char *model)
{
size_t i;
- virSecurityLabelDef *seclabel = NULL;
if (def == NULL || model == NULL)
return NULL;
@@ -28740,7 +28739,7 @@ virDomainDefGetSecurityLabelDef(const virDomainDef *def, const char *model)
return def->seclabels[i];
}
- return seclabel;
+ return NULL;
}
@@ -30592,7 +30591,6 @@ virDomainObjGetMessages(virDomainObj *vm,
size_t i = 0;
size_t n = 0;
int nmsgs = 0;
- int rv = -1;
*msgs = NULL;
@@ -30623,9 +30621,7 @@ virDomainObjGetMessages(virDomainObj *vm,
if (*msgs)
(*msgs)[nmsgs] = NULL;
- rv = nmsgs;
-
- return rv;
+ return nmsgs;
}
bool
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 9dc5489411..a0540f585d 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -2671,7 +2671,6 @@ esxConnectDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
virVMXContext ctx;
esxVMX_Data data;
g_autoptr(virDomainDef) def = NULL;
- char *vmx = NULL;
virCheckFlags(0, NULL);
@@ -2705,9 +2704,7 @@ esxConnectDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
ctx.datacenterPath = NULL;
ctx.moref = NULL;
- vmx = virVMXFormatConfig(&ctx, priv->xmlopt, def, virtualHW_version);
-
- return vmx;
+ return virVMXFormatConfig(&ctx, priv->xmlopt, def, virtualHW_version);
}
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 52e0aa1e60..1cbb007f13 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -712,11 +712,9 @@ libxlDomainEventHandler(void *data, libxl_event *event)
char *
libxlDomainManagedSavePath(libxlDriverPrivate *driver, virDomainObj *vm)
{
- char *ret;
g_autoptr(libxlDriverConfig) cfg = libxlDriverConfigGet(driver);
- ret = g_strdup_printf("%s/%s.save", cfg->saveDir, vm->def->name);
- return ret;
+ return g_strdup_printf("%s/%s.save", cfg->saveDir, vm->def->name);
}
/*
diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c
index 6919325623..188cecb98e 100644
--- a/src/libxl/xen_xl.c
+++ b/src/libxl/xen_xl.c
@@ -1318,7 +1318,6 @@ xenFormatXLVnuma(virConfValue *list,
size_t node,
size_t nr_nodes)
{
- int ret = -1;
size_t i;
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
virConfValue *numaVnode;
@@ -1365,9 +1364,7 @@ xenFormatXLVnuma(virConfValue *list,
tmp->next = numaVnode;
else
list->list = numaVnode;
- ret = 0;
-
- return ret;
+ return 0;
}
static int
diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index c94f9b8577..368e747a34 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -772,7 +772,6 @@ static int
openvzLocateConfFileDefault(int vpsid, char **conffile, const char *ext)
{
char *confdir;
- int ret = 0;
confdir = openvzLocateConfDir();
if (confdir == NULL)
@@ -781,7 +780,7 @@ openvzLocateConfFileDefault(int vpsid, char **conffile, const char *ext)
*conffile = g_strdup_printf("%s/%d.%s", confdir, vpsid, ext ? ext : "conf");
VIR_FREE(confdir);
- return ret;
+ return 0;
}
static char *
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 707f4cc1bb..3f9638bc8e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6029,7 +6029,6 @@ qemuDomainRestoreParams(virConnectPtr conn,
{
const char *path = NULL;
const char *dxml = NULL;
- int ret = -1;
if (virTypedParamsValidate(params, nparams,
VIR_DOMAIN_SAVE_PARAM_FILE, VIR_TYPED_PARAM_STRING,
@@ -6050,9 +6049,8 @@ qemuDomainRestoreParams(virConnectPtr conn,
return -1;
}
- ret = qemuDomainRestoreInternal(conn, path, dxml, flags,
- virDomainRestoreParamsEnsureACL);
- return ret;
+ return qemuDomainRestoreInternal(conn, path, dxml, flags,
+ virDomainRestoreParamsEnsureACL);
}
static char *
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 32f03ff79a..f7cf56904b 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -2974,7 +2974,6 @@ qemuProcessUpdateVideoRamSize(virQEMUDriver *driver,
virDomainObj *vm,
int asyncJob)
{
- int ret = -1;
ssize_t i;
qemuDomainObjPrivate *priv = vm->privateData;
virDomainVideoDef *video = NULL;
@@ -3035,9 +3034,7 @@ qemuProcessUpdateVideoRamSize(virQEMUDriver *driver,
qemuDomainObjExitMonitor(vm);
cfg = virQEMUDriverGetConfig(driver);
- ret = virDomainObjSave(vm, driver->xmlopt, cfg->stateDir);
-
- return ret;
+ return virDomainObjSave(vm, driver->xmlopt, cfg->stateDir);
error:
qemuDomainObjExitMonitor(vm);
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 641a141b6a..15fe9404e4 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -7751,7 +7751,6 @@ testNodeDeviceCreateXML(virConnectPtr conn,
static int
testNodeDeviceDestroy(virNodeDevicePtr dev)
{
- int ret = 0;
testDriver *driver = dev->conn->privateData;
virNodeDeviceObj *obj = NULL;
virNodeDeviceObj *parentobj = NULL;
@@ -7794,7 +7793,7 @@ testNodeDeviceDestroy(virNodeDevicePtr dev)
cleanup:
virNodeDeviceObjEndAPI(&obj);
virObjectEventStateQueue(driver->eventState, event);
- return ret;
+ return 0;
}
@@ -9547,25 +9546,24 @@ testDomainChgIOThread(virDomainObj *vm,
unsigned int flags)
{
virDomainDef *def;
- int ret = -1;
if (!(def = virDomainObjGetOneDef(vm, flags)))
- return ret;
+ return -1;
if (def) {
switch (action) {
case VIR_DOMAIN_IOTHREAD_ACTION_ADD:
if (virDomainDriverAddIOThreadCheck(def, iothread_id) < 0)
- return ret;
+ return -1;
if (!virDomainIOThreadIDAdd(def, iothread_id))
- return ret;
+ return -1;
break;
case VIR_DOMAIN_IOTHREAD_ACTION_DEL:
if (virDomainDriverDelIOThreadCheck(def, iothread_id) < 0)
- return ret;
+ return -1;
virDomainIOThreadIDDel(def, iothread_id);
@@ -9576,16 +9574,14 @@ testDomainChgIOThread(virDomainObj *vm,
virReportError(VIR_ERR_INVALID_ARG,
_("cannot find IOThread '%u' in iothreadids"),
iothread_id);
- return ret;
+ return -1;
}
break;
}
}
- ret = 0;
-
- return ret;
+ return 0;
}
static int
diff --git a/src/util/virbitmap.c b/src/util/virbitmap.c
index 5b9204cbd7..786b9adb06 100644
--- a/src/util/virbitmap.c
+++ b/src/util/virbitmap.c
@@ -330,9 +330,7 @@ virBitmapFormat(virBitmap *bitmap)
int start, cur, prev;
if (!bitmap || (cur = virBitmapNextSetBit(bitmap, -1)) < 0) {
- char *ret;
- ret = g_strdup("");
- return ret;
+ return g_strdup("");
}
start = prev = cur;
diff --git a/src/util/virerror.c b/src/util/virerror.c
index d114c0a346..e41544cdb8 100644
--- a/src/util/virerror.c
+++ b/src/util/virerror.c
@@ -199,7 +199,6 @@ static int
virCopyError(virErrorPtr from,
virErrorPtr to)
{
- int ret = 0;
if (!to)
return 0;
virResetError(to);
@@ -217,7 +216,7 @@ virCopyError(virErrorPtr from,
/*
* Deliberately not setting 'conn', 'dom', 'net' references
*/
- return ret;
+ return 0;
}
diff --git a/src/util/virxml.c b/src/util/virxml.c
index d6e2e5dd91..1f64cf151b 100644
--- a/src/util/virxml.c
+++ b/src/util/virxml.c
@@ -1591,13 +1591,10 @@ virXMLValidateAgainstSchema(const char *schemafile,
int
virXMLValidateNodeAgainstSchema(const char *schemafile, xmlNodePtr node)
{
- int ret;
g_autoptr(xmlDoc) copy = xmlNewDoc(NULL);
xmlDocSetRootElement(copy, xmlCopyNode(node, true));
- ret = virXMLValidateAgainstSchema(schemafile, copy);
-
- return ret;
+ return virXMLValidateAgainstSchema(schemafile, copy);
}
diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c
index 3501eadf55..70b69101d8 100644
--- a/tests/genericxml2xmltest.c
+++ b/tests/genericxml2xmltest.c
@@ -27,18 +27,16 @@ testCompareXMLToXMLHelper(const void *data)
const struct testInfo *info = data;
g_autofree char *xml_in = NULL;
g_autofree char *xml_out = NULL;
- int ret = -1;
xml_in = g_strdup_printf("%s/genericxml2xmlindata/%s.xml",
abs_srcdir, info->name);
xml_out = g_strdup_printf("%s/genericxml2xmloutdata/%s.xml",
abs_srcdir, info->name);
- ret = testCompareDomXML2XMLFiles(caps, xmlopt, xml_in,
- info->different ? xml_out : xml_in,
- info->active_only, 0,
- info->expectResult);
- return ret;
+ return testCompareDomXML2XMLFiles(caps, xmlopt, xml_in,
+ info->different ? xml_out : xml_in,
+ info->active_only, 0,
+ info->expectResult);
}
diff --git a/tests/interfacexml2xmltest.c b/tests/interfacexml2xmltest.c
index b23e0f589b..95fee4d744 100644
--- a/tests/interfacexml2xmltest.c
+++ b/tests/interfacexml2xmltest.c
@@ -38,15 +38,12 @@ testCompareXMLToXMLFiles(const char *xml)
static int
testCompareXMLToXMLHelper(const void *data)
{
- int result = -1;
g_autofree char *xml = NULL;
xml = g_strdup_printf("%s/interfaceschemadata/%s.xml", abs_srcdir,
(const char *)data);
- result = testCompareXMLToXMLFiles(xml);
-
- return result;
+ return testCompareXMLToXMLFiles(xml);
}
diff --git a/tests/libxlxml2domconfigtest.c b/tests/libxlxml2domconfigtest.c
index a7080e0fa2..7d59bfe886 100644
--- a/tests/libxlxml2domconfigtest.c
+++ b/tests/libxlxml2domconfigtest.c
@@ -139,7 +139,6 @@ struct testInfo {
static int
testCompareXMLToDomConfigHelper(const void *data)
{
- int ret = -1;
const struct testInfo *info = data;
g_autofree char *xmlfile = NULL;
g_autofree char *jsonfile = NULL;
@@ -147,9 +146,7 @@ testCompareXMLToDomConfigHelper(const void *data)
xmlfile = g_strdup_printf("%s/libxlxml2domconfigdata/%s.xml", abs_srcdir, info->name);
jsonfile = g_strdup_printf("%s/libxlxml2domconfigdata/%s.json", abs_srcdir, info->name);
- ret = testCompareXMLToDomConfig(xmlfile, jsonfile);
-
- return ret;
+ return testCompareXMLToDomConfig(xmlfile, jsonfile);
}
diff --git a/tests/lxcconf2xmltest.c b/tests/lxcconf2xmltest.c
index 09f6465567..f384264e59 100644
--- a/tests/lxcconf2xmltest.c
+++ b/tests/lxcconf2xmltest.c
@@ -58,7 +58,6 @@ struct testInfo {
static int
testCompareXMLToConfigHelperLegacy(const void *data)
{
- int result = -1;
const struct testInfo *info = data;
g_autofree char *xml = NULL;
g_autofree char *config = NULL;
@@ -68,15 +67,12 @@ testCompareXMLToConfigHelperLegacy(const void *data)
config = g_strdup_printf("%s/lxcconf2xmldata/lxcconf2xml-%s.config",
abs_srcdir, info->name);
- result = testCompareXMLToConfigFiles(xml, config, info->expectError);
-
- return result;
+ return testCompareXMLToConfigFiles(xml, config, info->expectError);
}
static int
testCompareXMLToConfigHelperV3(const void *data)
{
- int result = -1;
const struct testInfo *info = data;
g_autofree char *xml = NULL;
g_autofree char *config = NULL;
@@ -86,9 +82,7 @@ testCompareXMLToConfigHelperV3(const void *data)
config = g_strdup_printf("%s/lxcconf2xmldata/lxcconf2xml-%s-v3.config",
abs_srcdir, info->name);
- result = testCompareXMLToConfigFiles(xml, config, info->expectError);
-
- return result;
+ return testCompareXMLToConfigFiles(xml, config, info->expectError);
}
diff --git a/tests/lxcxml2xmltest.c b/tests/lxcxml2xmltest.c
index 2c5d294f18..abb48ff993 100644
--- a/tests/lxcxml2xmltest.c
+++ b/tests/lxcxml2xmltest.c
@@ -30,19 +30,16 @@ testCompareXMLToXMLHelper(const void *data)
const struct testInfo *info = data;
g_autofree char *xml_in = NULL;
g_autofree char *xml_out = NULL;
- int ret = -1;
xml_in = g_strdup_printf("%s/lxcxml2xmldata/lxc-%s.xml",
abs_srcdir, info->name);
xml_out = g_strdup_printf("%s/lxcxml2xmloutdata/lxc-%s.xml",
abs_srcdir, info->name);
- ret = testCompareDomXML2XMLFiles(driver->caps, driver->xmlopt, xml_in,
- info->different ? xml_out : xml_in,
- info->active_only,
- info->parse_flags,
- TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
- return ret;
+ return testCompareDomXML2XMLFiles(driver->caps, driver->xmlopt, xml_in,
+ info->different ? xml_out : xml_in,
+ info->active_only, info->parse_flags,
+ TEST_COMPARE_DOM_XML2XML_RESULT_SUCCESS);
}
diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c
index bbeb849a39..81f2b4b9ae 100644
--- a/tests/networkxml2conftest.c
+++ b/tests/networkxml2conftest.c
@@ -93,7 +93,6 @@ typedef struct {
static int
testCompareXMLToConfHelper(const void *data)
{
- int result = -1;
const testInfo *info = data;
g_autofree char *inxml = NULL;
g_autofree char *outconf = NULL;
@@ -103,9 +102,7 @@ testCompareXMLToConfHelper(const void *data)
outconf = g_strdup_printf("%s/networkxml2confdata/%s.conf", abs_srcdir, info->name);
outhostsfile = g_strdup_printf("%s/networkxml2confdata/%s.hostsfile", abs_srcdir, info->name);
- result = testCompareXMLToConfFiles(inxml, outconf, outhostsfile, info->caps);
-
- return result;
+ return testCompareXMLToConfFiles(inxml, outconf, outhostsfile, info->caps);
}
static void
diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c
index ca793fd4ea..9cf00d9369 100644
--- a/tests/networkxml2firewalltest.c
+++ b/tests/networkxml2firewalltest.c
@@ -125,7 +125,6 @@ struct testInfo {
static int
testCompareXMLToIPTablesHelper(const void *data)
{
- int result = -1;
const struct testInfo *info = data;
g_autofree char *xml = NULL;
g_autofree char *args = NULL;
@@ -135,9 +134,7 @@ testCompareXMLToIPTablesHelper(const void *data)
args = g_strdup_printf("%s/networkxml2firewalldata/%s-%s.args",
abs_srcdir, info->name, RULESTYPE);
- result = testCompareXMLToArgvFiles(xml, args, info->baseargs);
-
- return result;
+ return testCompareXMLToArgvFiles(xml, args, info->baseargs);
}
diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c
index 521f058acc..86a9cdd137 100644
--- a/tests/networkxml2xmltest.c
+++ b/tests/networkxml2xmltest.c
@@ -81,17 +81,14 @@ static int
testCompareXMLToXMLHelper(const void *data)
{
const struct testInfo *info = data;
- int result = -1;
g_autofree char *inxml = NULL;
g_autofree char *outxml = NULL;
inxml = g_strdup_printf("%s/networkxml2xmlin/%s.xml", abs_srcdir, info->name);
outxml = g_strdup_printf("%s/networkxml2xmlout/%s.xml", abs_srcdir, info->name);
- result = testCompareXMLToXMLFiles(inxml, outxml, info->flags,
- info->expectResult);
-
- return result;
+ return testCompareXMLToXMLFiles(inxml, outxml, info->flags,
+ info->expectResult);
}
static int
diff --git a/tests/networkxml2xmlupdatetest.c b/tests/networkxml2xmlupdatetest.c
index 58b6f70c96..392507cc5c 100644
--- a/tests/networkxml2xmlupdatetest.c
+++ b/tests/networkxml2xmlupdatetest.c
@@ -71,7 +71,6 @@ static int
testCompareXMLToXMLHelper(const void *data)
{
const struct testInfo *info = data;
- int result = -1;
g_autofree char *netxml = NULL;
g_autofree char *updatexml = NULL;
g_autofree char *outxml = NULL;
@@ -83,11 +82,9 @@ testCompareXMLToXMLHelper(const void *data)
outxml = g_strdup_printf("%s/networkxml2xmlupdateout/%s.xml",
abs_srcdir, info->outxml);
- result = testCompareXMLToXMLFiles(netxml, updatexml, outxml, info->flags,
- info->command, info->section,
- info->parentIndex, info->expectFailure);
-
- return result;
+ return testCompareXMLToXMLFiles(netxml, updatexml, outxml, info->flags,
+ info->command, info->section,
+ info->parentIndex, info->expectFailure);
}
static int
diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c
index f82027fb87..6f67ffd73f 100644
--- a/tests/nodedevxml2xmltest.c
+++ b/tests/nodedevxml2xmltest.c
@@ -64,7 +64,6 @@ testCompareXMLToXMLFiles(const char *xml, const char *outfile)
static int
testCompareXMLToXMLHelper(const void *data)
{
- int result = -1;
g_autofree char *xml = NULL;
g_autofree char *outfile = NULL;
@@ -74,9 +73,7 @@ testCompareXMLToXMLHelper(const void *data)
outfile = g_strdup_printf("%s/nodedevxml2xmlout/%s.xml", abs_srcdir,
(const char *)data);
- result = testCompareXMLToXMLFiles(xml, outfile);
-
- return result;
+ return testCompareXMLToXMLFiles(xml, outfile);
}
diff --git a/tests/nwfilterxml2firewalltest.c b/tests/nwfilterxml2firewalltest.c
index 1514002b8f..6c540f90af 100644
--- a/tests/nwfilterxml2firewalltest.c
+++ b/tests/nwfilterxml2firewalltest.c
@@ -389,7 +389,6 @@ struct testInfo {
static int
testCompareXMLToIPTablesHelper(const void *data)
{
- int result = -1;
const struct testInfo *info = data;
g_autofree char *xml = NULL;
g_autofree char *args = NULL;
@@ -399,9 +398,7 @@ testCompareXMLToIPTablesHelper(const void *data)
args = g_strdup_printf("%s/nwfilterxml2firewalldata/%s-%s.args",
abs_srcdir, info->name, RULESTYPE);
- result = testCompareXMLToArgvFiles(xml, args);
-
- return result;
+ return testCompareXMLToArgvFiles(xml, args);
}
diff --git a/tests/nwfilterxml2xmltest.c b/tests/nwfilterxml2xmltest.c
index c2b6dc575b..1924cfdbde 100644
--- a/tests/nwfilterxml2xmltest.c
+++ b/tests/nwfilterxml2xmltest.c
@@ -51,7 +51,6 @@ typedef struct test_parms {
static int
testCompareXMLToXMLHelper(const void *data)
{
- int result = -1;
const test_parms *tp = data;
g_autofree char *inxml = NULL;
g_autofree char *outxml = NULL;
@@ -59,9 +58,7 @@ testCompareXMLToXMLHelper(const void *data)
inxml = g_strdup_printf("%s/nwfilterxml2xmlin/%s.xml", abs_srcdir, tp->name);
outxml = g_strdup_printf("%s/nwfilterxml2xmlout/%s.xml", abs_srcdir, tp->name);
- result = testCompareXMLToXMLFiles(inxml, outxml, tp->expect_warning);
-
- return result;
+ return testCompareXMLToXMLFiles(inxml, outxml, tp->expect_warning);
}
static int
diff --git a/tests/secretxml2xmltest.c b/tests/secretxml2xmltest.c
index 828e44a32b..4aa7463e83 100644
--- a/tests/secretxml2xmltest.c
+++ b/tests/secretxml2xmltest.c
@@ -33,7 +33,6 @@ struct testInfo {
static int
testCompareXMLToXMLHelper(const void *data)
{
- int result = -1;
g_autofree char *inxml = NULL;
g_autofree char *outxml = NULL;
const struct testInfo *info = data;
@@ -44,9 +43,7 @@ testCompareXMLToXMLHelper(const void *data)
info->different ? "out" : "in",
info->name);
- result = testCompareXMLToXMLFiles(inxml, outxml);
-
- return result;
+ return testCompareXMLToXMLFiles(inxml, outxml);
}
static int
diff --git a/tests/vboxsnapshotxmltest.c b/tests/vboxsnapshotxmltest.c
index 3ad8298895..ed9bb92018 100644
--- a/tests/vboxsnapshotxmltest.c
+++ b/tests/vboxsnapshotxmltest.c
@@ -87,15 +87,12 @@ testCompareXMLtoXMLFiles(const char *xml)
static int
testCompareXMLToXMLHelper(const void *data)
{
- int result = -1;
g_autofree char *xml = NULL;
xml = g_strdup_printf("%s/vboxsnapshotxmldata/%s.vbox", abs_srcdir,
(const char *)data);
- result = testCompareXMLtoXMLFiles(xml);
-
- return result;
+ return testCompareXMLtoXMLFiles(xml);
}
static int
diff --git a/tests/virnwfilterbindingxml2xmltest.c b/tests/virnwfilterbindingxml2xmltest.c
index 0c93b58a0c..afde2e3a4d 100644
--- a/tests/virnwfilterbindingxml2xmltest.c
+++ b/tests/virnwfilterbindingxml2xmltest.c
@@ -64,16 +64,13 @@ typedef struct test_parms {
static int
testCompareXMLToXMLHelper(const void *data)
{
- int result = -1;
const test_parms *tp = data;
g_autofree char *xml = NULL;
xml = g_strdup_printf("%s/virnwfilterbindingxml2xmldata/%s.xml", abs_srcdir,
tp->name);
- result = testCompareXMLToXMLFiles(xml);
-
- return result;
+ return testCompareXMLToXMLFiles(xml);
}
static int
diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c
index a43cab3108..d864843c19 100644
--- a/tests/vmx2xmltest.c
+++ b/tests/vmx2xmltest.c
@@ -89,7 +89,6 @@ struct testInfo {
static int
testCompareHelper(const void *data)
{
- int ret = -1;
const struct testInfo *info = data;
g_autofree char *vmx = NULL;
g_autofree char *xml = NULL;
@@ -99,9 +98,7 @@ testCompareHelper(const void *data)
xml = g_strdup_printf("%s/vmx2xmldata/%s.xml", abs_srcdir,
info->file);
- ret = testCompareFiles(vmx, xml, info->should_fail);
-
- return ret;
+ return testCompareFiles(vmx, xml, info->should_fail);
}
static int
diff --git a/tests/xml2vmxtest.c b/tests/xml2vmxtest.c
index 1cadb9500a..be9d5f3e6b 100644
--- a/tests/xml2vmxtest.c
+++ b/tests/xml2vmxtest.c
@@ -83,7 +83,6 @@ struct testInfo {
static int
testCompareHelper(const void *data)
{
- int result = -1;
const struct testInfo *info = data;
g_autofree char *xml = NULL;
g_autofree char *vmx = NULL;
@@ -93,9 +92,7 @@ testCompareHelper(const void *data)
vmx = g_strdup_printf("%s/xml2vmxdata/xml2vmx-%s.vmx", abs_srcdir,
info->output);
- result = testCompareFiles(xml, vmx, info->virtualHW_version);
-
- return result;
+ return testCompareFiles(xml, vmx, info->virtualHW_version);
}
static int
--
2.35.1
2 years, 3 months
[PATCH 00/10] virDomainControllerDef(Validate|Parse|Format): Refactor and fix several problems
by Peter Krempa
A relatively simple-looking bug report (see 10/10) lead me looking and
finding few more problems.
Peter Krempa (10):
virDomainControllerDefValidate: Un-break lines in error messages
virDomainControllerDefFormat: Use proper type for enum
virDomainControllerDefFormat: Split out formatting of PCI controller
virDomainControllerDefFormatPCI: Refactor formatting of '<target>'
subelement
virDomainControllerDefParseXML: Fix broken code indentation when
parsing PCI contoller target
virDomainControllerDefParseXML: Fix broken error reporting when
parsing 'index'
virDomainControllerDefParseXML: Remove explicit checks for negative
value
virDomainControllerDefParseXML: Parse 'index' by virXMLPropInt
virDomainControllerDefParseXML: Return early if there's unexpectedly
many elements
virDomainControllerDefParseXML: Reject '-1' for PCI controller target
properties
src/conf/domain_conf.c | 286 ++++++++----------
src/conf/domain_validate.c | 24 +-
.../pci-bridge-negative-index-invalid.err | 2 +-
3 files changed, 132 insertions(+), 180 deletions(-)
--
2.37.1
2 years, 3 months
[PATCH] docs: formatdomain: Fix small typos and syntax errors
by Carlos Bilbao
Fix some small typos and syntax errors in file formatdomain.rs.
Signed-off-by: Carlos Bilbao <carlos.bilbao(a)amd.com>
---
docs/formatdomain.rst | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 1c4700ac37..34e4906eb4 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -188,7 +188,7 @@ harddisk, cdrom, network) determining where to obtain/find the boot image.
features required by selected firmware. Accepted values are ``bios`` and
``efi``.
The selection process scans for files describing installed firmware images in
- specified location and uses the most specific one which fulfils domain
+ specified location and uses the most specific one which fulfills domain
requirements. The locations in order of preference (from generic to most
specific one) are:
@@ -1511,7 +1511,7 @@ In case no restrictions need to be put on CPU model and its features, a simpler
rather then trying to mimic the host CPU model.
If an application does not care about a specific CPU, just wants the
- best featureset without a need for migration compatibility, the
+ best feature set without a need for migration compatibility, the
``maximum`` model is a good choice on hypervisors where it is available.
``model``
@@ -2148,7 +2148,7 @@ are:
``nested-hv``
Configure nested HV availability for pSeries guests. This needs to be enabled
from the host (L0) in order to be effective; having HV support in the (L1)
- guest is very desiderable if it's planned to run nested (L2) guests inside
+ guest is very desirable if it's planned to run nested (L2) guests inside
it, because it will result in those nested guests having much better
performance than they would when using KVM PR or TCG. Possible values for the
``state`` attribute are ``on`` and ``off``. If the attribute is not defined,
@@ -2380,7 +2380,7 @@ event name Description
``page_faults_min`` the count of minor page faults, that is, where the page was present in the page cache, and therefore the fault avoided loading it from storage, by applications running on the platform ``perf.page_faults_min``
``page_faults_maj`` the count of major page faults, that is, where the page was not present in the page cache, and therefore had to be fetched from storage, by applications running on the platform ``perf.page_faults_maj``
``alignment_faults`` the count of alignment faults, that is when the load or store is not aligned properly, by applications running on the platform ``perf.alignment_faults``
-``emulation_faults`` the count of emulation faults, that is when the kernel traps on unimplemented instrucions and emulates them for user space, by applications running on the platform ``perf.emulation_faults``
+``emulation_faults`` the count of emulation faults, that is when the kernel traps on unimplemented instructions and emulates them for user space, by applications running on the platform ``perf.emulation_faults``
=========================== ======================================================================================================================================================================================= ================================
@@ -3109,7 +3109,7 @@ paravirtualized driver is specified via the ``disk`` element.
:since:`Throughput limits since 1.2.11 and QEMU 1.7`
``group_name``
- The optional ``group_name`` provides the cability to share I/O throttling
+ The optional ``group_name`` provides the ability to share I/O throttling
quota between multiple drives. This prevents end-users from circumventing
a hosting provider's throttling policy by splitting 1 large drive in N
small drives and getting N times the normal throttling quota. Any name may
@@ -5670,7 +5670,7 @@ be the "native" VLAN for this interface, and the ``nativeMode`` attribute
determines whether or not traffic for that VLAN will be tagged.
-Isolating guests's network traffic from each other
+Isolating guests' network traffic from each other
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
::
@@ -8379,7 +8379,7 @@ spec <https://support.amd.com/TechDocs/55766_SEV-KM_API_Specification.pdf>`__
capabilities.
``reducedPhysBits``
The required ``reducedPhysBits`` element provides the physical address bit
- reducation. Similar to ``cbitpos`` the value of ``reduced-phys-bit`` is
+ reduction. Similar to ``cbitpos`` the value of ``reduced-phys-bit`` is
hypervisor dependent and can be obtained through the ``sev`` element from the
domain capabilities.
``policy``
--
2.34.1
2 years, 3 months
[PATCH 0/8] qemu: Retire logic for setting 'disable-modern'/'disable-legacy' props of virtio devices
by Peter Krempa
The virtio-*-(non-)-transitional device models which replace the
properties were introduced in qemu-4.0, so we can remove the logic for
the old-style syntax.
In addition this series modernizes the tests meant for the virtio
devices in question.
Peter Krempa (8):
qemu: address: Use PCIe for virtio devices also with
QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL
qemuxml2*test: Use QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL for macos hfv
tests
qemuxml2argvtest: Add DO_TEST_CAPS_LATEST versions of tests which
assert QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY
qemuxml2argvtest: Convert all test cases asserting
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY
qemuxml2*test: Remove 'q35-virtio-pci' test case
qemuxml2xmltest: Convert all test cases asserting
QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY
qemu: Remove extra logic around QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY
qemu: capabilities: Retire QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY
src/qemu/qemu_capabilities.c | 13 +-
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 23 +--
src/qemu/qemu_domain_address.c | 2 +-
.../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 -
.../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 -
.../caps_7.0.0.aarch64.xml | 1 -
.../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 -
.../caps_7.0.0.x86_64.xml | 1 -
.../caps_7.1.0.x86_64.xml | 1 -
...h64-virtio-pci-default.aarch64-4.2.0.args} | 17 +-
...h64-virtio-pci-default.aarch64-latest.args | 55 ++++++
...ev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args} | 4 +-
...ev-scsi-vhost-scsi-pcie.x86_64-latest.args | 35 ++++
...35-default-devices-only.x86_64-4.2.0.args} | 12 +-
...35-default-devices-only.x86_64-latest.args | 37 +++++
tests/qemuxml2argvdata/q35-multifunction.args | 49 ------
.../q35-multifunction.x86_64-4.2.0.args | 51 ++++++
.../q35-multifunction.x86_64-latest.args | 52 ++++++
...rgs => q35-pcie-autoadd.x86_64-4.2.0.args} | 36 ++--
.../q35-pcie-autoadd.x86_64-latest.args | 66 ++++++++
...5-pcie.args => q35-pcie.x86_64-4.2.0.args} | 34 ++--
.../q35-pcie.x86_64-latest.args | 67 ++++++++
... q35-virt-manager-basic.x86_64-4.2.0.args} | 21 ++-
.../q35-virt-manager-basic.x86_64-latest.args | 63 +++++++
tests/qemuxml2argvdata/q35-virtio-pci.args | 64 -------
tests/qemuxml2argvdata/q35-virtio-pci.xml | 1 -
tests/qemuxml2argvtest.c | 157 +++---------------
...h64-virtio-pci-default.aarch64-latest.xml} | 12 +-
...ev-scsi-vhost-scsi-pcie.x86_64-latest.xml} | 3 +
...35-default-devices-only.x86_64-latest.xml} | 11 +-
...ml => q35-multifunction.x86_64-latest.xml} | 41 ++---
...xml => q35-pcie-autoadd.x86_64-latest.xml} | 31 ++--
...35-pcie.xml => q35-pcie.x86_64-latest.xml} | 29 ++--
... q35-virt-manager-basic.x86_64-latest.xml} | 15 +-
tests/qemuxml2xmloutdata/q35-virtio-pci.xml | 154 -----------------
tests/qemuxml2xmltest.c | 142 +---------------
56 files changed, 610 insertions(+), 714 deletions(-)
rename tests/qemuxml2argvdata/{aarch64-virtio-pci-default.args => aarch64-virtio-pci-default.aarch64-4.2.0.args} (71%)
create mode 100644 tests/qemuxml2argvdata/aarch64-virtio-pci-default.aarch64-latest.args
rename tests/qemuxml2argvdata/{hostdev-scsi-vhost-scsi-pcie.args => hostdev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args} (88%)
create mode 100644 tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.args
rename tests/qemuxml2argvdata/{q35-default-devices-only.args => q35-default-devices-only.x86_64-4.2.0.args} (67%)
create mode 100644 tests/qemuxml2argvdata/q35-default-devices-only.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/q35-multifunction.args
create mode 100644 tests/qemuxml2argvdata/q35-multifunction.x86_64-4.2.0.args
create mode 100644 tests/qemuxml2argvdata/q35-multifunction.x86_64-latest.args
rename tests/qemuxml2argvdata/{q35-pcie-autoadd.args => q35-pcie-autoadd.x86_64-4.2.0.args} (59%)
create mode 100644 tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-latest.args
rename tests/qemuxml2argvdata/{q35-pcie.args => q35-pcie.x86_64-4.2.0.args} (62%)
create mode 100644 tests/qemuxml2argvdata/q35-pcie.x86_64-latest.args
rename tests/qemuxml2argvdata/{q35-virt-manager-basic.args => q35-virt-manager-basic.x86_64-4.2.0.args} (75%)
create mode 100644 tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/q35-virtio-pci.args
delete mode 120000 tests/qemuxml2argvdata/q35-virtio-pci.xml
rename tests/qemuxml2xmloutdata/{aarch64-virtio-pci-default.xml => aarch64-virtio-pci-default.aarch64-latest.xml} (93%)
rename tests/qemuxml2xmloutdata/{hostdev-scsi-vhost-scsi-pcie.xml => hostdev-scsi-vhost-scsi-pcie.x86_64-latest.xml} (94%)
rename tests/qemuxml2xmloutdata/{q35-default-devices-only.xml => q35-default-devices-only.x86_64-latest.xml} (86%)
rename tests/qemuxml2xmloutdata/{q35-multifunction.xml => q35-multifunction.x86_64-latest.xml} (85%)
rename tests/qemuxml2xmloutdata/{q35-pcie-autoadd.xml => q35-pcie-autoadd.x86_64-latest.xml} (90%)
rename tests/qemuxml2xmloutdata/{q35-pcie.xml => q35-pcie.x86_64-latest.xml} (91%)
rename tests/qemuxml2xmloutdata/{q35-virt-manager-basic.xml => q35-virt-manager-basic.x86_64-latest.xml} (93%)
delete mode 100644 tests/qemuxml2xmloutdata/q35-virtio-pci.xml
--
2.37.1
2 years, 3 months