[PATCH 0/4] tests: qemucapabilities: Add data fro the 6.1 cycle

QEMU already committed some significant changes since the tree opened. The most notable which has fallout in libvirt is the dropping of the 'sheepdog' driver. This series adapts to that and then adds the qemu capabilities data for this cycle based on the most recent qemu upstream commit. Patch 4 is heavily truncated. To fetch the full version please: git fetch https://gitlab.com/pipo.sk/libvirt.git qemu-caps-6.1 Peter Krempa (4): testQemuInfoSetArgs: Strip default machine alias only for 'latest' test cases qemublocktest: Drop 'network-sheepdog-qcow2' image creation test case qemuxml2argvtest: Limit 'disk-network-sheepdog' testcase to qemu-6.0.0 tests: qemucapabilities: Add test-data for the qemu-6.1 cycle .../domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 208 + .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 211 + tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 208 + tests/qemublocktest.c | 1 - .../imagecreate/network-sheepdog-qcow2.json | 20 - .../imagecreate/network-sheepdog-qcow2.xml | 12 - .../caps_6.1.0.x86_64.replies | 32734 ++++++++++++++++ .../caps_6.1.0.x86_64.xml | 3339 ++ .../cpu-tsc-high-frequency.x86_64-latest.args | 2 +- ...> disk-network-sheepdog.x86_64-6.0.0.args} | 2 +- .../hugepages-memaccess3.x86_64-latest.args | 2 +- tests/qemuxml2argvtest.c | 2 +- tests/testutilsqemu.c | 6 +- 13 files changed, 36707 insertions(+), 40 deletions(-) create mode 100644 tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml create mode 100644 tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml create mode 100644 tests/domaincapsdata/qemu_6.1.0.x86_64.xml delete mode 100644 tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.json delete mode 100644 tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.xml create mode 100644 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml rename tests/qemuxml2argvdata/{disk-network-sheepdog.x86_64-latest.args => disk-network-sheepdog.x86_64-6.0.0.args} (95%) -- 2.30.2

