[libvirt RFC 0/5] introduce virFileDirect API for block-friendly read/write
by Claudio Fontana
As a spin-off from the previous multifd series,
this series offers a basic API for virfile.c to deal with reading and
writing files opened with O_DIRECT.
It applies this new API in the virFileDiskCopy code currently used
for iohelper, and reworks the saveimage code and on-disk lengths
to be O_DIRECT friendly.
This series is also available at:
https://gitlab.com/hw-claudio/libvirt.git "directio"
Gitlab successful pipeline is at:
https://gitlab.com/hw-claudio/libvirt/-/pipelines/546635704
Thank you for your feedback,
Claudio
Claudio Fontana (5):
virfile: introduce virFileDirect APIs
virfile: use virFileDirect API in runIOCopy
qemu: saveimage: rework image read/write to be O_DIRECT friendly
qemu: saveimage: assume future formats will also support compression
virfile: virFileDiskCopy: prepare for O_DIRECT files without wrapper
src/libvirt_private.syms | 8 +
src/qemu/qemu_saveimage.c | 269 ++++++++++++++++++++------------
src/qemu/qemu_saveimage.h | 20 ++-
src/util/virfile.c | 316 +++++++++++++++++++++++++++++++++-----
src/util/virfile.h | 11 ++
5 files changed, 476 insertions(+), 148 deletions(-)
--
2.26.2
2 years, 6 months
[libvirt PATCH 00/11] syntax-check: Minimize http_sites
by Andrea Bolognani
Reduce the number of exceptions we keep around by various
means.
Andrea Bolognani (11):
syntax-check: Drop unused http_sites
docs: apps: Drop Tivoli Provisioning Manager
docs: apps: Drop Cracow Cloud One
docs: apps: Drop Snooze
util: Drop references to netlink.pdf
docs: Use more generic URL for netcat
docs: Update URL for libxml2
docs: Update URL for MinGW
docs: Update various URLs
docs: Use HTTPS where possible
src: Use archive.org for dead URLs
build-aux/syntax-check.mk | 18 +-----------------
ci/README.rst | 6 +++---
docs/apps.rst | 22 +++-------------------
docs/drvhyperv.rst | 2 +-
docs/drvlxc.rst | 2 +-
docs/remote.rst | 2 +-
docs/uri.rst | 2 +-
docs/windows.rst | 4 ++--
src/conf/nwfilter_conf.c | 4 ++--
src/conf/schemas/basictypes.rng | 2 +-
src/util/virnetdevmacvlan.c | 5 +----
src/util/virnetlink.c | 4 +---
tests/openvzutilstest.conf | 2 +-
13 files changed, 19 insertions(+), 56 deletions(-)
--
2.35.3
2 years, 6 months
[PATCH v2 0/2] ppc64: POWER10 support
by Daniel Henrique Barboza
Changes in v2:
- dropped former patch 01 since qemu ppc64 caps are up to date for 7.0.0
- v1 link: https://listman.redhat.com/archives/libvir-list/2022-May/230686.html
Daniel Henrique Barboza (2):
cpu_map: add POWER10 cpu model
cpu_ppc64: add support for host-model on POWER10
src/cpu/cpu_ppc64.c | 8 ++---
src/cpu_map/index.xml | 1 +
src/cpu_map/meson.build | 1 +
src/cpu_map/ppc64_POWER10.xml | 6 ++++
tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 1 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 4 +--
.../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 4 +--
.../qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 4 +--
.../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 4 +--
.../pseries-cpu-compat-power10.args | 32 +++++++++++++++++++
.../pseries-cpu-compat-power10.err | 1 +
.../pseries-cpu-compat-power10.xml | 21 ++++++++++++
tests/qemuxml2argvtest.c | 11 +++++++
tests/testutilshostcpus.h | 11 +++++++
tests/testutilsqemu.c | 4 ++-
tests/testutilsqemu.h | 1 +
19 files changed, 104 insertions(+), 13 deletions(-)
create mode 100644 src/cpu_map/ppc64_POWER10.xml
create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.args
create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.err
create mode 100644 tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml
--
2.32.0
2 years, 6 months
[libvirt PATCH 00/13] syntax-check: Cleanups and improvements
by Andrea Bolognani
$ meson test --suite blurb
Andrea Bolognani (13):
syntax-check: Drop sc_bindtextdomain check
syntax-check: Remove sc_gettext_init exception
syntax-check: Remove sc_copyright_usage exception
syntax-check: Improve sc_prohibit_config_h_in_headers check
syntax-check: Use VC_LIST_EXCEPT in sc_prohibit_backup_files
syntax-check: Simplify VC_LIST_ALWAYS_EXCLUDE_REGEX
syntax-check: Drop unused machinery
syntax-check: Drop ME variable
syntax-check: Detect awk the same as all other programs
syntax-check: Reorganize file
syntax-check: Add all target
syntax-check: Drop sc_ prefix when adding checks to meson
syntax-check: Enforce sc_prohibit_backslash_alignment everywhere
build-aux/Makefile.in | 1 +
build-aux/meson.build | 7 +-
build-aux/syntax-check.mk | 773 ++++++++++++++++++--------------------
ci/Makefile | 2 +-
4 files changed, 365 insertions(+), 418 deletions(-)
--
2.35.3
2 years, 6 months
[PATCH] qemu_hotplug: Deny changing @rss and @rss_hash_report attributes of virtio vNICs
by Michal Privoznik
We have virDomainUpdateDeviceFlags() API that allows changing of
some attributes of a device whilst domain is still running (e.g.
setting different QoS, link state change on vNICs). But only very
limited set of attributes can be changed and we have to check
whether user isn't trying to sneak in a change that's not
allowed. Well, in case of a virtio vNIC we forgot to check for
@rss and @rss_hash_report attributes of <driver/>.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2082540
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 24df66cc9f..f795568299 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3662,7 +3662,9 @@ qemuDomainChangeNet(virQEMUDriver *driver,
olddev->driver.virtio.guest.tso4 != newdev->driver.virtio.guest.tso4 ||
olddev->driver.virtio.guest.tso6 != newdev->driver.virtio.guest.tso6 ||
olddev->driver.virtio.guest.ecn != newdev->driver.virtio.guest.ecn ||
- olddev->driver.virtio.guest.ufo != newdev->driver.virtio.guest.ufo)) {
+ olddev->driver.virtio.guest.ufo != newdev->driver.virtio.guest.ufo ||
+ olddev->driver.virtio.rss != newdev->driver.virtio.rss ||
+ olddev->driver.virtio.rss_hash_report != newdev->driver.virtio.rss_hash_report)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cannot modify virtio network device driver attributes"));
goto cleanup;
--
2.35.1
2 years, 6 months
[PATCH] nodedev: prevent internal error on dev_busid parse
by Boris Fiuczynski
As "none" is a legal value represented in the sysfs attribute dev_busid
this patch prevents libvirt from incorrectly reporting an internal error.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
Suggested-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/node_device/node_device_udev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 656130e98a..44ec22cf75 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1140,7 +1140,7 @@ udevProcessCSS(struct udev_device *device,
/* process optional channel devices information */
udevGetStringSysfsAttr(device, "dev_busid", &dev_busid);
- if (dev_busid != NULL)
+ if (dev_busid != NULL && STRNEQ(dev_busid, "none"))
def->caps->data.ccw_dev.channel_dev_addr = virCCWDeviceAddressFromString(dev_busid);
if (virNodeDeviceGetCSSDynamicCaps(def->sysfs_path, &def->caps->data.ccw_dev) < 0)
--
2.36.1
2 years, 6 months
[PATCH] qemuxml2xmltests.c: convert pseries tests to DO_TEST_CAPS_ARCH_LATEST
by Daniel Henrique Barboza
qemuxml2xmltests that have "pseries" in the name now use the
DO_TEST_CAPS_LATEST_ARCH() macro.
Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
...ies.xml => panic-pseries.ppc64-latest.xml} | 5 +-
.../pseries-console-native.ppc64-latest.xml | 1 +
.../pseries-console-native.xml | 1 -
...> pseries-console-virtio.ppc64-latest.xml} | 3 +
...series-cpu-compat-power9.ppc64-latest.xml} | 2 +-
...ml => pseries-cpu-compat.ppc64-latest.xml} | 2 +-
...xml => pseries-cpu-exact.ppc64-latest.xml} | 2 +-
....xml => pseries-features.ppc64-latest.xml} | 3 +
...ml => pseries-hostdevs-1.ppc64-latest.xml} | 3 +
...ml => pseries-hostdevs-2.ppc64-latest.xml} | 3 +
...ml => pseries-hostdevs-3.ppc64-latest.xml} | 3 +
... => pseries-many-buses-1.ppc64-latest.xml} | 3 +
... => pseries-many-buses-2.ppc64-latest.xml} | 3 +
... => pseries-many-devices.ppc64-latest.xml} | 3 +
...ram.xml => pseries-nvram.ppc64-latest.xml} | 5 +-
...=> pseries-panic-missing.ppc64-latest.xml} | 5 +-
...pseries-panic-no-address.ppc64-latest.xml} | 5 +-
...ries-phb-default-missing.ppc64-latest.xml} | 11 +-
...=> pseries-phb-numa-node.ppc64-latest.xml} | 3 +-
...ml => pseries-phb-simple.ppc64-latest.xml} | 11 +-
...ies-serial+console-native.ppc64-latest.xml | 1 +
.../pseries-serial+console-native.xml | 1 -
.../pseries-serial-compat.ppc64-latest.xml | 1 +
.../pseries-serial-compat.xml | 1 -
...=> pseries-serial-native.ppc64-latest.xml} | 3 +
...ml => pseries-serial-pci.ppc64-latest.xml} | 3 +
...ml => pseries-serial-usb.ppc64-latest.xml} | 3 +
tests/qemuxml2xmltest.c | 107 +++++-------------
28 files changed, 99 insertions(+), 98 deletions(-)
rename tests/qemuxml2xmloutdata/{panic-pseries.xml => panic-pseries.ppc64-latest.xml} (88%)
create mode 120000 tests/qemuxml2xmloutdata/pseries-console-native.ppc64-latest.xml
delete mode 120000 tests/qemuxml2xmloutdata/pseries-console-native.xml
rename tests/qemuxml2xmloutdata/{pseries-console-virtio.xml => pseries-console-virtio.ppc64-latest.xml} (91%)
rename tests/qemuxml2xmloutdata/{pseries-cpu-compat-power9.xml => pseries-cpu-compat-power9.ppc64-latest.xml} (95%)
rename tests/qemuxml2xmloutdata/{pseries-cpu-compat.xml => pseries-cpu-compat.ppc64-latest.xml} (95%)
rename tests/qemuxml2xmloutdata/{pseries-cpu-exact.xml => pseries-cpu-exact.ppc64-latest.xml} (95%)
rename tests/qemuxml2xmloutdata/{pseries-features.xml => pseries-features.ppc64-latest.xml} (91%)
rename tests/qemuxml2xmloutdata/{pseries-hostdevs-1.xml => pseries-hostdevs-1.ppc64-latest.xml} (95%)
rename tests/qemuxml2xmloutdata/{pseries-hostdevs-2.xml => pseries-hostdevs-2.ppc64-latest.xml} (94%)
rename tests/qemuxml2xmloutdata/{pseries-hostdevs-3.xml => pseries-hostdevs-3.ppc64-latest.xml} (94%)
rename tests/qemuxml2xmloutdata/{pseries-many-buses-1.xml => pseries-many-buses-1.ppc64-latest.xml} (91%)
rename tests/qemuxml2xmloutdata/{pseries-many-buses-2.xml => pseries-many-buses-2.ppc64-latest.xml} (91%)
rename tests/qemuxml2xmloutdata/{pseries-many-devices.xml => pseries-many-devices.ppc64-latest.xml} (98%)
rename tests/qemuxml2xmloutdata/{pseries-nvram.xml => pseries-nvram.ppc64-latest.xml} (85%)
rename tests/qemuxml2xmloutdata/{pseries-panic-missing.xml => pseries-panic-missing.ppc64-latest.xml} (88%)
rename tests/qemuxml2xmloutdata/{pseries-panic-no-address.xml => pseries-panic-no-address.ppc64-latest.xml} (88%)
rename tests/qemuxml2xmloutdata/{pseries-phb-simple.xml => pseries-phb-default-missing.ppc64-latest.xml} (91%)
rename tests/qemuxml2xmloutdata/{pseries-phb-numa-node.xml => pseries-phb-numa-node.ppc64-latest.xml} (94%)
rename tests/qemuxml2xmloutdata/{pseries-phb-default-missing.xml => pseries-phb-simple.ppc64-latest.xml} (91%)
create mode 120000 tests/qemuxml2xmloutdata/pseries-serial+console-native.ppc64-latest.xml
delete mode 120000 tests/qemuxml2xmloutdata/pseries-serial+console-native.xml
create mode 120000 tests/qemuxml2xmloutdata/pseries-serial-compat.ppc64-latest.xml
delete mode 120000 tests/qemuxml2xmloutdata/pseries-serial-compat.xml
rename tests/qemuxml2xmloutdata/{pseries-serial-native.xml => pseries-serial-native.ppc64-latest.xml} (91%)
rename tests/qemuxml2xmloutdata/{pseries-serial-pci.xml => pseries-serial-pci.ppc64-latest.xml} (90%)
rename tests/qemuxml2xmloutdata/{pseries-serial-usb.xml => pseries-serial-usb.ppc64-latest.xml} (91%)
diff --git a/tests/qemuxml2xmloutdata/panic-pseries.xml b/tests/qemuxml2xmloutdata/panic-pseries.ppc64-latest.xml
similarity index 88%
rename from tests/qemuxml2xmloutdata/panic-pseries.xml
rename to tests/qemuxml2xmloutdata/panic-pseries.ppc64-latest.xml
index cebb977d5a..f22634994c 100644
--- a/tests/qemuxml2xmloutdata/panic-pseries.xml
+++ b/tests/qemuxml2xmloutdata/panic-pseries.ppc64-latest.xml
@@ -8,13 +8,16 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='pci-ohci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
diff --git a/tests/qemuxml2xmloutdata/pseries-console-native.ppc64-latest.xml b/tests/qemuxml2xmloutdata/pseries-console-native.ppc64-latest.xml
new file mode 120000
index 0000000000..78d6d489ee
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/pseries-console-native.ppc64-latest.xml
@@ -0,0 +1 @@
+pseries-serial-native.ppc64-latest.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/pseries-console-native.xml b/tests/qemuxml2xmloutdata/pseries-console-native.xml
deleted file mode 120000
index 0d45a892c8..0000000000
--- a/tests/qemuxml2xmloutdata/pseries-console-native.xml
+++ /dev/null
@@ -1 +0,0 @@
-pseries-serial-native.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/pseries-console-virtio.xml b/tests/qemuxml2xmloutdata/pseries-console-virtio.ppc64-latest.xml
similarity index 91%
rename from tests/qemuxml2xmloutdata/pseries-console-virtio.xml
rename to tests/qemuxml2xmloutdata/pseries-console-virtio.ppc64-latest.xml
index 0a44ea36bc..02e3d0136e 100644
--- a/tests/qemuxml2xmloutdata/pseries-console-virtio.xml
+++ b/tests/qemuxml2xmloutdata/pseries-console-virtio.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/pseries-cpu-compat-power9.xml b/tests/qemuxml2xmloutdata/pseries-cpu-compat-power9.ppc64-latest.xml
similarity index 95%
rename from tests/qemuxml2xmloutdata/pseries-cpu-compat-power9.xml
rename to tests/qemuxml2xmloutdata/pseries-cpu-compat-power9.ppc64-latest.xml
index 93d692be0c..20843f8989 100644
--- a/tests/qemuxml2xmloutdata/pseries-cpu-compat-power9.xml
+++ b/tests/qemuxml2xmloutdata/pseries-cpu-compat-power9.ppc64-latest.xml
@@ -17,7 +17,7 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='pci-ohci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
diff --git a/tests/qemuxml2xmloutdata/pseries-cpu-compat.xml b/tests/qemuxml2xmloutdata/pseries-cpu-compat.ppc64-latest.xml
similarity index 95%
rename from tests/qemuxml2xmloutdata/pseries-cpu-compat.xml
rename to tests/qemuxml2xmloutdata/pseries-cpu-compat.ppc64-latest.xml
index 4b880df610..066708990c 100644
--- a/tests/qemuxml2xmloutdata/pseries-cpu-compat.xml
+++ b/tests/qemuxml2xmloutdata/pseries-cpu-compat.ppc64-latest.xml
@@ -17,7 +17,7 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='pci-ohci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
diff --git a/tests/qemuxml2xmloutdata/pseries-cpu-exact.xml b/tests/qemuxml2xmloutdata/pseries-cpu-exact.ppc64-latest.xml
similarity index 95%
rename from tests/qemuxml2xmloutdata/pseries-cpu-exact.xml
rename to tests/qemuxml2xmloutdata/pseries-cpu-exact.ppc64-latest.xml
index a8e88d012f..307d434051 100644
--- a/tests/qemuxml2xmloutdata/pseries-cpu-exact.xml
+++ b/tests/qemuxml2xmloutdata/pseries-cpu-exact.ppc64-latest.xml
@@ -18,7 +18,7 @@
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='pci-ohci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
diff --git a/tests/qemuxml2xmloutdata/pseries-features.xml b/tests/qemuxml2xmloutdata/pseries-features.ppc64-latest.xml
similarity index 91%
rename from tests/qemuxml2xmloutdata/pseries-features.xml
rename to tests/qemuxml2xmloutdata/pseries-features.ppc64-latest.xml
index 94a8f6a66f..c211da4fb7 100644
--- a/tests/qemuxml2xmloutdata/pseries-features.xml
+++ b/tests/qemuxml2xmloutdata/pseries-features.ppc64-latest.xml
@@ -19,6 +19,9 @@
<sbbc value='broken'/>
<ibs value='fixed-ccd'/>
</features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/pseries-hostdevs-1.xml b/tests/qemuxml2xmloutdata/pseries-hostdevs-1.ppc64-latest.xml
similarity index 95%
rename from tests/qemuxml2xmloutdata/pseries-hostdevs-1.xml
rename to tests/qemuxml2xmloutdata/pseries-hostdevs-1.ppc64-latest.xml
index cff29a97c2..db369a1fc7 100644
--- a/tests/qemuxml2xmloutdata/pseries-hostdevs-1.xml
+++ b/tests/qemuxml2xmloutdata/pseries-hostdevs-1.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/pseries-hostdevs-2.xml b/tests/qemuxml2xmloutdata/pseries-hostdevs-2.ppc64-latest.xml
similarity index 94%
rename from tests/qemuxml2xmloutdata/pseries-hostdevs-2.xml
rename to tests/qemuxml2xmloutdata/pseries-hostdevs-2.ppc64-latest.xml
index 598513d784..09b657698d 100644
--- a/tests/qemuxml2xmloutdata/pseries-hostdevs-2.xml
+++ b/tests/qemuxml2xmloutdata/pseries-hostdevs-2.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/pseries-hostdevs-3.xml b/tests/qemuxml2xmloutdata/pseries-hostdevs-3.ppc64-latest.xml
similarity index 94%
rename from tests/qemuxml2xmloutdata/pseries-hostdevs-3.xml
rename to tests/qemuxml2xmloutdata/pseries-hostdevs-3.ppc64-latest.xml
index a1f00ddc7f..58ffb09c3b 100644
--- a/tests/qemuxml2xmloutdata/pseries-hostdevs-3.xml
+++ b/tests/qemuxml2xmloutdata/pseries-hostdevs-3.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/pseries-many-buses-1.xml b/tests/qemuxml2xmloutdata/pseries-many-buses-1.ppc64-latest.xml
similarity index 91%
rename from tests/qemuxml2xmloutdata/pseries-many-buses-1.xml
rename to tests/qemuxml2xmloutdata/pseries-many-buses-1.ppc64-latest.xml
index 45521c907a..dbc5d0a94c 100644
--- a/tests/qemuxml2xmloutdata/pseries-many-buses-1.xml
+++ b/tests/qemuxml2xmloutdata/pseries-many-buses-1.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/pseries-many-buses-2.xml b/tests/qemuxml2xmloutdata/pseries-many-buses-2.ppc64-latest.xml
similarity index 91%
rename from tests/qemuxml2xmloutdata/pseries-many-buses-2.xml
rename to tests/qemuxml2xmloutdata/pseries-many-buses-2.ppc64-latest.xml
index 0b1f670b3f..f9c5a78edd 100644
--- a/tests/qemuxml2xmloutdata/pseries-many-buses-2.xml
+++ b/tests/qemuxml2xmloutdata/pseries-many-buses-2.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/pseries-many-devices.xml b/tests/qemuxml2xmloutdata/pseries-many-devices.ppc64-latest.xml
similarity index 98%
rename from tests/qemuxml2xmloutdata/pseries-many-devices.xml
rename to tests/qemuxml2xmloutdata/pseries-many-devices.ppc64-latest.xml
index 3c23523c60..5abf023b48 100644
--- a/tests/qemuxml2xmloutdata/pseries-many-devices.xml
+++ b/tests/qemuxml2xmloutdata/pseries-many-devices.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/pseries-nvram.xml b/tests/qemuxml2xmloutdata/pseries-nvram.ppc64-latest.xml
similarity index 85%
rename from tests/qemuxml2xmloutdata/pseries-nvram.xml
rename to tests/qemuxml2xmloutdata/pseries-nvram.ppc64-latest.xml
index 278222ddea..c7a36df4e2 100644
--- a/tests/qemuxml2xmloutdata/pseries-nvram.xml
+++ b/tests/qemuxml2xmloutdata/pseries-nvram.ppc64-latest.xml
@@ -8,13 +8,16 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='pci-ohci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
diff --git a/tests/qemuxml2xmloutdata/pseries-panic-missing.xml b/tests/qemuxml2xmloutdata/pseries-panic-missing.ppc64-latest.xml
similarity index 88%
rename from tests/qemuxml2xmloutdata/pseries-panic-missing.xml
rename to tests/qemuxml2xmloutdata/pseries-panic-missing.ppc64-latest.xml
index cebb977d5a..f22634994c 100644
--- a/tests/qemuxml2xmloutdata/pseries-panic-missing.xml
+++ b/tests/qemuxml2xmloutdata/pseries-panic-missing.ppc64-latest.xml
@@ -8,13 +8,16 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='pci-ohci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
diff --git a/tests/qemuxml2xmloutdata/pseries-panic-no-address.xml b/tests/qemuxml2xmloutdata/pseries-panic-no-address.ppc64-latest.xml
similarity index 88%
rename from tests/qemuxml2xmloutdata/pseries-panic-no-address.xml
rename to tests/qemuxml2xmloutdata/pseries-panic-no-address.ppc64-latest.xml
index cebb977d5a..f22634994c 100644
--- a/tests/qemuxml2xmloutdata/pseries-panic-no-address.xml
+++ b/tests/qemuxml2xmloutdata/pseries-panic-no-address.ppc64-latest.xml
@@ -8,13 +8,16 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
- <controller type='usb' index='0'>
+ <controller type='usb' index='0' model='pci-ohci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
diff --git a/tests/qemuxml2xmloutdata/pseries-phb-simple.xml b/tests/qemuxml2xmloutdata/pseries-phb-default-missing.ppc64-latest.xml
similarity index 91%
rename from tests/qemuxml2xmloutdata/pseries-phb-simple.xml
rename to tests/qemuxml2xmloutdata/pseries-phb-default-missing.ppc64-latest.xml
index 9fa36ca3df..db513febad 100644
--- a/tests/qemuxml2xmloutdata/pseries-phb-simple.xml
+++ b/tests/qemuxml2xmloutdata/pseries-phb-default-missing.ppc64-latest.xml
@@ -8,16 +8,15 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
- <controller type='pci' index='0' model='pci-root'>
- <model name='spapr-pci-host-bridge'/>
- <target index='0'/>
- </controller>
<controller type='pci' index='1' model='pci-root'>
<model name='spapr-pci-host-bridge'/>
<target index='1'/>
@@ -27,6 +26,10 @@
<target index='2'/>
</controller>
<controller type='usb' index='0' model='none'/>
+ <controller type='pci' index='0' model='pci-root'>
+ <model name='spapr-pci-host-bridge'/>
+ <target index='0'/>
+ </controller>
<audio id='1' type='none'/>
<memballoon model='none'/>
<panic model='pseries'/>
diff --git a/tests/qemuxml2xmloutdata/pseries-phb-numa-node.xml b/tests/qemuxml2xmloutdata/pseries-phb-numa-node.ppc64-latest.xml
similarity index 94%
rename from tests/qemuxml2xmloutdata/pseries-phb-numa-node.xml
rename to tests/qemuxml2xmloutdata/pseries-phb-numa-node.ppc64-latest.xml
index 56d8ee9f86..59015846fb 100644
--- a/tests/qemuxml2xmloutdata/pseries-phb-numa-node.xml
+++ b/tests/qemuxml2xmloutdata/pseries-phb-numa-node.ppc64-latest.xml
@@ -12,7 +12,8 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
- <cpu>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
<topology sockets='2' dies='1' cores='1' threads='4'/>
<numa>
<cell id='0' cpus='0-3' memory='1048576' unit='KiB'/>
diff --git a/tests/qemuxml2xmloutdata/pseries-phb-default-missing.xml b/tests/qemuxml2xmloutdata/pseries-phb-simple.ppc64-latest.xml
similarity index 91%
rename from tests/qemuxml2xmloutdata/pseries-phb-default-missing.xml
rename to tests/qemuxml2xmloutdata/pseries-phb-simple.ppc64-latest.xml
index 9966c89167..80231e3dd7 100644
--- a/tests/qemuxml2xmloutdata/pseries-phb-default-missing.xml
+++ b/tests/qemuxml2xmloutdata/pseries-phb-simple.ppc64-latest.xml
@@ -8,12 +8,19 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
+ <controller type='pci' index='0' model='pci-root'>
+ <model name='spapr-pci-host-bridge'/>
+ <target index='0'/>
+ </controller>
<controller type='pci' index='1' model='pci-root'>
<model name='spapr-pci-host-bridge'/>
<target index='1'/>
@@ -23,10 +30,6 @@
<target index='2'/>
</controller>
<controller type='usb' index='0' model='none'/>
- <controller type='pci' index='0' model='pci-root'>
- <model name='spapr-pci-host-bridge'/>
- <target index='0'/>
- </controller>
<audio id='1' type='none'/>
<memballoon model='none'/>
<panic model='pseries'/>
diff --git a/tests/qemuxml2xmloutdata/pseries-serial+console-native.ppc64-latest.xml b/tests/qemuxml2xmloutdata/pseries-serial+console-native.ppc64-latest.xml
new file mode 120000
index 0000000000..78d6d489ee
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/pseries-serial+console-native.ppc64-latest.xml
@@ -0,0 +1 @@
+pseries-serial-native.ppc64-latest.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/pseries-serial+console-native.xml b/tests/qemuxml2xmloutdata/pseries-serial+console-native.xml
deleted file mode 120000
index 0d45a892c8..0000000000
--- a/tests/qemuxml2xmloutdata/pseries-serial+console-native.xml
+++ /dev/null
@@ -1 +0,0 @@
-pseries-serial-native.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/pseries-serial-compat.ppc64-latest.xml b/tests/qemuxml2xmloutdata/pseries-serial-compat.ppc64-latest.xml
new file mode 120000
index 0000000000..78d6d489ee
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/pseries-serial-compat.ppc64-latest.xml
@@ -0,0 +1 @@
+pseries-serial-native.ppc64-latest.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/pseries-serial-compat.xml b/tests/qemuxml2xmloutdata/pseries-serial-compat.xml
deleted file mode 120000
index 0d45a892c8..0000000000
--- a/tests/qemuxml2xmloutdata/pseries-serial-compat.xml
+++ /dev/null
@@ -1 +0,0 @@
-pseries-serial-native.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmloutdata/pseries-serial-native.xml b/tests/qemuxml2xmloutdata/pseries-serial-native.ppc64-latest.xml
similarity index 91%
rename from tests/qemuxml2xmloutdata/pseries-serial-native.xml
rename to tests/qemuxml2xmloutdata/pseries-serial-native.ppc64-latest.xml
index 299ae61081..ebe7b5738b 100644
--- a/tests/qemuxml2xmloutdata/pseries-serial-native.xml
+++ b/tests/qemuxml2xmloutdata/pseries-serial-native.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/pseries-serial-pci.xml b/tests/qemuxml2xmloutdata/pseries-serial-pci.ppc64-latest.xml
similarity index 90%
rename from tests/qemuxml2xmloutdata/pseries-serial-pci.xml
rename to tests/qemuxml2xmloutdata/pseries-serial-pci.ppc64-latest.xml
index e7517008ca..803bc55010 100644
--- a/tests/qemuxml2xmloutdata/pseries-serial-pci.xml
+++ b/tests/qemuxml2xmloutdata/pseries-serial-pci.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmloutdata/pseries-serial-usb.xml b/tests/qemuxml2xmloutdata/pseries-serial-usb.ppc64-latest.xml
similarity index 91%
rename from tests/qemuxml2xmloutdata/pseries-serial-usb.xml
rename to tests/qemuxml2xmloutdata/pseries-serial-usb.ppc64-latest.xml
index 4d5989ef4f..3a69273d39 100644
--- a/tests/qemuxml2xmloutdata/pseries-serial-usb.xml
+++ b/tests/qemuxml2xmloutdata/pseries-serial-usb.ppc64-latest.xml
@@ -8,6 +8,9 @@
<type arch='ppc64' machine='pseries'>hvm</type>
<boot dev='hd'/>
</os>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>POWER9</model>
+ </cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index bef8c4e010..9ac43d3294 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -691,77 +691,30 @@ mymain(void)
QEMU_CAPS_OBJECT_RNG_EGD);
DO_TEST_CAPS_LATEST("virtio-rng-builtin");
- DO_TEST("pseries-nvram",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_DEVICE_NVRAM);
- DO_TEST("pseries-panic-missing",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
- DO_TEST("pseries-panic-no-address",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
-
- DO_TEST("pseries-phb-simple",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
- DO_TEST("pseries-phb-default-missing",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
- DO_TEST("pseries-phb-numa-node",
- QEMU_CAPS_NUMA,
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE,
- QEMU_CAPS_OBJECT_MEMORY_FILE);
-
- DO_TEST("pseries-many-devices",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_VIRTIO_SCSI);
- DO_TEST("pseries-many-buses-1",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_VIRTIO_SCSI);
- DO_TEST("pseries-many-buses-2",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_VIRTIO_SCSI);
- DO_TEST("pseries-hostdevs-1",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_VIRTIO_SCSI,
- QEMU_CAPS_DEVICE_VFIO_PCI);
- DO_TEST("pseries-hostdevs-2",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_VIRTIO_SCSI,
- QEMU_CAPS_DEVICE_VFIO_PCI);
- DO_TEST("pseries-hostdevs-3",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_VIRTIO_SCSI,
- QEMU_CAPS_DEVICE_VFIO_PCI);
-
- DO_TEST("pseries-features",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE,
- QEMU_CAPS_MACHINE_PSERIES_CAP_HTM,
- QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV,
- QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST,
- QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC,
- QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC,
- QEMU_CAPS_MACHINE_PSERIES_CAP_IBS);
-
- DO_TEST("pseries-serial-native",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_DEVICE_SPAPR_VTY);
- DO_TEST("pseries-serial+console-native",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_DEVICE_SPAPR_VTY);
- DO_TEST("pseries-serial-compat",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_DEVICE_SPAPR_VTY);
- DO_TEST("pseries-serial-pci",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_DEVICE_PCI_SERIAL);
- DO_TEST("pseries-serial-usb",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_DEVICE_QEMU_XHCI,
- QEMU_CAPS_DEVICE_USB_SERIAL);
- DO_TEST("pseries-console-native",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
- QEMU_CAPS_DEVICE_SPAPR_VTY);
- DO_TEST("pseries-console-virtio",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
+ DO_TEST_CAPS_ARCH_LATEST("pseries-nvram", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-panic-missing", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-panic-no-address", "ppc64");
+
+ DO_TEST_CAPS_ARCH_LATEST("pseries-phb-simple", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-phb-default-missing", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-phb-numa-node", "ppc64");
+
+ DO_TEST_CAPS_ARCH_LATEST("pseries-many-devices", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-many-buses-1", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-many-buses-2", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-hostdevs-1", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-hostdevs-2", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-hostdevs-3", "ppc64");
+
+ DO_TEST_CAPS_ARCH_LATEST("pseries-features", "ppc64");
+
+ DO_TEST_CAPS_ARCH_LATEST("pseries-serial-native", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-serial+console-native", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-serial-compat", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-serial-pci", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-serial-usb", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-console-native", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-console-virtio", "ppc64");
DO_TEST_NOCAPS("mach-virt-serial-native");
DO_TEST_NOCAPS("mach-virt-serial+console-native");
@@ -1087,10 +1040,9 @@ mymain(void)
QEMU_CAPS_Q35_PCI_HOLE64_SIZE);
DO_TEST("panic", QEMU_CAPS_DEVICE_PANIC);
- DO_TEST("panic-pseries",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
DO_TEST("panic-double", QEMU_CAPS_DEVICE_PANIC);
DO_TEST("panic-no-address", QEMU_CAPS_DEVICE_PANIC);
+ DO_TEST_CAPS_ARCH_LATEST("panic-pseries", "ppc64");
DO_TEST_NOCAPS("disk-backing-chains");
DO_TEST_NOCAPS("disk-backing-chains-index");
@@ -1333,12 +1285,9 @@ mymain(void)
QEMU_CAPS_DEVICE_CIRRUS_VGA);
DO_TEST("smartcard-controller", QEMU_CAPS_CCID_EMULATED);
- DO_TEST("pseries-cpu-compat-power9",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
- DO_TEST("pseries-cpu-compat",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
- DO_TEST("pseries-cpu-exact",
- QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
+ DO_TEST_CAPS_ARCH_LATEST("pseries-cpu-compat-power9", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-cpu-compat", "ppc64");
+ DO_TEST_CAPS_ARCH_LATEST("pseries-cpu-exact", "ppc64");
DO_TEST("user-aliases",
QEMU_CAPS_DEVICE_CIRRUS_VGA,
--
2.32.0
2 years, 6 months
[PATCH 0/3] qemuxml2argvtest: add ARG_CAPS_HOST_CPU_MODEL
by Daniel Henrique Barboza
Hi,
This series attempts to fix a problem I found when converting the
"pseries-cpu-compat-power9" to use DO_TEST_CAPS_ARCH_LATEST* macros.
More information about the problem per se can be found in patch 02.
Patch 03 is where I was able to convert the said test.
Patch 01 is a trivial fix I found out when reading code.
Daniel Henrique Barboza (3):
qemu_capspriv.h: fix identation
testutilsqemu: introduce ARG_CAPS_HOST_CPU_MODEL
qemuxml2argvtest.c: use CAPS_ARCH_LATEST() with
pseries-cpu-compat-power9
src/qemu/qemu_capspriv.h | 4 +-
...eries-cpu-compat-power9.ppc64-latest.args} | 12 +++---
...series-cpu-compat-power9.ppc64-latest.err} | 0
tests/qemuxml2argvtest.c | 41 ++++++++++++-------
tests/testutilsqemu.c | 4 ++
tests/testutilsqemu.h | 18 ++++----
6 files changed, 49 insertions(+), 30 deletions(-)
rename tests/qemuxml2argvdata/{pseries-cpu-compat-power9.args => pseries-cpu-compat-power9.ppc64-latest.args} (60%)
rename tests/qemuxml2argvdata/{pseries-cpu-compat-power9.err => pseries-cpu-compat-power9.ppc64-latest.err} (100%)
--
2.32.0
2 years, 6 months
[PATCH 00/17] nodedev: add optional device address of channel device to css device
by Boris Fiuczynski
While this series started with the intend to add the optional device
address of a subchannel device to the nodedev css device the outcome now
also includes a small fix in the error reporting of css cap XML parsing
as well as a refactoring of generic ccw code into virccw in utils.
Boris Fiuczynski (17):
nodedev: fix reported error msg in css cap XML parsing
util: refactor virDomainDeviceCCWAddress into virccw.h
util: refactor virDomainCCWAddressAsString into virccw
util: make reuse of ccw device address format constant
util: refactor ccw address constants into virccw
util: refactor virDomainCCWAddressIncrement into virccw
util: refactor virDomainDeviceCCWAddressIsValid into virccw
util: refactor virDomainDeviceCCWAddressEqual into virccw
conf: adjust method name virDomainDeviceCCWAddressParseXML
util: add ccw device address parsing into virccw
util: add virCCWDeviceAddressFromString to virccw
nodedev: refactor css format from ccw format method
nodedev: refactor ccw device address parsing from XML
nodedev: refactor css XML parsing from ccw XML parsing
schemas: refactor out nodedev ccw address schema
nodedev: add optional device address of channel device to css device
nodedev: add tests for optional device address to css device
po/POTFILES.in | 1 +
src/conf/device_conf.c | 28 +--
src/conf/device_conf.h | 23 +--
src/conf/domain_addr.c | 28 +--
src/conf/domain_addr.h | 5 +-
src/conf/domain_conf.c | 19 +-
src/conf/domain_conf.h | 6 +-
src/conf/node_device_conf.c | 171 +++++++++++++-----
src/conf/node_device_conf.h | 2 +
src/conf/schemas/nodedev.rng | 27 +--
src/libvirt_private.syms | 14 +-
src/node_device/node_device_driver.c | 4 +-
src/node_device/node_device_udev.c | 16 +-
src/qemu/qemu_agent.c | 4 +-
src/qemu/qemu_agent.h | 2 +-
src/qemu/qemu_command.c | 2 +-
src/util/meson.build | 1 +
src/util/virccw.c | 103 +++++++++++
src/util/virccw.h | 52 ++++++
.../css_0_0_10000-invalid.xml | 10 +
...s_0_0_fffe_mdev_types_channel_dev_addr.xml | 22 +++
.../css_0_0_ffff_channel_dev_addr-invalid.xml | 15 ++
.../css_0_0_ffff_channel_dev_addr.xml | 15 ++
...s_0_0_fffe_mdev_types_channel_dev_addr.xml | 1 +
.../css_0_0_ffff_channel_dev_addr.xml | 1 +
tests/nodedevxml2xmltest.c | 2 +
26 files changed, 418 insertions(+), 156 deletions(-)
create mode 100644 src/util/virccw.c
create mode 100644 src/util/virccw.h
create mode 100644 tests/nodedevschemadata/css_0_0_10000-invalid.xml
create mode 100644 tests/nodedevschemadata/css_0_0_fffe_mdev_types_channel_dev_addr.xml
create mode 100644 tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr-invalid.xml
create mode 100644 tests/nodedevschemadata/css_0_0_ffff_channel_dev_addr.xml
create mode 120000 tests/nodedevxml2xmlout/css_0_0_fffe_mdev_types_channel_dev_addr.xml
create mode 120000 tests/nodedevxml2xmlout/css_0_0_ffff_channel_dev_addr.xml
--
2.33.1
2 years, 6 months
[libvirt PATCH] qemu: Do not return NULL when qemuMigrationSrcBegin succeeds
by Jiri Denemark
My recent commit v8.3.0-201-gc500955e95 tried to fix a regression which
would cause the function to return success even if virCloseCallbacksSet
failed. But due to a strange code flow in the function introduced an
opposite regression. The function would return NULL on success when
called without VIR_MIGRATE_CHANGE_PROTECTION flag.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_migration.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 38596fa4de..6cc68a567a 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2534,23 +2534,23 @@ qemuMigrationSrcBegin(virConnectPtr conn,
if (virCloseCallbacksSet(driver->closeCallbacks, vm, conn,
qemuMigrationSrcCleanup) < 0)
goto endjob;
- qemuMigrationJobContinue(vm);
- } else {
- goto endjob;
}
ret = g_steal_pointer(&xml);
+ endjob:
+ if (flags & VIR_MIGRATE_CHANGE_PROTECTION) {
+ if (ret)
+ qemuMigrationJobContinue(vm);
+ else
+ qemuMigrationJobFinish(vm);
+ } else {
+ qemuDomainObjEndJob(vm);
+ }
+
cleanup:
virDomainObjEndAPI(&vm);
return ret;
-
- endjob:
- if (flags & VIR_MIGRATE_CHANGE_PROTECTION)
- qemuMigrationJobFinish(vm);
- else
- qemuDomainObjEndJob(vm);
- goto cleanup;
}
--
2.35.1
2 years, 6 months