For the real-capabilities test cases testing 'latest' capabilities we strip off the alias from 'pc' to the appropriate versioned machine type to prevent update to all tests when bumping qemu capabilities. Recenly we also started caching the capabilities to prevent re-parsing the XML all the time. The commit adding the caching kept the alias stripping prior to cache insertion, thus the cache contains the stripped alias. This leads to problem when a test case is added where the 'latest' equals to the selected version. Move the machine alias stripping after we create a local copy thus stripping it only for 'latest' tests. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/testutilsqemu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 1a3eae2c07..1444abc401 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -790,9 +790,6 @@ testQemuInfoSetArgs(struct testQemuInfo *info, if (!(qemuCaps = qemuTestParseCapabilitiesArch(info->arch, capsfile))) goto cleanup; - if (stripmachinealiases) - virQEMUCapsStripMachineAliases(qemuCaps); - cachedcaps = qemuCaps; g_hash_table_insert(capscache, g_strdup(capsfile), g_steal_pointer(&qemuCaps)); @@ -801,6 +798,9 @@ testQemuInfoSetArgs(struct testQemuInfo *info, if (!(qemuCaps = virQEMUCapsNewCopy(cachedcaps))) goto cleanup; + if (stripmachinealiases) + virQEMUCapsStripMachineAliases(qemuCaps); + info->flags |= FLAG_REAL_CAPS; /* provide path to the replies file for schema testing */ -- 2.30.2

QEMU dropped sheepdog support for the 6.1 release. Since we use schema validation in the image creation it would create test failures. In this instance we just drop the test altogether as adding versioned capabilities would be a bit too overkill for this scenario. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemublocktest.c | 1 - .../imagecreate/network-sheepdog-qcow2.json | 20 ------------------- .../imagecreate/network-sheepdog-qcow2.xml | 12 ----------- 3 files changed, 33 deletions(-) delete mode 100644 tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.json delete mode 100644 tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.xml diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 3f3e6d1532..0513e5bfc0 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -1223,7 +1223,6 @@ mymain(void) TEST_IMAGE_CREATE("network-gluster-qcow2", NULL); TEST_IMAGE_CREATE("network-rbd-qcow2", NULL); TEST_IMAGE_CREATE("network-ssh-qcow2", NULL); - TEST_IMAGE_CREATE("network-sheepdog-qcow2", NULL); #define TEST_BITMAP_DETECT(testname) \ do { \ diff --git a/tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.json b/tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.json deleted file mode 100644 index d86bef6bc8..0000000000 --- a/tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.json +++ /dev/null @@ -1,20 +0,0 @@ -protocol: -{ - "driver": "sheepdog", - "location": { - "server": { - "type": "inet", - "host": "example.com", - "port": "1234" - }, - "vdi": "asdf/i.qcow2" - }, - "size": 4294967296 -} - -format: -{ - "driver": "qcow2", - "file": "0123456789ABCDEF0123456789ABCDE", - "size": 8589934590 -} diff --git a/tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.xml b/tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.xml deleted file mode 100644 index 1145daafdd..0000000000 --- a/tests/qemublocktestdata/imagecreate/network-sheepdog-qcow2.xml +++ /dev/null @@ -1,12 +0,0 @@ -<disk device='disk' name='vda' type='network'> - <driver type='qcow2'/> - <source protocol='sheepdog' name='asdf/i.qcow2'> - <host name='example.com' port='1234'/> - <privateData> - <nodenames> - <nodename type='storage' name='0123456789ABCDEF0123456789ABCDE'/> - <nodename type='format' name='0123456789ABCDEF0123456789ABCDE'/> - </nodenames> - </privateData> - </source> -</disk> -- 2.30.2

QEMU is dropping sheepdog support in 6.1 so we need to limit the test case to the latest version supporting sheepdog as it won't be described by the QMP schema any more. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- ...6_64-latest.args => disk-network-sheepdog.x86_64-6.0.0.args} | 2 +- tests/qemuxml2argvtest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename tests/qemuxml2argvdata/{disk-network-sheepdog.x86_64-latest.args => disk-network-sheepdog.x86_64-6.0.0.args} (95%) diff --git a/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-6.0.0.args similarity index 95% rename from tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-latest.args rename to tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-6.0.0.args index a0c663229c..078ad6be09 100644 --- a/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-latest.args +++ b/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-6.0.0.args @@ -10,7 +10,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -name guest=QEMUGuest1,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ --machine pc,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \ +-machine pc-i440fx-6.0,accel=tcg,usb=off,dump-guest-core=off,memory-backend=pc.ram \ -cpu qemu64 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index d5e59fe474..25b0c81f21 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1395,7 +1395,7 @@ mymain(void) DO_TEST_FAILURE("disk-network-rbd-no-colon", NONE); DO_TEST("disk-network-sheepdog", NONE); DO_TEST_CAPS_VER("disk-network-sheepdog", "2.12.0"); - DO_TEST_CAPS_LATEST("disk-network-sheepdog"); + DO_TEST_CAPS_VER("disk-network-sheepdog", "6.0.0"); DO_TEST("disk-network-source-auth", NONE); DO_TEST_CAPS_VER("disk-network-source-auth", "2.12.0"); DO_TEST_CAPS_LATEST("disk-network-source-auth"); -- 2.30.2

Add test data based on qemu commit v6.0.0-540-g6005ee07c3. Notable changes are the removal of 'sheepdog' disk storage protocol. Additionally the cpu model reported when probing seems to have changed from: "model-id": "AMD Ryzen 9 3900X 12-Core Processor " to: "model-id": "QEMU TCG CPU version 2.5+" despite building on the same machine. This probably also results in the 2 test changes in the CPU definition which popped up in this update. Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- Note that this commit is snipped. See cover letter on where to fetch the full version. .../domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 208 + .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 211 + tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 208 + .../caps_6.1.0.x86_64.replies | 32734 ++++++++++++++++ .../caps_6.1.0.x86_64.xml | 3339 ++ .../cpu-tsc-high-frequency.x86_64-latest.args | 2 +- .../hugepages-memaccess3.x86_64-latest.args | 2 +- 7 files changed, 36702 insertions(+), 2 deletions(-) create mode 100644 tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml create mode 100644 tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml create mode 100644 tests/domaincapsdata/qemu_6.1.0.x86_64.xml create mode 100644 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml diff --git a/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml new file mode 100644 index 0000000000..95291c8430 --- /dev/null +++ b/tests/domaincapsdata/qemu_6.1.0-q35.x86_64.xml @@ -0,0 +1,208 @@ +<domainCapabilities> + <path>/usr/bin/qemu-system-x86_64</path> + <domain>kvm</domain> + <machine>pc-q35-6.1</machine> + <arch>x86_64</arch> + <vcpu max='288'/> + <iothreads supported='yes'/> + <os supported='yes'> + <enum name='firmware'> + <value>bios</value> + <value>efi</value> + </enum> + <loader supported='yes'> + <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> + <value>/usr/share/AAVMF/AAVMF32_CODE.fd</value> + <value>/usr/share/OVMF/OVMF_CODE.fd</value> + <enum name='type'> + <value>rom</value> + <value>pflash</value> + </enum> + <enum name='readonly'> + <value>yes</value> + <value>no</value> + </enum> + <enum name='secure'> + <value>yes</value> + <value>no</value> + </enum> + </loader> + </os> + <cpu> + <mode name='host-passthrough' supported='yes'> + <enum name='hostPassthroughMigratable'> + <value>on</value> + <value>off</value> + </enum> + </mode> + <mode name='maximum' supported='yes'> + <enum name='maximumMigratable'> + <value>on</value> + <value>off</value> + </enum> + </mode> + <mode name='host-model' supported='yes'> + <model fallback='forbid'>EPYC-Rome</model> + <vendor>AMD</vendor> + <feature policy='require' name='x2apic'/> + <feature policy='require' name='tsc-deadline'/> + <feature policy='require' name='hypervisor'/> + <feature policy='require' name='tsc_adjust'/> + <feature policy='require' name='stibp'/> + <feature policy='require' name='arch-capabilities'/> + <feature policy='require' name='ssbd'/> + <feature policy='require' name='xsaves'/> + <feature policy='require' name='cmp_legacy'/> + <feature policy='require' name='invtsc'/> + <feature policy='require' name='amd-ssbd'/> + <feature policy='require' name='virt-ssbd'/> + <feature policy='require' name='rdctl-no'/> + <feature policy='require' name='skip-l1dfl-vmentry'/> + <feature policy='require' name='mds-no'/> + <feature policy='require' name='pschange-mc-no'/> + <feature policy='disable' name='svm'/> + <feature policy='disable' name='npt'/> + <feature policy='disable' name='nrip-save'/> + </mode> + <mode name='custom' supported='yes'> + <model usable='yes'>qemu64</model> + <model usable='yes'>qemu32</model> + <model usable='no'>phenom</model> + <model usable='yes'>pentium3</model> + <model usable='yes'>pentium2</model> + <model usable='yes'>pentium</model> + <model usable='no'>n270</model> + <model usable='yes'>kvm64</model> + <model usable='yes'>kvm32</model> + <model usable='no'>coreduo</model> + <model usable='no'>core2duo</model> + <model usable='no'>athlon</model> + <model usable='no'>Westmere-IBRS</model> + <model usable='yes'>Westmere</model> + <model usable='no'>Snowridge</model> + <model usable='no'>Skylake-Server-noTSX-IBRS</model> + <model usable='no'>Skylake-Server-IBRS</model> + <model usable='no'>Skylake-Server</model> + <model usable='no'>Skylake-Client-noTSX-IBRS</model> + <model usable='no'>Skylake-Client-IBRS</model> + <model usable='no'>Skylake-Client</model> + <model usable='no'>SandyBridge-IBRS</model> + <model usable='yes'>SandyBridge</model> + <model usable='yes'>Penryn</model> + <model usable='no'>Opteron_G5</model> + <model usable='no'>Opteron_G4</model> + <model usable='yes'>Opteron_G3</model> + <model usable='yes'>Opteron_G2</model> + <model usable='yes'>Opteron_G1</model> + <model usable='no'>Nehalem-IBRS</model> + <model usable='yes'>Nehalem</model> + <model usable='no'>IvyBridge-IBRS</model> + <model usable='no'>IvyBridge</model> + <model usable='no'>Icelake-Server-noTSX</model> + <model usable='no'>Icelake-Server</model> + <model usable='no' deprecated='yes'>Icelake-Client-noTSX</model> + <model usable='no' deprecated='yes'>Icelake-Client</model> + <model usable='no'>Haswell-noTSX-IBRS</model> + <model usable='no'>Haswell-noTSX</model> + <model usable='no'>Haswell-IBRS</model> + <model usable='no'>Haswell</model> + <model usable='yes'>EPYC-Rome</model> + <model usable='no'>EPYC-Milan</model> + <model usable='yes'>EPYC-IBPB</model> + <model usable='yes'>EPYC</model> + <model usable='yes'>Dhyana</model> + <model usable='no'>Cooperlake</model> + <model usable='yes'>Conroe</model> + <model usable='no'>Cascadelake-Server-noTSX</model> + <model usable='no'>Cascadelake-Server</model> + <model usable='no'>Broadwell-noTSX-IBRS</model> + <model usable='no'>Broadwell-noTSX</model> + <model usable='no'>Broadwell-IBRS</model> + <model usable='no'>Broadwell</model> + <model usable='yes'>486</model> + </mode> + </cpu> + <devices> + <disk supported='yes'> + <enum name='diskDevice'> + <value>disk</value> + <value>cdrom</value> + <value>floppy</value> + <value>lun</value> + </enum> + <enum name='bus'> + <value>fdc</value> + <value>scsi</value> + <value>virtio</value> + <value>usb</value> + <value>sata</value> + </enum> + <enum name='model'> + <value>virtio</value> + <value>virtio-transitional</value> + <value>virtio-non-transitional</value> + </enum> + </disk> + <graphics supported='yes'> + <enum name='type'> + <value>sdl</value> + <value>vnc</value> + <value>spice</value> + <value>egl-headless</value> + </enum> + </graphics> + <video supported='yes'> + <enum name='modelType'> + <value>vga</value> + <value>cirrus</value> + <value>vmvga</value> + <value>qxl</value> + <value>virtio</value> + <value>none</value> + <value>bochs</value> + <value>ramfb</value> + </enum> + </video> + <hostdev supported='yes'> + <enum name='mode'> + <value>subsystem</value> + </enum> + <enum name='startupPolicy'> + <value>default</value> + <value>mandatory</value> + <value>requisite</value> + <value>optional</value> + </enum> + <enum name='subsysType'> + <value>usb</value> + <value>pci</value> + <value>scsi</value> + </enum> + <enum name='capsType'/> + <enum name='pciBackend'> + <value>default</value> + <value>vfio</value> + </enum> + </hostdev> + <rng supported='yes'> + <enum name='model'> + <value>virtio</value> + <value>virtio-transitional</value> + <value>virtio-non-transitional</value> + </enum> + <enum name='backendModel'> + <value>random</value> + <value>egd</value> + <value>builtin</value> + </enum> + </rng> + </devices> + <features> + <gic supported='no'/> + <vmcoreinfo supported='yes'/> + <genid supported='yes'/> + <backingStoreInput supported='yes'/> + <backup supported='no'/> + <sev supported='no'/> + </features> +</domainCapabilities> diff --git a/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml new file mode 100644 index 0000000000..4e19eea365 --- /dev/null +++ b/tests/domaincapsdata/qemu_6.1.0-tcg.x86_64.xml @@ -0,0 +1,211 @@ +<domainCapabilities> + <path>/usr/bin/qemu-system-x86_64</path> + <domain>qemu</domain> + <machine>pc-i440fx-6.1</machine> + <arch>x86_64</arch> + <vcpu max='255'/> + <iothreads supported='yes'/> + <os supported='yes'> + <enum name='firmware'> + <value>bios</value> + <value>efi</value> + </enum> + <loader supported='yes'> + <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> + <value>/usr/share/AAVMF/AAVMF32_CODE.fd</value> + <value>/usr/share/OVMF/OVMF_CODE.fd</value> + <enum name='type'> + <value>rom</value> + <value>pflash</value> + </enum> + <enum name='readonly'> + <value>yes</value> + <value>no</value> + </enum> + <enum name='secure'> + <value>no</value> + </enum> + </loader> + </os> + <cpu> + <mode name='host-passthrough' supported='no'/> + <mode name='maximum' supported='yes'> + <enum name='maximumMigratable'> + <value>on</value> + <value>off</value> + </enum> + </mode> + <mode name='host-model' supported='yes'> + <model fallback='forbid'>EPYC</model> + <vendor>AMD</vendor> + <feature policy='require' name='acpi'/> + <feature policy='require' name='ss'/> + <feature policy='require' name='monitor'/> + <feature policy='require' name='hypervisor'/> + <feature policy='require' name='erms'/> + <feature policy='require' name='mpx'/> + <feature policy='require' name='pcommit'/> + <feature policy='require' name='clwb'/> + <feature policy='require' name='pku'/> + <feature policy='require' name='la57'/> + <feature policy='require' name='3dnowext'/> + <feature policy='require' name='3dnow'/> + <feature policy='require' name='npt'/> + <feature policy='disable' name='vme'/> + <feature policy='disable' name='fma'/> + <feature policy='disable' name='avx'/> + <feature policy='disable' name='f16c'/> + <feature policy='disable' name='avx2'/> + <feature policy='disable' name='rdseed'/> + <feature policy='disable' name='sha-ni'/> + <feature policy='disable' name='xsavec'/> + <feature policy='disable' name='fxsr_opt'/> + <feature policy='disable' name='misalignsse'/> + <feature policy='disable' name='3dnowprefetch'/> + <feature policy='disable' name='osvw'/> + <feature policy='disable' name='topoext'/> + <feature policy='disable' name='nrip-save'/> + </mode> + <mode name='custom' supported='yes'> + <model usable='yes'>qemu64</model> + <model usable='yes'>qemu32</model> + <model usable='no'>phenom</model> + <model usable='yes'>pentium3</model> + <model usable='yes'>pentium2</model> + <model usable='yes'>pentium</model> + <model usable='yes'>n270</model> + <model usable='yes'>kvm64</model> + <model usable='yes'>kvm32</model> + <model usable='yes'>coreduo</model> + <model usable='yes'>core2duo</model> + <model usable='yes'>athlon</model> + <model usable='no'>Westmere-IBRS</model> + <model usable='yes'>Westmere</model> + <model usable='no'>Snowridge</model> + <model usable='no'>Skylake-Server-noTSX-IBRS</model> + <model usable='no'>Skylake-Server-IBRS</model> + <model usable='no'>Skylake-Server</model> + <model usable='no'>Skylake-Client-noTSX-IBRS</model> + <model usable='no'>Skylake-Client-IBRS</model> + <model usable='no'>Skylake-Client</model> + <model usable='no'>SandyBridge-IBRS</model> + <model usable='no'>SandyBridge</model> + <model usable='yes'>Penryn</model> + <model usable='no'>Opteron_G5</model> + <model usable='no'>Opteron_G4</model> + <model usable='no'>Opteron_G3</model> + <model usable='yes'>Opteron_G2</model> + <model usable='yes'>Opteron_G1</model> + <model usable='no'>Nehalem-IBRS</model> + <model usable='yes'>Nehalem</model> + <model usable='no'>IvyBridge-IBRS</model> + <model usable='no'>IvyBridge</model> + <model usable='no'>Icelake-Server-noTSX</model> + <model usable='no'>Icelake-Server</model> + <model usable='no' deprecated='yes'>Icelake-Client-noTSX</model> + <model usable='no' deprecated='yes'>Icelake-Client</model> + <model usable='no'>Haswell-noTSX-IBRS</model> + <model usable='no'>Haswell-noTSX</model> + <model usable='no'>Haswell-IBRS</model> + <model usable='no'>Haswell</model> + <model usable='no'>EPYC-Rome</model> + <model usable='no'>EPYC-Milan</model> + <model usable='no'>EPYC-IBPB</model> + <model usable='no'>EPYC</model> + <model usable='no'>Dhyana</model> + <model usable='no'>Cooperlake</model> + <model usable='yes'>Conroe</model> + <model usable='no'>Cascadelake-Server-noTSX</model> + <model usable='no'>Cascadelake-Server</model> + <model usable='no'>Broadwell-noTSX-IBRS</model> + <model usable='no'>Broadwell-noTSX</model> + <model usable='no'>Broadwell-IBRS</model> + <model usable='no'>Broadwell</model> + <model usable='yes'>486</model> + </mode> + </cpu> + <devices> + <disk supported='yes'> + <enum name='diskDevice'> + <value>disk</value> + <value>cdrom</value> + <value>floppy</value> + <value>lun</value> + </enum> + <enum name='bus'> + <value>ide</value> + <value>fdc</value> + <value>scsi</value> + <value>virtio</value> + <value>usb</value> + <value>sata</value> + </enum> + <enum name='model'> + <value>virtio</value> + <value>virtio-transitional</value> + <value>virtio-non-transitional</value> + </enum> + </disk> + <graphics supported='yes'> + <enum name='type'> + <value>sdl</value> + <value>vnc</value> + <value>spice</value> + <value>egl-headless</value> + </enum> + </graphics> + <video supported='yes'> + <enum name='modelType'> + <value>vga</value> + <value>cirrus</value> + <value>vmvga</value> + <value>qxl</value> + <value>virtio</value> + <value>none</value> + <value>bochs</value> + <value>ramfb</value> + </enum> + </video> + <hostdev supported='yes'> + <enum name='mode'> + <value>subsystem</value> + </enum> + <enum name='startupPolicy'> + <value>default</value> + <value>mandatory</value> + <value>requisite</value> + <value>optional</value> + </enum> + <enum name='subsysType'> + <value>usb</value> + <value>pci</value> + <value>scsi</value> + </enum> + <enum name='capsType'/> + <enum name='pciBackend'> + <value>default</value> + <value>vfio</value> + </enum> + </hostdev> + <rng supported='yes'> + <enum name='model'> + <value>virtio</value> + <value>virtio-transitional</value> + <value>virtio-non-transitional</value> + </enum> + <enum name='backendModel'> + <value>random</value> + <value>egd</value> + <value>builtin</value> + </enum> + </rng> + </devices> + <features> + <gic supported='no'/> + <vmcoreinfo supported='yes'/> + <genid supported='yes'/> + <backingStoreInput supported='yes'/> + <backup supported='no'/> + <sev supported='no'/> + </features> +</domainCapabilities> diff --git a/tests/domaincapsdata/qemu_6.1.0.x86_64.xml b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml new file mode 100644 index 0000000000..b6fb64891c --- /dev/null +++ b/tests/domaincapsdata/qemu_6.1.0.x86_64.xml @@ -0,0 +1,208 @@ +<domainCapabilities> + <path>/usr/bin/qemu-system-x86_64</path> + <domain>kvm</domain> + <machine>pc-i440fx-6.1</machine> + <arch>x86_64</arch> + <vcpu max='255'/> + <iothreads supported='yes'/> + <os supported='yes'> + <enum name='firmware'> + <value>bios</value> + <value>efi</value> + </enum> + <loader supported='yes'> + <value>/usr/share/AAVMF/AAVMF_CODE.fd</value> + <value>/usr/share/AAVMF/AAVMF32_CODE.fd</value> + <value>/usr/share/OVMF/OVMF_CODE.fd</value> + <enum name='type'> + <value>rom</value> + <value>pflash</value> + </enum> + <enum name='readonly'> + <value>yes</value> + <value>no</value> + </enum> + <enum name='secure'> + <value>no</value> + </enum> + </loader> + </os> + <cpu> + <mode name='host-passthrough' supported='yes'> + <enum name='hostPassthroughMigratable'> + <value>on</value> + <value>off</value> + </enum> + </mode> + <mode name='maximum' supported='yes'> + <enum name='maximumMigratable'> + <value>on</value> + <value>off</value> + </enum> + </mode> + <mode name='host-model' supported='yes'> + <model fallback='forbid'>EPYC-Rome</model> + <vendor>AMD</vendor> + <feature policy='require' name='x2apic'/> + <feature policy='require' name='tsc-deadline'/> + <feature policy='require' name='hypervisor'/> + <feature policy='require' name='tsc_adjust'/> + <feature policy='require' name='stibp'/> + <feature policy='require' name='arch-capabilities'/> + <feature policy='require' name='ssbd'/> + <feature policy='require' name='xsaves'/> + <feature policy='require' name='cmp_legacy'/> + <feature policy='require' name='invtsc'/> + <feature policy='require' name='amd-ssbd'/> + <feature policy='require' name='virt-ssbd'/> + <feature policy='require' name='rdctl-no'/> + <feature policy='require' name='skip-l1dfl-vmentry'/> + <feature policy='require' name='mds-no'/> + <feature policy='require' name='pschange-mc-no'/> + <feature policy='disable' name='svm'/> + <feature policy='disable' name='npt'/> + <feature policy='disable' name='nrip-save'/> + </mode> + <mode name='custom' supported='yes'> + <model usable='yes'>qemu64</model> + <model usable='yes'>qemu32</model> + <model usable='no'>phenom</model> + <model usable='yes'>pentium3</model> + <model usable='yes'>pentium2</model> + <model usable='yes'>pentium</model> + <model usable='no'>n270</model> + <model usable='yes'>kvm64</model> + <model usable='yes'>kvm32</model> + <model usable='no'>coreduo</model> + <model usable='no'>core2duo</model> + <model usable='no'>athlon</model> + <model usable='no'>Westmere-IBRS</model> + <model usable='yes'>Westmere</model> + <model usable='no'>Snowridge</model> + <model usable='no'>Skylake-Server-noTSX-IBRS</model> + <model usable='no'>Skylake-Server-IBRS</model> + <model usable='no'>Skylake-Server</model> + <model usable='no'>Skylake-Client-noTSX-IBRS</model> + <model usable='no'>Skylake-Client-IBRS</model> + <model usable='no'>Skylake-Client</model> + <model usable='no'>SandyBridge-IBRS</model> + <model usable='yes'>SandyBridge</model> + <model usable='yes'>Penryn</model> + <model usable='no'>Opteron_G5</model> + <model usable='no'>Opteron_G4</model> + <model usable='yes'>Opteron_G3</model> + <model usable='yes'>Opteron_G2</model> + <model usable='yes'>Opteron_G1</model> + <model usable='no'>Nehalem-IBRS</model> + <model usable='yes'>Nehalem</model> + <model usable='no'>IvyBridge-IBRS</model> + <model usable='no'>IvyBridge</model> + <model usable='no'>Icelake-Server-noTSX</model> + <model usable='no'>Icelake-Server</model> + <model usable='no' deprecated='yes'>Icelake-Client-noTSX</model> + <model usable='no' deprecated='yes'>Icelake-Client</model> + <model usable='no'>Haswell-noTSX-IBRS</model> + <model usable='no'>Haswell-noTSX</model> + <model usable='no'>Haswell-IBRS</model> + <model usable='no'>Haswell</model> + <model usable='yes'>EPYC-Rome</model> + <model usable='no'>EPYC-Milan</model> + <model usable='yes'>EPYC-IBPB</model> + <model usable='yes'>EPYC</model> + <model usable='yes'>Dhyana</model> + <model usable='no'>Cooperlake</model> + <model usable='yes'>Conroe</model> + <model usable='no'>Cascadelake-Server-noTSX</model> + <model usable='no'>Cascadelake-Server</model> + <model usable='no'>Broadwell-noTSX-IBRS</model> + <model usable='no'>Broadwell-noTSX</model> + <model usable='no'>Broadwell-IBRS</model> + <model usable='no'>Broadwell</model> + <model usable='yes'>486</model> + </mode> + </cpu> + <devices> + <disk supported='yes'> + <enum name='diskDevice'> + <value>disk</value> + <value>cdrom</value> + <value>floppy</value> + <value>lun</value> + </enum> + <enum name='bus'> + <value>ide</value> + <value>fdc</value> + <value>scsi</value> + <value>virtio</value> + <value>usb</value> + <value>sata</value> + </enum> + <enum name='model'> + <value>virtio</value> + <value>virtio-transitional</value> + <value>virtio-non-transitional</value> + </enum> + </disk> + <graphics supported='yes'> + <enum name='type'> + <value>sdl</value> + <value>vnc</value> + <value>spice</value> + <value>egl-headless</value> + </enum> + </graphics> + <video supported='yes'> + <enum name='modelType'> + <value>vga</value> + <value>cirrus</value> + <value>vmvga</value> + <value>qxl</value> + <value>virtio</value> + <value>none</value> + <value>bochs</value> + <value>ramfb</value> + </enum> + </video> + <hostdev supported='yes'> + <enum name='mode'> + <value>subsystem</value> + </enum> + <enum name='startupPolicy'> + <value>default</value> + <value>mandatory</value> + <value>requisite</value> + <value>optional</value> + </enum> + <enum name='subsysType'> + <value>usb</value> + <value>pci</value> + <value>scsi</value> + </enum> + <enum name='capsType'/> + <enum name='pciBackend'> + <value>default</value> + <value>vfio</value> + </enum> + </hostdev> + <rng supported='yes'> + <enum name='model'> + <value>virtio</value> + <value>virtio-transitional</value> + <value>virtio-non-transitional</value> + </enum> + <enum name='backendModel'> + <value>random</value> + <value>egd</value> + <value>builtin</value> + </enum> + </rng> + </devices> + <features> + <gic supported='no'/> + <vmcoreinfo supported='yes'/> + <genid supported='yes'/> + <backingStoreInput supported='yes'/> + <backup supported='no'/> + <sev supported='no'/> + </features> +</domainCapabilities> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies new file mode 100644 index 0000000000..186cf4c1ee --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies @@ -0,0 +1,32734 @@ +{ + "execute": "qmp_capabilities", [SNIPPED] diff --git a/tests/qemuxml2argvdata/cpu-tsc-high-frequency.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-tsc-high-frequency.x86_64-latest.args index 1200f0ac67..c39817af98 100644 --- a/tests/qemuxml2argvdata/cpu-tsc-high-frequency.x86_64-latest.args +++ b/tests/qemuxml2argvdata/cpu-tsc-high-frequency.x86_64-latest.args @@ -11,7 +11,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ -machine pc,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ --cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,invtsc=on,tsc-frequency=4567890000 \ +-cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,svm=off,npt=off,nrip-save=off,invtsc=on,tsc-frequency=4567890000 \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ -overcommit mem-lock=off \ diff --git a/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args index e111d3e834..f6c5e116d8 100644 --- a/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args +++ b/tests/qemuxml2argvdata/hugepages-memaccess3.x86_64-latest.args @@ -11,7 +11,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-fedora/master-key.aes"}' \ -machine pc-i440fx-2.9,accel=kvm,usb=off,dump-guest-core=off,memory-backend=pc.ram \ --cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on \ +-cpu EPYC-Rome,x2apic=on,tsc-deadline=on,hypervisor=on,tsc-adjust=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,cmp-legacy=on,amd-ssbd=on,virt-ssbd=on,rdctl-no=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,svm=off,npt=off,nrip-save=off \ -m 4096 \ -object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-fedora","share":true,"x-use-canonical-path-for-ramblock-id":false,"prealloc":true,"size":4294967296}' \ -overcommit mem-lock=off \ -- 2.30.2

On Mon, May 17, 2021 at 11:16:35 +0200, Peter Krempa wrote:
Add test data based on qemu commit v6.0.0-540-g6005ee07c3.
Notable changes are the removal of 'sheepdog' disk storage protocol.
Additionally the cpu model reported when probing seems to have changed from:
"model-id": "AMD Ryzen 9 3900X 12-Core Processor "
to:
"model-id": "QEMU TCG CPU version 2.5+"
This is indeed strange as KVM used to report the host's CPU name directly, but it shouldn't cause any harm except for confusion humans looking at the libvirtd logs or capabilities cache. In other words, it's worth fixing unless it was an intentional change with a very reason behind.
despite building on the same machine. This probably also results in the 2 test changes in the CPU definition which popped up in this update.
I'm not sure if it's related (i.e., caused by the same QEMU changes), but it's definitely not caused by the difference in model-id. Libvirt does not even look at model-id, we only check individual CPU properties. QEMU just reports svm, npt, and nrip-save are disabled... might be worth reporting to them to check whether it is expected. Jirka

On Mon, May 17, 2021 at 11:16:31AM +0200, Peter Krempa wrote:
QEMU already committed some significant changes since the tree opened. The most notable which has fallout in libvirt is the dropping of the 'sheepdog' driver. This series adapts to that and then adds the qemu capabilities data for this cycle based on the most recent qemu upstream commit.
Patch 4 is heavily truncated. To fetch the full version please:
git fetch https://gitlab.com/pipo.sk/libvirt.git qemu-caps-6.1
Peter Krempa (4): testQemuInfoSetArgs: Strip default machine alias only for 'latest' test cases qemublocktest: Drop 'network-sheepdog-qcow2' image creation test case qemuxml2argvtest: Limit 'disk-network-sheepdog' testcase to qemu-6.0.0 tests: qemucapabilities: Add test-data for the qemu-6.1 cycle
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
participants (3)
-
Jiri Denemark
-
Pavel Hrdina
-
Peter Krempa