[PATCH 00/15] qemu: Retire QEMU_CAPS_OBJECT_MEMORY_{RAM, FILE} and friends

Pipeline: https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/684845875 Given our minimal QEMU version 4.2.0, memory-backend-ram, memory-backend-file and some of its attributes are going to be always present. Retire corresponding capabilities then. Michal Prívozník (15): qemuxml2argvtest: Convert hugepages related tests to _CAPS_LATEST qemuxml2xmltest: Convert hugepages related tests to _CAPS_LATEST qemuxml2argvtest: Drop cpu-numa-memshared-1 test case qemu: Assume QEMU_CAPS_OBJECT_MEMORY_RAM qemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_RAM qemu: Retire QEMU_CAPS_OBJECT_MEMORY_RAM qemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE qemu_capabilities: Stop detectin QEMU_CAPS_OBJECT_MEMORY_FILE qemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE qemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD qemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD qemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD qemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN qemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN qemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN src/qemu/qemu_capabilities.c | 21 ++-- src/qemu/qemu_capabilities.h | 8 +- src/qemu/qemu_command.c | 67 +++-------- src/qemu/qemu_validate.c | 44 ------- .../caps_4.2.0.aarch64.xml | 4 - .../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 4 - .../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 4 - .../caps_4.2.0.x86_64.xml | 4 - .../caps_5.0.0.aarch64.xml | 4 - .../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 4 - .../caps_5.0.0.riscv64.xml | 4 - .../caps_5.0.0.x86_64.xml | 4 - .../qemucapabilitiesdata/caps_5.1.0.sparc.xml | 4 - .../caps_5.1.0.x86_64.xml | 4 - .../caps_5.2.0.aarch64.xml | 4 - .../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 4 - .../caps_5.2.0.riscv64.xml | 4 - .../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 4 - .../caps_5.2.0.x86_64.xml | 4 - .../caps_6.0.0.aarch64.xml | 4 - .../qemucapabilitiesdata/caps_6.0.0.s390x.xml | 4 - .../caps_6.0.0.x86_64.xml | 4 - .../caps_6.1.0.x86_64.xml | 4 - .../caps_6.2.0.aarch64.xml | 4 - .../qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 4 - .../caps_6.2.0.x86_64.xml | 4 - .../caps_7.0.0.aarch64.xml | 4 - .../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 4 - .../caps_7.0.0.x86_64.xml | 4 - .../qemucapabilitiesdata/caps_7.1.0.ppc64.xml | 4 - .../caps_7.1.0.x86_64.xml | 4 - .../caps_7.2.0.x86_64.xml | 4 - .../qemuxml2argvdata/cpu-numa-memshared-1.err | 1 - .../qemuxml2argvdata/cpu-numa-memshared-1.xml | 1 - .../hugepages-default-1G-nodeset-2M.err | 2 +- ...> hugepages-default-2M.x86_64-latest.args} | 13 ++- .../qemuxml2argvdata/hugepages-default-2M.xml | 9 +- ...es-default-system-size.x86_64-latest.args} | 15 ++- .../hugepages-default-system-size.xml | 9 +- ...s => hugepages-default.x86_64-latest.args} | 15 +-- tests/qemuxml2argvdata/hugepages-default.xml | 20 +++- .../qemuxml2argvdata/hugepages-memaccess.args | 44 ------- .../hugepages-memaccess.x86_64-latest.args | 46 ++++++++ .../qemuxml2argvdata/hugepages-memaccess.xml | 9 +- .../hugepages-memaccess2.args | 44 ------- .../hugepages-memaccess2.x86_64-latest.args | 46 ++++++++ .../qemuxml2argvdata/hugepages-memaccess2.xml | 9 +- .../qemuxml2argvdata/hugepages-memaccess3.xml | 10 +- ...epages-nodeset-nonexist.x86_64-latest.err} | 0 .../hugepages-nodeset-nonexist.xml | 4 +- ...s => hugepages-nodeset.x86_64-latest.args} | 13 ++- tests/qemuxml2argvdata/hugepages-nodeset.xml | 12 +- ...epages-numa-default-2M.x86_64-latest.args} | 12 +- .../hugepages-numa-default-2M.xml | 12 +- ...ages-numa-default-dimm.x86_64-latest.args} | 15 +-- .../hugepages-numa-default-dimm.xml | 5 +- ...hugepages-numa-default.x86_64-latest.args} | 11 +- ...s-numa-nodeset-nonexist.x86_64-latest.err} | 0 .../hugepages-numa-nodeset-nonexist.xml | 4 +- ...ages-numa-nodeset-part.x86_64-latest.args} | 12 +- .../hugepages-numa-nodeset-part.xml | 12 +- .../hugepages-numa-nodeset.x86_64-latest.args | 40 +++++++ .../hugepages-numa-nodeset.xml | 12 +- tests/qemuxml2argvdata/hugepages-nvdimm.xml | 5 +- tests/qemuxml2argvdata/hugepages-shared.args | 42 ------- .../hugepages-shared.x86_64-latest.args | 44 +++++++ tests/qemuxml2argvdata/hugepages-shared.xml | 21 +++- tests/qemuxml2argvdata/numatune-memnode.err | 2 +- .../qemuxml2argvdata/pages-dimm-discard.args | 35 ------ .../pages-dimm-discard.x86_64-latest.args | 38 ++++++ tests/qemuxml2argvdata/pages-dimm-discard.xml | 5 +- .../pages-discard-hugepages.args | 34 ------ ...pages-discard-hugepages.x86_64-latest.args | 36 ++++++ .../pages-discard-hugepages.xml | 9 +- tests/qemuxml2argvdata/pages-discard.args | 34 ------ ....args => pages-discard.x86_64-latest.args} | 16 +-- tests/qemuxml2argvdata/pages-discard.xml | 4 +- tests/qemuxml2argvtest.c | 110 +++++------------- ...=> hugepages-default-2M.x86_64-latest.xml} | 0 ...ges-default-system-size.x86_64-latest.xml} | 0 .../hugepages-default.x86_64-latest.xml | 1 + .../qemuxml2xmloutdata/hugepages-default.xml | 34 ------ ... => hugepages-memaccess.x86_64-latest.xml} | 0 ...=> hugepages-memaccess2.x86_64-latest.xml} | 0 .../hugepages-memaccess3.x86_64-latest.xml | 1 + .../hugepages-nodeset.x86_64-latest.xml | 1 + .../qemuxml2xmloutdata/hugepages-nodeset.xml | 31 ----- ...ugepages-numa-default-2M.x86_64-latest.xml | 1 + .../hugepages-numa-default-2M.xml | 37 ------ ...pages-numa-default-dimm.x86_64-latest.xml} | 0 ...epages-numa-nodeset-part.x86_64-latest.xml | 1 + .../hugepages-numa-nodeset-part.xml | 37 ------ .../hugepages-numa-nodeset.x86_64-latest.xml | 1 + .../hugepages-numa-nodeset.xml | 40 ------- ...xml => hugepages-nvdimm.x86_64-latest.xml} | 0 .../hugepages-shared.x86_64-latest.xml | 1 + tests/qemuxml2xmloutdata/hugepages-shared.xml | 55 --------- ...l => pages-dimm-discard.x86_64-latest.xml} | 0 ...pages-discard-hugepages.x86_64-latest.xml} | 0 tests/qemuxml2xmltest.c | 62 ++++------ 100 files changed, 522 insertions(+), 925 deletions(-) delete mode 100644 tests/qemuxml2argvdata/cpu-numa-memshared-1.err delete mode 120000 tests/qemuxml2argvdata/cpu-numa-memshared-1.xml rename tests/qemuxml2argvdata/{hugepages-nodeset.args => hugepages-default-2M.x86_64-latest.args} (55%) rename tests/qemuxml2argvdata/{hugepages-numa-default-2M.args => hugepages-default-system-size.x86_64-latest.args} (61%) rename tests/qemuxml2argvdata/{hugepages-default.args => hugepages-default.x86_64-latest.args} (51%) delete mode 100644 tests/qemuxml2argvdata/hugepages-memaccess.args create mode 100644 tests/qemuxml2argvdata/hugepages-memaccess.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/hugepages-memaccess2.args create mode 100644 tests/qemuxml2argvdata/hugepages-memaccess2.x86_64-latest.args rename tests/qemuxml2argvdata/{hugepages-nodeset-nonexist.err => hugepages-nodeset-nonexist.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{hugepages-default-2M.args => hugepages-nodeset.x86_64-latest.args} (55%) rename tests/qemuxml2argvdata/{hugepages-default-system-size.args => hugepages-numa-default-2M.x86_64-latest.args} (51%) rename tests/qemuxml2argvdata/{hugepages-numa-default-dimm.args => hugepages-numa-default-dimm.x86_64-latest.args} (51%) rename tests/qemuxml2argvdata/{hugepages-numa-default.args => hugepages-numa-default.x86_64-latest.args} (60%) rename tests/qemuxml2argvdata/{hugepages-numa-nodeset-nonexist.err => hugepages-numa-nodeset-nonexist.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{hugepages-numa-nodeset-part.args => hugepages-numa-nodeset-part.x86_64-latest.args} (60%) create mode 100644 tests/qemuxml2argvdata/hugepages-numa-nodeset.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/hugepages-shared.args create mode 100644 tests/qemuxml2argvdata/hugepages-shared.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pages-dimm-discard.args create mode 100644 tests/qemuxml2argvdata/pages-dimm-discard.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pages-discard-hugepages.args create mode 100644 tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pages-discard.args rename tests/qemuxml2argvdata/{hugepages-numa-nodeset.args => pages-discard.x86_64-latest.args} (59%) rename tests/qemuxml2xmloutdata/{hugepages-default-2M.xml => hugepages-default-2M.x86_64-latest.xml} (100%) rename tests/qemuxml2xmloutdata/{hugepages-default-system-size.xml => hugepages-default-system-size.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-default.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-default.xml rename tests/qemuxml2xmloutdata/{hugepages-memaccess.xml => hugepages-memaccess.x86_64-latest.xml} (100%) rename tests/qemuxml2xmloutdata/{hugepages-memaccess2.xml => hugepages-memaccess2.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-memaccess3.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-nodeset.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-nodeset.xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-default-2M.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml rename tests/qemuxml2xmloutdata/{hugepages-numa-default-dimm.xml => hugepages-numa-default-dimm.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-nodeset.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml rename tests/qemuxml2xmloutdata/{hugepages-nvdimm.xml => hugepages-nvdimm.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-shared.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-shared.xml rename tests/qemuxml2xmloutdata/{pages-dimm-discard.xml => pages-dimm-discard.x86_64-latest.xml} (100%) rename tests/qemuxml2xmloutdata/{pages-discard-hugepages.xml => pages-discard-hugepages.x86_64-latest.xml} (100%) -- 2.37.4

Currently, we have maybe a dozen tests for hugepages related stuff in qemuxml2argvtest. In all cases DO_TEST() is used, which means we have to enumerate all capabilities needed (though, it's usually just QEMU_CAPS_OBJECT_MEMORY_RAM and QEMU_CAPS_OBJECT_MEMORY_FILE, exceptionally QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD too). Nevertheless, these caps made sense back in QEMU 2.X era when these objects were being introduced. But now, almost 8 years after the fact we can safely assume every QEMU knows these caps. Therefore, switch to DO_TEST_CAPS_LATEST(). The qemuxml2xmltest will undergo similar treatment in next commit. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- ...> hugepages-default-2M.x86_64-latest.args} | 11 ++-- .../qemuxml2argvdata/hugepages-default-2M.xml | 4 +- ...es-default-system-size.x86_64-latest.args} | 13 ++-- .../hugepages-default-system-size.xml | 4 +- ...s => hugepages-default.x86_64-latest.args} | 15 ++--- tests/qemuxml2argvdata/hugepages-default.xml | 4 +- .../qemuxml2argvdata/hugepages-memaccess.args | 44 ------------- .../hugepages-memaccess.x86_64-latest.args | 46 ++++++++++++++ .../qemuxml2argvdata/hugepages-memaccess.xml | 4 +- .../hugepages-memaccess2.args | 44 ------------- .../hugepages-memaccess2.x86_64-latest.args | 46 ++++++++++++++ .../qemuxml2argvdata/hugepages-memaccess2.xml | 4 +- ...epages-nodeset-nonexist.x86_64-latest.err} | 0 .../hugepages-nodeset-nonexist.xml | 4 +- ...s => hugepages-nodeset.x86_64-latest.args} | 15 +++-- tests/qemuxml2argvdata/hugepages-nodeset.xml | 4 +- ...epages-numa-default-2M.x86_64-latest.args} | 14 +++-- .../hugepages-numa-default-2M.xml | 4 +- ...ages-numa-default-dimm.x86_64-latest.args} | 15 ++--- ...hugepages-numa-default.x86_64-latest.args} | 11 ++-- ...s-numa-nodeset-nonexist.x86_64-latest.err} | 0 .../hugepages-numa-nodeset-nonexist.xml | 4 +- ...ages-numa-nodeset-part.x86_64-latest.args} | 12 ++-- .../hugepages-numa-nodeset-part.xml | 4 +- .../hugepages-numa-nodeset.x86_64-latest.args | 40 ++++++++++++ .../hugepages-numa-nodeset.xml | 4 +- tests/qemuxml2argvdata/hugepages-shared.args | 42 ------------- .../hugepages-shared.x86_64-latest.args | 44 +++++++++++++ tests/qemuxml2argvdata/hugepages-shared.xml | 4 +- .../qemuxml2argvdata/pages-dimm-discard.args | 35 ----------- .../pages-dimm-discard.x86_64-latest.args | 38 ++++++++++++ .../pages-discard-hugepages.args | 34 ---------- ...pages-discard-hugepages.x86_64-latest.args | 36 +++++++++++ .../pages-discard-hugepages.xml | 4 +- tests/qemuxml2argvdata/pages-discard.args | 34 ---------- ....args => pages-discard.x86_64-latest.args} | 16 ++--- tests/qemuxml2argvdata/pages-discard.xml | 4 +- tests/qemuxml2argvtest.c | 62 +++++-------------- .../qemuxml2xmloutdata/hugepages-default.xml | 4 +- .../qemuxml2xmloutdata/hugepages-nodeset.xml | 4 +- .../hugepages-numa-default-2M.xml | 4 +- .../hugepages-numa-nodeset-part.xml | 4 +- .../hugepages-numa-nodeset.xml | 4 +- tests/qemuxml2xmloutdata/hugepages-shared.xml | 4 +- 44 files changed, 375 insertions(+), 372 deletions(-) rename tests/qemuxml2argvdata/{hugepages-default-system-size.args => hugepages-default-2M.x86_64-latest.args} (55%) rename tests/qemuxml2argvdata/{hugepages-default-2M.args => hugepages-default-system-size.x86_64-latest.args} (61%) rename tests/qemuxml2argvdata/{hugepages-default.args => hugepages-default.x86_64-latest.args} (51%) delete mode 100644 tests/qemuxml2argvdata/hugepages-memaccess.args create mode 100644 tests/qemuxml2argvdata/hugepages-memaccess.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/hugepages-memaccess2.args create mode 100644 tests/qemuxml2argvdata/hugepages-memaccess2.x86_64-latest.args rename tests/qemuxml2argvdata/{hugepages-nodeset-nonexist.err => hugepages-nodeset-nonexist.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{hugepages-numa-default-2M.args => hugepages-nodeset.x86_64-latest.args} (55%) rename tests/qemuxml2argvdata/{hugepages-nodeset.args => hugepages-numa-default-2M.x86_64-latest.args} (51%) rename tests/qemuxml2argvdata/{hugepages-numa-default-dimm.args => hugepages-numa-default-dimm.x86_64-latest.args} (51%) rename tests/qemuxml2argvdata/{hugepages-numa-default.args => hugepages-numa-default.x86_64-latest.args} (60%) rename tests/qemuxml2argvdata/{hugepages-numa-nodeset-nonexist.err => hugepages-numa-nodeset-nonexist.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{hugepages-numa-nodeset-part.args => hugepages-numa-nodeset-part.x86_64-latest.args} (60%) create mode 100644 tests/qemuxml2argvdata/hugepages-numa-nodeset.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/hugepages-shared.args create mode 100644 tests/qemuxml2argvdata/hugepages-shared.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pages-dimm-discard.args create mode 100644 tests/qemuxml2argvdata/pages-dimm-discard.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pages-discard-hugepages.args create mode 100644 tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pages-discard.args rename tests/qemuxml2argvdata/{hugepages-numa-nodeset.args => pages-discard.x86_64-latest.args} (59%) diff --git a/tests/qemuxml2argvdata/hugepages-default-system-size.args b/tests/qemuxml2argvdata/hugepages-default-2M.x86_64-latest.args similarity index 55% rename from tests/qemuxml2argvdata/hugepages-default-system-size.args rename to tests/qemuxml2argvdata/hugepages-default-2M.x86_64-latest.args index ba2fcb6d67..50f1228093 100644 --- a/tests/qemuxml2argvdata/hugepages-default-system-size.args +++ b/tests/qemuxml2argvdata/hugepages-default-2M.x86_64-latest.args @@ -6,13 +6,15 @@ LOGNAME=test \ XDG_DATA_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.local/share \ XDG_CACHE_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.cache \ XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -/usr/bin/qemu-system-i386 \ +/usr/bin/qemu-system-x86_64 \ -name guest=SomeDummyHugepagesGuest,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes \ --machine pc,usb=off,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ -accel tcg \ +-cpu qemu64 \ -m 1024 \ +-object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu","x-use-canonical-path-for-ramblock-id":false,"prealloc":true,"size":1073741824}' \ -overcommit mem-lock=off \ -smp 2,sockets=2,cores=1,threads=1 \ -uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \ @@ -25,6 +27,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --usb \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-default-2M.xml b/tests/qemuxml2argvdata/hugepages-default-2M.xml index fd3666c149..296933c6f2 100644 --- a/tests/qemuxml2argvdata/hugepages-default-2M.xml +++ b/tests/qemuxml2argvdata/hugepages-default-2M.xml @@ -10,7 +10,7 @@ </memoryBacking> <vcpu placement='static'>2</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <clock offset='utc'/> @@ -18,7 +18,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2argvdata/hugepages-default-2M.args b/tests/qemuxml2argvdata/hugepages-default-system-size.x86_64-latest.args similarity index 61% rename from tests/qemuxml2argvdata/hugepages-default-2M.args rename to tests/qemuxml2argvdata/hugepages-default-system-size.x86_64-latest.args index 55aa0e8f52..a65bff0546 100644 --- a/tests/qemuxml2argvdata/hugepages-default-2M.args +++ b/tests/qemuxml2argvdata/hugepages-default-system-size.x86_64-latest.args @@ -6,15 +6,15 @@ LOGNAME=test \ XDG_DATA_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.local/share \ XDG_CACHE_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.cache \ XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -/usr/bin/qemu-system-i386 \ +/usr/bin/qemu-system-x86_64 \ -name guest=SomeDummyHugepagesGuest,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes \ --machine pc,usb=off,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ -accel tcg \ +-cpu qemu64 \ -m 1024 \ --mem-prealloc \ --mem-path /dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \ -overcommit mem-lock=off \ -smp 2,sockets=2,cores=1,threads=1 \ -uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \ @@ -27,6 +27,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --usb \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-default-system-size.xml b/tests/qemuxml2argvdata/hugepages-default-system-size.xml index ac34623ed9..f9c99da400 100644 --- a/tests/qemuxml2argvdata/hugepages-default-system-size.xml +++ b/tests/qemuxml2argvdata/hugepages-default-system-size.xml @@ -10,7 +10,7 @@ </memoryBacking> <vcpu placement='static'>2</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <clock offset='utc'/> @@ -18,7 +18,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2argvdata/hugepages-default.args b/tests/qemuxml2argvdata/hugepages-default.x86_64-latest.args similarity index 51% rename from tests/qemuxml2argvdata/hugepages-default.args rename to tests/qemuxml2argvdata/hugepages-default.x86_64-latest.args index 9bfb277454..43e1b33e5b 100644 --- a/tests/qemuxml2argvdata/hugepages-default.args +++ b/tests/qemuxml2argvdata/hugepages-default.x86_64-latest.args @@ -6,15 +6,15 @@ LOGNAME=test \ XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -/usr/bin/qemu-system-i386 \ +/usr/bin/qemu-system-x86_64 \ -name guest=QEMUGuest1,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc,usb=off,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ -accel tcg \ +-cpu qemu64 \ -m 214 \ --mem-prealloc \ --mem-path /dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1 \ +-object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","x-use-canonical-path-for-ramblock-id":false,"prealloc":true,"size":224395264}' \ -overcommit mem-lock=off \ -smp 1,sockets=1,cores=1,threads=1 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ @@ -27,7 +27,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --usb \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-default.xml b/tests/qemuxml2argvdata/hugepages-default.xml index 18508b381f..de1006b7d7 100644 --- a/tests/qemuxml2argvdata/hugepages-default.xml +++ b/tests/qemuxml2argvdata/hugepages-default.xml @@ -8,7 +8,7 @@ </memoryBacking> <vcpu placement='static'>1</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <clock offset='utc'/> @@ -16,7 +16,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'/> <controller type='ide' index='0'/> <controller type='pci' index='0' model='pci-root'/> diff --git a/tests/qemuxml2argvdata/hugepages-memaccess.args b/tests/qemuxml2argvdata/hugepages-memaccess.args deleted file mode 100644 index 2d9431dab1..0000000000 --- a/tests/qemuxml2argvdata/hugepages-memaccess.args +++ /dev/null @@ -1,44 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest1 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -/usr/bin/qemu-system-i386 \ --name guest=QEMUGuest1,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc,usb=off,dump-guest-core=off \ --accel tcg \ --m size=4194304k,slots=16,maxmem=8388608k \ --overcommit mem-lock=off \ --smp 4,sockets=4,cores=1,threads=1 \ --object memory-backend-file,id=ram-node0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1,share=off,prealloc=on,size=1073741824,host-nodes=0-3,policy=bind \ --numa node,nodeid=0,cpus=0,memdev=ram-node0 \ --object memory-backend-file,id=ram-node1,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=1073741824,host-nodes=0-3,policy=bind \ --numa node,nodeid=1,cpus=1,memdev=ram-node1 \ --object memory-backend-file,id=ram-node2,mem-path=/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1,share=off,prealloc=on,size=1073741824,host-nodes=0-3,policy=bind \ --numa node,nodeid=2,cpus=2,memdev=ram-node2 \ --object memory-backend-file,id=ram-node3,mem-path=/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1,share=off,prealloc=on,size=1073741824,host-nodes=3,policy=bind \ --numa node,nodeid=3,cpus=3,memdev=ram-node3 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --usb \ --object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=536870912,host-nodes=0-3,policy=bind \ --device pc-dimm,node=1,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \ --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 \ --audiodev '{"id":"audio1","driver":"none"}' \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-memaccess.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-memaccess.x86_64-latest.args new file mode 100644 index 0000000000..55a8d899b7 --- /dev/null +++ b/tests/qemuxml2argvdata/hugepages-memaccess.x86_64-latest.args @@ -0,0 +1,46 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-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,usb=off,dump-guest-core=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=4194304k,slots=16,maxmem=8388608k \ +-overcommit mem-lock=off \ +-smp 4,sockets=4,cores=1,threads=1 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1","share":false,"prealloc":true,"size":1073741824,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-numa node,nodeid=0,cpus=0,memdev=ram-node0 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","share":true,"prealloc":true,"size":1073741824,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-numa node,nodeid=1,cpus=1,memdev=ram-node1 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node2","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1","share":false,"prealloc":true,"size":1073741824,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-numa node,nodeid=2,cpus=2,memdev=ram-node2 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node3","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1","share":false,"prealloc":true,"size":1073741824,"host-nodes":[3],"policy":"bind"}' \ +-numa node,nodeid=3,cpus=3,memdev=ram-node3 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-object '{"qom-type":"memory-backend-file","id":"memdimm0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","share":true,"prealloc":true,"size":536870912,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-device '{"driver":"pc-dimm","node":1,"memdev":"memdimm0","id":"dimm0","slot":0,"addr":4294967296}' \ +-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}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-memaccess.xml b/tests/qemuxml2argvdata/hugepages-memaccess.xml index e09a8af8af..9d63ac4a3d 100644 --- a/tests/qemuxml2argvdata/hugepages-memaccess.xml +++ b/tests/qemuxml2argvdata/hugepages-memaccess.xml @@ -17,7 +17,7 @@ <memnode cellid='3' mode='strict' nodeset='3'/> </numatune> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -33,7 +33,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/HostVG/QEMUGuest1'/> diff --git a/tests/qemuxml2argvdata/hugepages-memaccess2.args b/tests/qemuxml2argvdata/hugepages-memaccess2.args deleted file mode 100644 index 0264fc7da9..0000000000 --- a/tests/qemuxml2argvdata/hugepages-memaccess2.args +++ /dev/null @@ -1,44 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest1 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -/usr/bin/qemu-system-i386 \ --name guest=QEMUGuest1,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc,usb=off,dump-guest-core=off \ --accel tcg \ --m size=4194304k,slots=16,maxmem=8388608k \ --overcommit mem-lock=off \ --smp 4,sockets=4,cores=1,threads=1 \ --object memory-backend-file,id=ram-node0,mem-path=/var/lib/libvirt/qemu/ram/-1-QEMUGuest1/ram-node0,share=off,size=1073741824,host-nodes=0-3,policy=bind \ --numa node,nodeid=0,cpus=0,memdev=ram-node0 \ --object memory-backend-file,id=ram-node1,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=1073741824,host-nodes=0-3,policy=bind \ --numa node,nodeid=1,cpus=1,memdev=ram-node1 \ --object memory-backend-file,id=ram-node2,mem-path=/var/lib/libvirt/qemu/ram/-1-QEMUGuest1/ram-node2,share=off,size=1073741824,host-nodes=0-3,policy=bind \ --numa node,nodeid=2,cpus=2,memdev=ram-node2 \ --object memory-backend-file,id=ram-node3,mem-path=/var/lib/libvirt/qemu/ram/-1-QEMUGuest1/ram-node3,share=off,size=1073741824,host-nodes=3,policy=bind \ --numa node,nodeid=3,cpus=3,memdev=ram-node3 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --usb \ --object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=536870912,host-nodes=0-3,policy=bind \ --device pc-dimm,node=1,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \ --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 \ --audiodev '{"id":"audio1","driver":"none"}' \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-memaccess2.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-memaccess2.x86_64-latest.args new file mode 100644 index 0000000000..187c0ab214 --- /dev/null +++ b/tests/qemuxml2argvdata/hugepages-memaccess2.x86_64-latest.args @@ -0,0 +1,46 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-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,usb=off,dump-guest-core=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=4194304k,slots=16,maxmem=8388608k \ +-overcommit mem-lock=off \ +-smp 4,sockets=4,cores=1,threads=1 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/var/lib/libvirt/qemu/ram/-1-QEMUGuest1/ram-node0","share":false,"size":1073741824,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-numa node,nodeid=0,cpus=0,memdev=ram-node0 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","share":true,"prealloc":true,"size":1073741824,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-numa node,nodeid=1,cpus=1,memdev=ram-node1 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node2","mem-path":"/var/lib/libvirt/qemu/ram/-1-QEMUGuest1/ram-node2","share":false,"size":1073741824,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-numa node,nodeid=2,cpus=2,memdev=ram-node2 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node3","mem-path":"/var/lib/libvirt/qemu/ram/-1-QEMUGuest1/ram-node3","share":false,"size":1073741824,"host-nodes":[3],"policy":"bind"}' \ +-numa node,nodeid=3,cpus=3,memdev=ram-node3 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-object '{"qom-type":"memory-backend-file","id":"memdimm0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","share":true,"prealloc":true,"size":536870912,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-device '{"driver":"pc-dimm","node":1,"memdev":"memdimm0","id":"dimm0","slot":0,"addr":4294967296}' \ +-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}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-memaccess2.xml b/tests/qemuxml2argvdata/hugepages-memaccess2.xml index 714f70b31d..119662b773 100644 --- a/tests/qemuxml2argvdata/hugepages-memaccess2.xml +++ b/tests/qemuxml2argvdata/hugepages-memaccess2.xml @@ -17,7 +17,7 @@ <memnode cellid='3' mode='strict' nodeset='3'/> </numatune> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -33,7 +33,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/HostVG/QEMUGuest1'/> diff --git a/tests/qemuxml2argvdata/hugepages-nodeset-nonexist.err b/tests/qemuxml2argvdata/hugepages-nodeset-nonexist.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/hugepages-nodeset-nonexist.err rename to tests/qemuxml2argvdata/hugepages-nodeset-nonexist.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/hugepages-nodeset-nonexist.xml b/tests/qemuxml2argvdata/hugepages-nodeset-nonexist.xml index e082725844..1993a13aed 100644 --- a/tests/qemuxml2argvdata/hugepages-nodeset-nonexist.xml +++ b/tests/qemuxml2argvdata/hugepages-nodeset-nonexist.xml @@ -10,7 +10,7 @@ </memoryBacking> <vcpu placement='static'>2</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <clock offset='utc'/> @@ -18,7 +18,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2argvdata/hugepages-numa-default-2M.args b/tests/qemuxml2argvdata/hugepages-nodeset.x86_64-latest.args similarity index 55% rename from tests/qemuxml2argvdata/hugepages-numa-default-2M.args rename to tests/qemuxml2argvdata/hugepages-nodeset.x86_64-latest.args index 75c0e8e7ca..50f1228093 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-default-2M.args +++ b/tests/qemuxml2argvdata/hugepages-nodeset.x86_64-latest.args @@ -6,19 +6,17 @@ LOGNAME=test \ XDG_DATA_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.local/share \ XDG_CACHE_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.cache \ XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -/usr/bin/qemu-system-i386 \ +/usr/bin/qemu-system-x86_64 \ -name guest=SomeDummyHugepagesGuest,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes \ --machine pc,usb=off,dump-guest-core=off \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram \ -accel tcg \ +-cpu qemu64 \ -m 1024 \ +-object '{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu","x-use-canonical-path-for-ramblock-id":false,"prealloc":true,"size":1073741824}' \ -overcommit mem-lock=off \ -smp 2,sockets=2,cores=1,threads=1 \ --mem-prealloc \ --mem-path /dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu \ --numa node,nodeid=0,cpus=0,mem=256 \ --numa node,nodeid=1,cpus=1,mem=768 \ -uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \ -display none \ -no-user-config \ @@ -29,6 +27,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --usb \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-nodeset.xml b/tests/qemuxml2argvdata/hugepages-nodeset.xml index 6aae88741c..5549cb82ff 100644 --- a/tests/qemuxml2argvdata/hugepages-nodeset.xml +++ b/tests/qemuxml2argvdata/hugepages-nodeset.xml @@ -10,7 +10,7 @@ </memoryBacking> <vcpu placement='static'>2</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <clock offset='utc'/> @@ -18,7 +18,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2argvdata/hugepages-nodeset.args b/tests/qemuxml2argvdata/hugepages-numa-default-2M.x86_64-latest.args similarity index 51% rename from tests/qemuxml2argvdata/hugepages-nodeset.args rename to tests/qemuxml2argvdata/hugepages-numa-default-2M.x86_64-latest.args index 55aa0e8f52..55e21da98b 100644 --- a/tests/qemuxml2argvdata/hugepages-nodeset.args +++ b/tests/qemuxml2argvdata/hugepages-numa-default-2M.x86_64-latest.args @@ -6,17 +6,20 @@ LOGNAME=test \ XDG_DATA_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.local/share \ XDG_CACHE_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.cache \ XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -/usr/bin/qemu-system-i386 \ +/usr/bin/qemu-system-x86_64 \ -name guest=SomeDummyHugepagesGuest,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes"}' \ -machine pc,usb=off,dump-guest-core=off \ -accel tcg \ +-cpu qemu64 \ -m 1024 \ --mem-prealloc \ --mem-path /dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu \ -overcommit mem-lock=off \ -smp 2,sockets=2,cores=1,threads=1 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu","prealloc":true,"size":268435456}' \ +-numa node,nodeid=0,cpus=0,memdev=ram-node0 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu","prealloc":true,"size":805306368}' \ +-numa node,nodeid=1,cpus=1,memdev=ram-node1 \ -uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \ -display none \ -no-user-config \ @@ -27,6 +30,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --usb \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml b/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml index 87811aaf4b..130af8dd81 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml +++ b/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml @@ -10,7 +10,7 @@ </memoryBacking> <vcpu placement='static'>2</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -24,7 +24,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'/> <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> diff --git a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.x86_64-latest.args similarity index 51% rename from tests/qemuxml2argvdata/hugepages-numa-default-dimm.args rename to tests/qemuxml2argvdata/hugepages-numa-default-dimm.x86_64-latest.args index 0cde2b06d3..015464bded 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args +++ b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.x86_64-latest.args @@ -9,15 +9,15 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ /usr/bin/qemu-system-x86_64 \ -name guest=fedora,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-fedora/master-key.aes \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-fedora/master-key.aes"}' \ -machine pc,usb=off,dump-guest-core=off \ -accel tcg \ +-cpu qemu64 \ -m size=1048576k,slots=16,maxmem=1099511627776k \ -overcommit mem-lock=off \ -smp 2,sockets=2,cores=1,threads=1 \ --mem-prealloc \ --mem-path /dev/hugepages2M/libvirt/qemu/-1-fedora \ --numa node,nodeid=0,cpus=0-1,mem=1024 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-fedora","prealloc":true,"size":1073741824}' \ +-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ -display none \ -no-user-config \ @@ -28,8 +28,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --usb \ --object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,size=1073741824,host-nodes=1-3,policy=bind \ --device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-object '{"qom-type":"memory-backend-file","id":"memdimm0","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-fedora","prealloc":true,"size":1073741824,"host-nodes":[1,2,3],"policy":"bind"}' \ +-device '{"driver":"pc-dimm","node":0,"memdev":"memdimm0","id":"dimm0","slot":0}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-numa-default.args b/tests/qemuxml2argvdata/hugepages-numa-default.x86_64-latest.args similarity index 60% rename from tests/qemuxml2argvdata/hugepages-numa-default.args rename to tests/qemuxml2argvdata/hugepages-numa-default.x86_64-latest.args index ea1766ab2f..450fcb15fe 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-default.args +++ b/tests/qemuxml2argvdata/hugepages-numa-default.x86_64-latest.args @@ -9,15 +9,15 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ /usr/bin/qemu-system-x86_64 \ -name guest=fedora,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-fedora/master-key.aes \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-fedora/master-key.aes"}' \ -machine pc,usb=off,dump-guest-core=off \ -accel tcg \ +-cpu qemu64 \ -m 1024 \ -overcommit mem-lock=off \ -smp 2,sockets=2,cores=1,threads=1 \ --mem-prealloc \ --mem-path /dev/hugepages2M/libvirt/qemu/-1-fedora \ --numa node,nodeid=0,cpus=0-1,mem=1024 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-fedora","prealloc":true,"size":1073741824}' \ +-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ -display none \ -no-user-config \ @@ -28,6 +28,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --usb \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-numa-nodeset-nonexist.err b/tests/qemuxml2argvdata/hugepages-numa-nodeset-nonexist.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/hugepages-numa-nodeset-nonexist.err rename to tests/qemuxml2argvdata/hugepages-numa-nodeset-nonexist.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/hugepages-numa-nodeset-nonexist.xml b/tests/qemuxml2argvdata/hugepages-numa-nodeset-nonexist.xml index eed8922071..4b26e07ad5 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-nodeset-nonexist.xml +++ b/tests/qemuxml2argvdata/hugepages-numa-nodeset-nonexist.xml @@ -11,7 +11,7 @@ </memoryBacking> <vcpu placement='static'>4</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -27,7 +27,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.args b/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.x86_64-latest.args similarity index 60% rename from tests/qemuxml2argvdata/hugepages-numa-nodeset-part.args rename to tests/qemuxml2argvdata/hugepages-numa-nodeset-part.x86_64-latest.args index 5af3aa370e..d1300996c3 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.args +++ b/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.x86_64-latest.args @@ -6,18 +6,19 @@ LOGNAME=test \ XDG_DATA_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.local/share \ XDG_CACHE_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.cache \ XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -/usr/bin/qemu-system-i386 \ +/usr/bin/qemu-system-x86_64 \ -name guest=SomeDummyHugepagesGuest,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes"}' \ -machine pc,usb=off,dump-guest-core=off \ -accel tcg \ +-cpu qemu64 \ -m 1024 \ -overcommit mem-lock=off \ -smp 2,sockets=2,cores=1,threads=1 \ --object memory-backend-ram,id=ram-node0,size=268435456 \ +-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":268435456}' \ -numa node,nodeid=0,cpus=0,memdev=ram-node0 \ --object memory-backend-file,id=ram-node1,mem-path=/dev/hugepages1G/libvirt/qemu/-1-SomeDummyHugepagesGu,prealloc=on,size=805306368 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-SomeDummyHugepagesGu","prealloc":true,"size":805306368}' \ -numa node,nodeid=1,cpus=1,memdev=ram-node1 \ -uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \ -display none \ @@ -29,6 +30,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --usb \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml b/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml index 6c0eb24c98..5fbf6b5e85 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml +++ b/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml @@ -10,7 +10,7 @@ </memoryBacking> <vcpu placement='static'>2</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -24,7 +24,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'/> <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> diff --git a/tests/qemuxml2argvdata/hugepages-numa-nodeset.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-numa-nodeset.x86_64-latest.args new file mode 100644 index 0000000000..62a5eca51f --- /dev/null +++ b/tests/qemuxml2argvdata/hugepages-numa-nodeset.x86_64-latest.args @@ -0,0 +1,40 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-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,usb=off,dump-guest-core=off \ +-accel tcg \ +-cpu qemu64 \ +-m 4096 \ +-overcommit mem-lock=off \ +-smp 4,sockets=4,cores=1,threads=1 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1","prealloc":true,"size":1073741824}' \ +-numa node,nodeid=0,cpus=0,memdev=ram-node0 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","prealloc":true,"size":1073741824}' \ +-numa node,nodeid=1,cpus=1,memdev=ram-node1 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node2","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1","prealloc":true,"size":1073741824}' \ +-numa node,nodeid=2,cpus=2,memdev=ram-node2 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node3","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1","prealloc":true,"size":1073741824}' \ +-numa node,nodeid=3,cpus=3,memdev=ram-node3 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml b/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml index 00d390dc20..31ebc1553a 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml +++ b/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml @@ -11,7 +11,7 @@ </memoryBacking> <vcpu placement='static'>4</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -27,7 +27,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'/> <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> diff --git a/tests/qemuxml2argvdata/hugepages-shared.args b/tests/qemuxml2argvdata/hugepages-shared.args deleted file mode 100644 index 08ce2f49cd..0000000000 --- a/tests/qemuxml2argvdata/hugepages-shared.args +++ /dev/null @@ -1,42 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest1 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -/usr/bin/qemu-system-i386 \ --name guest=QEMUGuest1,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc,usb=off,dump-guest-core=off \ --accel tcg \ --m 4096 \ --overcommit mem-lock=off \ --smp 4,sockets=4,cores=1,threads=1 \ --object memory-backend-file,id=ram-node0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=1073741824,host-nodes=0-3,policy=bind \ --numa node,nodeid=0,cpus=0,memdev=ram-node0 \ --object memory-backend-file,id=ram-node1,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=1073741824,host-nodes=0-3,policy=bind \ --numa node,nodeid=1,cpus=1,memdev=ram-node1 \ --object memory-backend-file,id=ram-node2,mem-path=/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1,share=off,prealloc=on,size=1073741824,host-nodes=0-3,policy=bind \ --numa node,nodeid=2,cpus=2,memdev=ram-node2 \ --object memory-backend-file,id=ram-node3,mem-path=/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=1073741824,host-nodes=3,policy=bind \ --numa node,nodeid=3,cpus=3,memdev=ram-node3 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --usb \ --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 \ --audiodev '{"id":"audio1","driver":"none"}' \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-shared.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-shared.x86_64-latest.args new file mode 100644 index 0000000000..f4fea870fc --- /dev/null +++ b/tests/qemuxml2argvdata/hugepages-shared.x86_64-latest.args @@ -0,0 +1,44 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-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,usb=off,dump-guest-core=off \ +-accel tcg \ +-cpu qemu64 \ +-m 4096 \ +-overcommit mem-lock=off \ +-smp 4,sockets=4,cores=1,threads=1 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1","prealloc":true,"size":1073741824,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-numa node,nodeid=0,cpus=0,memdev=ram-node0 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","share":true,"prealloc":true,"size":1073741824,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-numa node,nodeid=1,cpus=1,memdev=ram-node1 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node2","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1","share":false,"prealloc":true,"size":1073741824,"host-nodes":[0,1,2,3],"policy":"bind"}' \ +-numa node,nodeid=2,cpus=2,memdev=ram-node2 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node3","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1","prealloc":true,"size":1073741824,"host-nodes":[3],"policy":"bind"}' \ +-numa node,nodeid=3,cpus=3,memdev=ram-node3 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-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}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-shared.xml b/tests/qemuxml2argvdata/hugepages-shared.xml index 462ca8a5ae..33abe71d9e 100644 --- a/tests/qemuxml2argvdata/hugepages-shared.xml +++ b/tests/qemuxml2argvdata/hugepages-shared.xml @@ -15,7 +15,7 @@ <memnode cellid='3' mode='strict' nodeset='3'/> </numatune> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -31,7 +31,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='block' device='disk'> <source dev='/dev/HostVG/QEMUGuest1'/> <target dev='hda' bus='ide'/> diff --git a/tests/qemuxml2argvdata/pages-dimm-discard.args b/tests/qemuxml2argvdata/pages-dimm-discard.args deleted file mode 100644 index 7f2cfa4234..0000000000 --- a/tests/qemuxml2argvdata/pages-dimm-discard.args +++ /dev/null @@ -1,35 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-fedora \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-fedora/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-fedora/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -/usr/bin/qemu-system-x86_64 \ --name guest=fedora,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-fedora/master-key.aes \ --machine pc,usb=off,dump-guest-core=off \ --accel tcg \ --m size=1048576k,slots=16,maxmem=1099511627776k \ --overcommit mem-lock=off \ --smp 2,sockets=2,cores=1,threads=1 \ --numa node,nodeid=0,cpus=0-1,mem=1024 \ --uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --usb \ --object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,prealloc=on,size=1073741824,host-nodes=1-3,policy=bind \ --device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ --object memory-backend-file,id=memdimm1,mem-path=/var/lib/libvirt/qemu/ram/-1-fedora/dimm1,discard-data=on,share=off,size=536870912 \ --device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \ --audiodev '{"id":"audio1","driver":"none"}' \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/pages-dimm-discard.x86_64-latest.args b/tests/qemuxml2argvdata/pages-dimm-discard.x86_64-latest.args new file mode 100644 index 0000000000..6324443e93 --- /dev/null +++ b/tests/qemuxml2argvdata/pages-dimm-discard.x86_64-latest.args @@ -0,0 +1,38 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-fedora \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-fedora/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-fedora/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=fedora,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-fedora/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off \ +-accel tcg \ +-cpu qemu64 \ +-m size=1048576k,slots=16,maxmem=1099511627776k \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,cores=1,threads=1 \ +-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":1073741824}' \ +-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \ +-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-object '{"qom-type":"memory-backend-file","id":"memdimm0","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-fedora","prealloc":true,"size":1073741824,"host-nodes":[1,2,3],"policy":"bind"}' \ +-device '{"driver":"pc-dimm","node":0,"memdev":"memdimm0","id":"dimm0","slot":0}' \ +-object '{"qom-type":"memory-backend-file","id":"memdimm1","mem-path":"/var/lib/libvirt/qemu/ram/-1-fedora/dimm1","discard-data":true,"share":false,"size":536870912}' \ +-device '{"driver":"pc-dimm","node":0,"memdev":"memdimm1","id":"dimm1","slot":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/pages-discard-hugepages.args b/tests/qemuxml2argvdata/pages-discard-hugepages.args deleted file mode 100644 index 75c0e8e7ca..0000000000 --- a/tests/qemuxml2argvdata/pages-discard-hugepages.args +++ /dev/null @@ -1,34 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -/usr/bin/qemu-system-i386 \ --name guest=SomeDummyHugepagesGuest,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes \ --machine pc,usb=off,dump-guest-core=off \ --accel tcg \ --m 1024 \ --overcommit mem-lock=off \ --smp 2,sockets=2,cores=1,threads=1 \ --mem-prealloc \ --mem-path /dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu \ --numa node,nodeid=0,cpus=0,mem=256 \ --numa node,nodeid=1,cpus=1,mem=768 \ --uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --usb \ --audiodev '{"id":"audio1","driver":"none"}' \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args b/tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args new file mode 100644 index 0000000000..880e0de192 --- /dev/null +++ b/tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args @@ -0,0 +1,36 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=SomeDummyHugepagesGuest,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-SomeDummyHugepagesGu/master-key.aes"}' \ +-machine pc,usb=off,dump-guest-core=off \ +-accel tcg \ +-cpu qemu64 \ +-m 1024 \ +-overcommit mem-lock=off \ +-smp 2,sockets=2,cores=1,threads=1 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu","prealloc":true,"size":268435456}' \ +-numa node,nodeid=0,cpus=0,memdev=ram-node0 \ +-object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu","discard-data":true,"prealloc":true,"size":805306368}' \ +-numa node,nodeid=1,cpus=1,memdev=ram-node1 \ +-uuid ef1bdff4-27f3-4e85-a807-5fb4d58463cc \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-no-acpi \ +-boot strict=on \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/pages-discard-hugepages.xml b/tests/qemuxml2argvdata/pages-discard-hugepages.xml index 953d0c5d20..70c5eca0d0 100644 --- a/tests/qemuxml2argvdata/pages-discard-hugepages.xml +++ b/tests/qemuxml2argvdata/pages-discard-hugepages.xml @@ -8,7 +8,7 @@ </memoryBacking> <vcpu placement='static'>2</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -22,7 +22,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2argvdata/pages-discard.args b/tests/qemuxml2argvdata/pages-discard.args deleted file mode 100644 index b7d2731755..0000000000 --- a/tests/qemuxml2argvdata/pages-discard.args +++ /dev/null @@ -1,34 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest1 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -/usr/bin/qemu-system-i386 \ --name guest=QEMUGuest1,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine pc,usb=off,dump-guest-core=off \ --accel tcg \ --m 4096 \ --overcommit mem-lock=off \ --smp 4,sockets=4,cores=1,threads=1 \ --numa node,nodeid=0,cpus=0,mem=1024 \ --numa node,nodeid=1,cpus=1,mem=1024 \ --numa node,nodeid=2,cpus=2,mem=1024 \ --numa node,nodeid=3,cpus=3,mem=1024 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ --mon chardev=charmonitor,id=monitor,mode=control \ --rtc base=utc \ --no-shutdown \ --no-acpi \ --boot strict=on \ --usb \ --audiodev '{"id":"audio1","driver":"none"}' \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/hugepages-numa-nodeset.args b/tests/qemuxml2argvdata/pages-discard.x86_64-latest.args similarity index 59% rename from tests/qemuxml2argvdata/hugepages-numa-nodeset.args rename to tests/qemuxml2argvdata/pages-discard.x86_64-latest.args index 89018d92a2..4f43c6f504 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-nodeset.args +++ b/tests/qemuxml2argvdata/pages-discard.x86_64-latest.args @@ -6,22 +6,23 @@ LOGNAME=test \ XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -/usr/bin/qemu-system-i386 \ +/usr/bin/qemu-system-x86_64 \ -name guest=QEMUGuest1,debug-threads=on \ -S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ -machine pc,usb=off,dump-guest-core=off \ -accel tcg \ +-cpu qemu64 \ -m 4096 \ -overcommit mem-lock=off \ -smp 4,sockets=4,cores=1,threads=1 \ --object memory-backend-file,id=ram-node0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=1073741824 \ +-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":1073741824}' \ -numa node,nodeid=0,cpus=0,memdev=ram-node0 \ --object memory-backend-file,id=ram-node1,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=1073741824 \ +-object '{"qom-type":"memory-backend-ram","id":"ram-node1","size":1073741824}' \ -numa node,nodeid=1,cpus=1,memdev=ram-node1 \ --object memory-backend-file,id=ram-node2,mem-path=/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=1073741824 \ +-object '{"qom-type":"memory-backend-ram","id":"ram-node2","size":1073741824}' \ -numa node,nodeid=2,cpus=2,memdev=ram-node2 \ --object memory-backend-file,id=ram-node3,mem-path=/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=1073741824 \ +-object '{"qom-type":"memory-backend-ram","id":"ram-node3","size":1073741824}' \ -numa node,nodeid=3,cpus=3,memdev=ram-node3 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ -display none \ @@ -33,6 +34,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -no-shutdown \ -no-acpi \ -boot strict=on \ --usb \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on diff --git a/tests/qemuxml2argvdata/pages-discard.xml b/tests/qemuxml2argvdata/pages-discard.xml index 58a59a370c..99b842dabf 100644 --- a/tests/qemuxml2argvdata/pages-discard.xml +++ b/tests/qemuxml2argvdata/pages-discard.xml @@ -8,7 +8,7 @@ </memoryBacking> <vcpu placement='static'>4</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -24,7 +24,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7ede68d555..227493fe32 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1214,54 +1214,26 @@ mymain(void) DO_TEST_NOCAPS("pmu-feature"); DO_TEST_NOCAPS("pmu-feature-off"); - DO_TEST("pages-discard", - QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD); - DO_TEST("pages-discard-hugepages", - QEMU_CAPS_OBJECT_MEMORY_RAM, - QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD); - DO_TEST("pages-dimm-discard", - QEMU_CAPS_DEVICE_PC_DIMM, - QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD); - DO_TEST("hugepages-default", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-default-2M", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-default-system-size", QEMU_CAPS_OBJECT_MEMORY_FILE); + DO_TEST_CAPS_LATEST("pages-discard"); + DO_TEST_CAPS_LATEST("pages-discard-hugepages"); + DO_TEST_CAPS_LATEST("pages-dimm-discard"); + DO_TEST_CAPS_LATEST("hugepages-default"); + DO_TEST_CAPS_LATEST("hugepages-default-2M"); + DO_TEST_CAPS_LATEST("hugepages-default-system-size"); DO_TEST_CAPS_LATEST_FAILURE("hugepages-default-5M"); DO_TEST_PARSE_ERROR_NOCAPS("hugepages-default-1G-nodeset-2M"); - DO_TEST("hugepages-nodeset", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST_PARSE_ERROR("hugepages-nodeset-nonexist", - QEMU_CAPS_DEVICE_PC_DIMM, - QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD); - DO_TEST("hugepages-numa-default", - QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-numa-default-2M", - QEMU_CAPS_OBJECT_MEMORY_RAM, - QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-numa-default-dimm", - QEMU_CAPS_DEVICE_PC_DIMM, - QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-numa-nodeset", - QEMU_CAPS_OBJECT_MEMORY_RAM, - QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-numa-nodeset-part", - QEMU_CAPS_OBJECT_MEMORY_RAM, - QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST_PARSE_ERROR("hugepages-numa-nodeset-nonexist", - QEMU_CAPS_OBJECT_MEMORY_RAM, - QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-shared", - QEMU_CAPS_OBJECT_MEMORY_RAM, - QEMU_CAPS_OBJECT_MEMORY_FILE); + DO_TEST_CAPS_LATEST("hugepages-nodeset"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("hugepages-nodeset-nonexist"); + DO_TEST_CAPS_LATEST("hugepages-numa-default"); + DO_TEST_CAPS_LATEST("hugepages-numa-default-2M"); + DO_TEST_CAPS_LATEST("hugepages-numa-default-dimm"); + DO_TEST_CAPS_LATEST("hugepages-numa-nodeset"); + DO_TEST_CAPS_LATEST("hugepages-numa-nodeset-part"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("hugepages-numa-nodeset-nonexist"); + DO_TEST_CAPS_LATEST("hugepages-shared"); DO_TEST_PARSE_ERROR_NOCAPS("hugepages-memaccess-invalid"); - DO_TEST("hugepages-memaccess", QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_DEVICE_PC_DIMM, - QEMU_CAPS_NUMA); - DO_TEST("hugepages-memaccess2", QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_DEVICE_PC_DIMM, - QEMU_CAPS_NUMA); + DO_TEST_CAPS_LATEST("hugepages-memaccess"); + DO_TEST_CAPS_LATEST("hugepages-memaccess2"); DO_TEST_PARSE_ERROR("hugepages-memaccess3", QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE); diff --git a/tests/qemuxml2xmloutdata/hugepages-default.xml b/tests/qemuxml2xmloutdata/hugepages-default.xml index e14eb577a8..977993fa52 100644 --- a/tests/qemuxml2xmloutdata/hugepages-default.xml +++ b/tests/qemuxml2xmloutdata/hugepages-default.xml @@ -8,7 +8,7 @@ </memoryBacking> <vcpu placement='static'>1</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <clock offset='utc'/> @@ -16,7 +16,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2xmloutdata/hugepages-nodeset.xml b/tests/qemuxml2xmloutdata/hugepages-nodeset.xml index fd3666c149..296933c6f2 100644 --- a/tests/qemuxml2xmloutdata/hugepages-nodeset.xml +++ b/tests/qemuxml2xmloutdata/hugepages-nodeset.xml @@ -10,7 +10,7 @@ </memoryBacking> <vcpu placement='static'>2</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <clock offset='utc'/> @@ -18,7 +18,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml b/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml index b12b9735c8..bf9f352d98 100644 --- a/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml +++ b/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml @@ -10,7 +10,7 @@ </memoryBacking> <vcpu placement='static'>2</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -24,7 +24,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml index 3ca5a1fcaf..177faaa19f 100644 --- a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml +++ b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml @@ -10,7 +10,7 @@ </memoryBacking> <vcpu placement='static'>2</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -24,7 +24,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml index 2122f76aee..e63407d1e2 100644 --- a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml +++ b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml @@ -11,7 +11,7 @@ </memoryBacking> <vcpu placement='static'>4</vcpu> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -27,7 +27,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> diff --git a/tests/qemuxml2xmloutdata/hugepages-shared.xml b/tests/qemuxml2xmloutdata/hugepages-shared.xml index 4dcabe06f8..4310442936 100644 --- a/tests/qemuxml2xmloutdata/hugepages-shared.xml +++ b/tests/qemuxml2xmloutdata/hugepages-shared.xml @@ -15,7 +15,7 @@ <memnode cellid='3' mode='strict' nodeset='3'/> </numatune> <os> - <type arch='i686' machine='pc'>hvm</type> + <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> <cpu> @@ -31,7 +31,7 @@ <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> - <emulator>/usr/bin/qemu-system-i386</emulator> + <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='block' device='disk'> <driver name='qemu' type='raw'/> <source dev='/dev/HostVG/QEMUGuest1'/> -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
Currently, we have maybe a dozen tests for hugepages related stuff in qemuxml2argvtest. In all cases DO_TEST() is used, which means we have to enumerate all capabilities needed (though, it's usually just QEMU_CAPS_OBJECT_MEMORY_RAM and QEMU_CAPS_OBJECT_MEMORY_FILE, exceptionally QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD too).
Nevertheless, these caps made sense back in QEMU 2.X era when these objects were being introduced. But now, almost 8 years after the fact we can safely assume every QEMU knows these caps. Therefore, switch to DO_TEST_CAPS_LATEST().
This paragraph feels misleading. Of course the latest QEMU we support will know them, if they are even in the oldest QEMU we support. How about: Instead of deleting the caps flags one-by-one, just switch the tests to use DO_CAPS_LATEST().
The qemuxml2xmltest will undergo similar treatment in next commit.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- ...> hugepages-default-2M.x86_64-latest.args} | 11 ++-- .../qemuxml2argvdata/hugepages-default-2M.xml | 4 +- ...es-default-system-size.x86_64-latest.args} | 13 ++-- [...] .../hugepages-numa-nodeset-part.xml | 4 +- .../hugepages-numa-nodeset.xml | 4 +- tests/qemuxml2xmloutdata/hugepages-shared.xml | 4 +- 44 files changed, 375 insertions(+), 372 deletions(-) rename tests/qemuxml2argvdata/{hugepages-default-system-size.args => hugepages-default-2M.x86_64-latest.args} (55%) rename tests/qemuxml2argvdata/{hugepages-default-2M.args => hugepages-default-system-size.x86_64-latest.args} (61%) rename tests/qemuxml2argvdata/{hugepages-default.args => hugepages-default.x86_64-latest.args} (51%) delete mode 100644 tests/qemuxml2argvdata/hugepages-memaccess.args [...] delete mode 100644 tests/qemuxml2argvdata/pages-discard-hugepages.args create mode 100644 tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/pages-discard.args rename tests/qemuxml2argvdata/{hugepages-numa-nodeset.args => pages-discard.x86_64-latest.args} (59%)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Currently, we have maybe a dozen tests for hugepages related stuff in qemuxml2xmltest. In all cases DO_TEST() is used, which means we have to enumerate all capabilities needed (though, it's usually just QEMU_CAPS_OBJECT_MEMORY_RAM and QEMU_CAPS_OBJECT_MEMORY_FILE, exceptionally QEMU_CAPS_DEVICE_PC_DIMM too). Nevertheless, these caps made sense back in QEMU 2.X era when these objects were being introduced. But now, almost 8 years after the fact we can safely assume every QEMU knows these caps. Therefore, switch to DO_TEST_CAPS_LATEST(). Since some of our expected output files are just a symlink to their respective input files, these are changed too. But from QEMU's POV nothing changes as no .args file is changed. Oh, and I'm also adding a 'hugepages-memaccess3' test case, which was missing, surprisingly. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- .../qemuxml2argvdata/hugepages-default-2M.xml | 5 +- .../hugepages-default-system-size.xml | 5 +- tests/qemuxml2argvdata/hugepages-default.xml | 16 +++++- .../qemuxml2argvdata/hugepages-memaccess.xml | 5 +- .../qemuxml2argvdata/hugepages-memaccess2.xml | 5 +- .../qemuxml2argvdata/hugepages-memaccess3.xml | 10 +++- tests/qemuxml2argvdata/hugepages-nodeset.xml | 8 ++- .../hugepages-numa-default-2M.xml | 8 ++- .../hugepages-numa-default-dimm.xml | 5 +- .../hugepages-numa-nodeset-part.xml | 8 ++- .../hugepages-numa-nodeset.xml | 8 ++- tests/qemuxml2argvdata/hugepages-nvdimm.xml | 5 +- tests/qemuxml2argvdata/hugepages-shared.xml | 17 ++++-- tests/qemuxml2argvdata/pages-dimm-discard.xml | 5 +- .../pages-discard-hugepages.xml | 5 +- ...=> hugepages-default-2M.x86_64-latest.xml} | 0 ...ges-default-system-size.x86_64-latest.xml} | 0 .../hugepages-default.x86_64-latest.xml | 1 + .../qemuxml2xmloutdata/hugepages-default.xml | 34 ------------ ... => hugepages-memaccess.x86_64-latest.xml} | 0 ...=> hugepages-memaccess2.x86_64-latest.xml} | 0 .../hugepages-memaccess3.x86_64-latest.xml | 1 + .../hugepages-nodeset.x86_64-latest.xml | 1 + .../qemuxml2xmloutdata/hugepages-nodeset.xml | 31 ----------- ...ugepages-numa-default-2M.x86_64-latest.xml | 1 + .../hugepages-numa-default-2M.xml | 37 ------------- ...pages-numa-default-dimm.x86_64-latest.xml} | 0 ...epages-numa-nodeset-part.x86_64-latest.xml | 1 + .../hugepages-numa-nodeset-part.xml | 37 ------------- .../hugepages-numa-nodeset.x86_64-latest.xml | 1 + .../hugepages-numa-nodeset.xml | 40 -------------- ...xml => hugepages-nvdimm.x86_64-latest.xml} | 0 .../hugepages-shared.x86_64-latest.xml | 1 + tests/qemuxml2xmloutdata/hugepages-shared.xml | 55 ------------------- ...l => pages-dimm-discard.x86_64-latest.xml} | 0 ...pages-discard-hugepages.x86_64-latest.xml} | 0 tests/qemuxml2xmltest.c | 33 +++++------ 37 files changed, 107 insertions(+), 282 deletions(-) rename tests/qemuxml2xmloutdata/{hugepages-default-2M.xml => hugepages-default-2M.x86_64-latest.xml} (100%) rename tests/qemuxml2xmloutdata/{hugepages-default-system-size.xml => hugepages-default-system-size.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-default.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-default.xml rename tests/qemuxml2xmloutdata/{hugepages-memaccess.xml => hugepages-memaccess.x86_64-latest.xml} (100%) rename tests/qemuxml2xmloutdata/{hugepages-memaccess2.xml => hugepages-memaccess2.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-memaccess3.x86_64-latest.xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-nodeset.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-nodeset.xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-default-2M.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml rename tests/qemuxml2xmloutdata/{hugepages-numa-default-dimm.xml => hugepages-numa-default-dimm.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-nodeset.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml rename tests/qemuxml2xmloutdata/{hugepages-nvdimm.xml => hugepages-nvdimm.x86_64-latest.xml} (100%) create mode 120000 tests/qemuxml2xmloutdata/hugepages-shared.x86_64-latest.xml delete mode 100644 tests/qemuxml2xmloutdata/hugepages-shared.xml rename tests/qemuxml2xmloutdata/{pages-dimm-discard.xml => pages-dimm-discard.x86_64-latest.xml} (100%) rename tests/qemuxml2xmloutdata/{pages-discard-hugepages.xml => pages-discard-hugepages.x86_64-latest.xml} (100%) diff --git a/tests/qemuxml2argvdata/hugepages-default-2M.xml b/tests/qemuxml2argvdata/hugepages-default-2M.xml index 296933c6f2..49d1f45c0d 100644 --- a/tests/qemuxml2argvdata/hugepages-default-2M.xml +++ b/tests/qemuxml2argvdata/hugepages-default-2M.xml @@ -13,13 +13,16 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</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-x86_64</emulator> - <controller type='usb' index='0'> + <controller type='usb' index='0' model='piix3-uhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'/> diff --git a/tests/qemuxml2argvdata/hugepages-default-system-size.xml b/tests/qemuxml2argvdata/hugepages-default-system-size.xml index f9c99da400..7cb8078844 100644 --- a/tests/qemuxml2argvdata/hugepages-default-system-size.xml +++ b/tests/qemuxml2argvdata/hugepages-default-system-size.xml @@ -13,13 +13,16 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</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-x86_64</emulator> - <controller type='usb' index='0'> + <controller type='usb' index='0' model='piix3-uhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'/> diff --git a/tests/qemuxml2argvdata/hugepages-default.xml b/tests/qemuxml2argvdata/hugepages-default.xml index de1006b7d7..9e4568bcf3 100644 --- a/tests/qemuxml2argvdata/hugepages-default.xml +++ b/tests/qemuxml2argvdata/hugepages-default.xml @@ -11,17 +11,27 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</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-x86_64</emulator> - <controller type='usb' index='0'/> - <controller type='ide' index='0'/> + <controller type='usb' index='0' model='piix3-uhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='ide' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <memballoon model='virtio'/> + <audio id='1' type='none'/> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </memballoon> </devices> </domain> diff --git a/tests/qemuxml2argvdata/hugepages-memaccess.xml b/tests/qemuxml2argvdata/hugepages-memaccess.xml index 9d63ac4a3d..56973edb70 100644 --- a/tests/qemuxml2argvdata/hugepages-memaccess.xml +++ b/tests/qemuxml2argvdata/hugepages-memaccess.xml @@ -20,7 +20,8 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> <numa> <cell id='0' cpus='0' memory='1048576' unit='KiB'/> <cell id='1' cpus='1' memory='1048576' unit='KiB' memAccess='shared'/> @@ -40,7 +41,7 @@ <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> - <controller type='usb' index='0'> + <controller type='usb' index='0' model='piix3-uhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='ide' index='0'> diff --git a/tests/qemuxml2argvdata/hugepages-memaccess2.xml b/tests/qemuxml2argvdata/hugepages-memaccess2.xml index 119662b773..043650db6c 100644 --- a/tests/qemuxml2argvdata/hugepages-memaccess2.xml +++ b/tests/qemuxml2argvdata/hugepages-memaccess2.xml @@ -20,7 +20,8 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> <numa> <cell id='0' cpus='0' memory='1048576' unit='KiB'/> <cell id='1' cpus='1' memory='1048576' unit='KiB' memAccess='shared'/> @@ -40,7 +41,7 @@ <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> - <controller type='usb' index='0'> + <controller type='usb' index='0' model='piix3-uhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='ide' index='0'> diff --git a/tests/qemuxml2argvdata/hugepages-memaccess3.xml b/tests/qemuxml2argvdata/hugepages-memaccess3.xml index 54b27e971d..399e58acc2 100644 --- a/tests/qemuxml2argvdata/hugepages-memaccess3.xml +++ b/tests/qemuxml2argvdata/hugepages-memaccess3.xml @@ -10,17 +10,25 @@ <vcpu placement='static'>4</vcpu> <os> <type arch='x86_64' machine='pc'>hvm</type> + <boot dev='hd'/> <bootmenu enable='yes'/> </os> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</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-x86_64</emulator> - <controller type='usb' index='0'/> + <controller type='usb' index='0' model='piix3-uhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/hugepages-nodeset.xml b/tests/qemuxml2argvdata/hugepages-nodeset.xml index 5549cb82ff..49d1f45c0d 100644 --- a/tests/qemuxml2argvdata/hugepages-nodeset.xml +++ b/tests/qemuxml2argvdata/hugepages-nodeset.xml @@ -5,7 +5,7 @@ <currentMemory unit='KiB'>1048576</currentMemory> <memoryBacking> <hugepages> - <page size='2048' unit='KiB' nodeset='0'/> + <page size='2048' unit='KiB'/> </hugepages> </memoryBacking> <vcpu placement='static'>2</vcpu> @@ -13,18 +13,22 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</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-x86_64</emulator> - <controller type='usb' index='0'> + <controller type='usb' index='0' model='piix3-uhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml b/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml index 130af8dd81..ac084a0461 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml +++ b/tests/qemuxml2argvdata/hugepages-numa-default-2M.xml @@ -13,7 +13,8 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> <numa> <cell id='0' cpus='0' memory='262144' unit='KiB'/> <cell id='1' cpus='1' memory='786432' unit='KiB'/> @@ -25,10 +26,13 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0'/> + <controller type='usb' index='0' model='piix3-uhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml index 260cbb4869..c7d471af39 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml +++ b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.xml @@ -12,7 +12,8 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> <numa> <cell id='0' cpus='0-1' memory='1048576' unit='KiB'/> </numa> @@ -23,7 +24,7 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0'> + <controller type='usb' index='0' model='piix3-uhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'/> diff --git a/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml b/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml index 5fbf6b5e85..74e15800fc 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml +++ b/tests/qemuxml2argvdata/hugepages-numa-nodeset-part.xml @@ -13,7 +13,8 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> <numa> <cell id='0' cpus='0' memory='262144' unit='KiB'/> <cell id='1' cpus='1' memory='786432' unit='KiB'/> @@ -25,10 +26,13 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0'/> + <controller type='usb' index='0' model='piix3-uhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml b/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml index 31ebc1553a..4149d239b1 100644 --- a/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml +++ b/tests/qemuxml2argvdata/hugepages-numa-nodeset.xml @@ -14,7 +14,8 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> <numa> <cell id='0' cpus='0' memory='1048576' unit='KiB'/> <cell id='1' cpus='1' memory='1048576' unit='KiB'/> @@ -28,10 +29,13 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0'/> + <controller type='usb' index='0' model='piix3-uhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> + <audio id='1' type='none'/> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/hugepages-nvdimm.xml b/tests/qemuxml2argvdata/hugepages-nvdimm.xml index a33cce9293..1a1500895b 100644 --- a/tests/qemuxml2argvdata/hugepages-nvdimm.xml +++ b/tests/qemuxml2argvdata/hugepages-nvdimm.xml @@ -15,7 +15,8 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> <topology sockets='2' dies='1' cores='1' threads='1'/> <numa> <cell id='0' cpus='0-1' memory='1048576' unit='KiB'/> @@ -27,7 +28,7 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0'> + <controller type='usb' index='0' model='piix3-uhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'/> diff --git a/tests/qemuxml2argvdata/hugepages-shared.xml b/tests/qemuxml2argvdata/hugepages-shared.xml index 33abe71d9e..0a8efc806c 100644 --- a/tests/qemuxml2argvdata/hugepages-shared.xml +++ b/tests/qemuxml2argvdata/hugepages-shared.xml @@ -18,7 +18,8 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> <numa> <cell id='0' cpus='0' memory='1048576' unit='KiB'/> <cell id='1' cpus='1' memory='1048576' unit='KiB' memAccess='shared'/> @@ -33,15 +34,23 @@ <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='block' device='disk'> + <driver name='qemu' type='raw'/> <source dev='/dev/HostVG/QEMUGuest1'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> - <controller type='usb' index='0'/> - <controller type='ide' index='0'/> + <controller type='usb' index='0' model='piix3-uhci'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> + </controller> + <controller type='ide' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> + </controller> <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <memballoon model='virtio'/> + <audio id='1' type='none'/> + <memballoon model='virtio'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </memballoon> </devices> </domain> diff --git a/tests/qemuxml2argvdata/pages-dimm-discard.xml b/tests/qemuxml2argvdata/pages-dimm-discard.xml index de7e63ad32..eb0b409b8a 100644 --- a/tests/qemuxml2argvdata/pages-dimm-discard.xml +++ b/tests/qemuxml2argvdata/pages-dimm-discard.xml @@ -9,7 +9,8 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> <numa> <cell id='0' cpus='0-1' memory='1048576' unit='KiB'/> </numa> @@ -20,7 +21,7 @@ <on_crash>restart</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0'> + <controller type='usb' index='0' model='piix3-uhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'/> diff --git a/tests/qemuxml2argvdata/pages-discard-hugepages.xml b/tests/qemuxml2argvdata/pages-discard-hugepages.xml index 70c5eca0d0..c0b61141c7 100644 --- a/tests/qemuxml2argvdata/pages-discard-hugepages.xml +++ b/tests/qemuxml2argvdata/pages-discard-hugepages.xml @@ -11,7 +11,8 @@ <type arch='x86_64' machine='pc'>hvm</type> <boot dev='hd'/> </os> - <cpu> + <cpu mode='custom' match='exact' check='none'> + <model fallback='forbid'>qemu64</model> <numa> <cell id='0' cpus='0' memory='262144' unit='KiB' discard='no'/> <cell id='1' cpus='1' memory='786432' unit='KiB' discard='yes'/> @@ -23,7 +24,7 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0'> + <controller type='usb' index='0' model='piix3-uhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'/> diff --git a/tests/qemuxml2xmloutdata/hugepages-default-2M.xml b/tests/qemuxml2xmloutdata/hugepages-default-2M.x86_64-latest.xml similarity index 100% rename from tests/qemuxml2xmloutdata/hugepages-default-2M.xml rename to tests/qemuxml2xmloutdata/hugepages-default-2M.x86_64-latest.xml diff --git a/tests/qemuxml2xmloutdata/hugepages-default-system-size.xml b/tests/qemuxml2xmloutdata/hugepages-default-system-size.x86_64-latest.xml similarity index 100% rename from tests/qemuxml2xmloutdata/hugepages-default-system-size.xml rename to tests/qemuxml2xmloutdata/hugepages-default-system-size.x86_64-latest.xml diff --git a/tests/qemuxml2xmloutdata/hugepages-default.x86_64-latest.xml b/tests/qemuxml2xmloutdata/hugepages-default.x86_64-latest.xml new file mode 120000 index 0000000000..a55514468e --- /dev/null +++ b/tests/qemuxml2xmloutdata/hugepages-default.x86_64-latest.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/hugepages-default.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/hugepages-default.xml b/tests/qemuxml2xmloutdata/hugepages-default.xml deleted file mode 100644 index 977993fa52..0000000000 --- a/tests/qemuxml2xmloutdata/hugepages-default.xml +++ /dev/null @@ -1,34 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>219136</memory> - <currentMemory unit='KiB'>219136</currentMemory> - <memoryBacking> - <hugepages/> - </memoryBacking> - <vcpu placement='static'>1</vcpu> - <os> - <type arch='x86_64' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/hugepages-memaccess.xml b/tests/qemuxml2xmloutdata/hugepages-memaccess.x86_64-latest.xml similarity index 100% rename from tests/qemuxml2xmloutdata/hugepages-memaccess.xml rename to tests/qemuxml2xmloutdata/hugepages-memaccess.x86_64-latest.xml diff --git a/tests/qemuxml2xmloutdata/hugepages-memaccess2.xml b/tests/qemuxml2xmloutdata/hugepages-memaccess2.x86_64-latest.xml similarity index 100% rename from tests/qemuxml2xmloutdata/hugepages-memaccess2.xml rename to tests/qemuxml2xmloutdata/hugepages-memaccess2.x86_64-latest.xml diff --git a/tests/qemuxml2xmloutdata/hugepages-memaccess3.x86_64-latest.xml b/tests/qemuxml2xmloutdata/hugepages-memaccess3.x86_64-latest.xml new file mode 120000 index 0000000000..0b2a12b5de --- /dev/null +++ b/tests/qemuxml2xmloutdata/hugepages-memaccess3.x86_64-latest.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/hugepages-memaccess3.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/hugepages-nodeset.x86_64-latest.xml b/tests/qemuxml2xmloutdata/hugepages-nodeset.x86_64-latest.xml new file mode 120000 index 0000000000..b55838b780 --- /dev/null +++ b/tests/qemuxml2xmloutdata/hugepages-nodeset.x86_64-latest.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/hugepages-nodeset.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/hugepages-nodeset.xml b/tests/qemuxml2xmloutdata/hugepages-nodeset.xml deleted file mode 100644 index 296933c6f2..0000000000 --- a/tests/qemuxml2xmloutdata/hugepages-nodeset.xml +++ /dev/null @@ -1,31 +0,0 @@ -<domain type='qemu'> - <name>SomeDummyHugepagesGuest</name> - <uuid>ef1bdff4-27f3-4e85-a807-5fb4d58463cc</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <memoryBacking> - <hugepages> - <page size='2048' unit='KiB'/> - </hugepages> - </memoryBacking> - <vcpu placement='static'>2</vcpu> - <os> - <type arch='x86_64' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <clock offset='utc'/> - <on_poweroff>destroy</on_poweroff> - <on_reboot>restart</on_reboot> - <on_crash>destroy</on_crash> - <devices> - <emulator>/usr/bin/qemu-system-x86_64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.x86_64-latest.xml b/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.x86_64-latest.xml new file mode 120000 index 0000000000..bab31c4b99 --- /dev/null +++ b/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.x86_64-latest.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/hugepages-numa-default-2M.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml b/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml deleted file mode 100644 index bf9f352d98..0000000000 --- a/tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml +++ /dev/null @@ -1,37 +0,0 @@ -<domain type='qemu'> - <name>SomeDummyHugepagesGuest</name> - <uuid>ef1bdff4-27f3-4e85-a807-5fb4d58463cc</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <memoryBacking> - <hugepages> - <page size='2048' unit='KiB'/> - </hugepages> - </memoryBacking> - <vcpu placement='static'>2</vcpu> - <os> - <type arch='x86_64' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <cpu> - <numa> - <cell id='0' cpus='0' memory='262144' unit='KiB'/> - <cell id='1' cpus='1' memory='786432' unit='KiB'/> - </numa> - </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-x86_64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.xml b/tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.x86_64-latest.xml similarity index 100% rename from tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.xml rename to tests/qemuxml2xmloutdata/hugepages-numa-default-dimm.x86_64-latest.xml diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.x86_64-latest.xml b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.x86_64-latest.xml new file mode 120000 index 0000000000..c98dfbcd12 --- /dev/null +++ b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.x86_64-latest.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/hugepages-numa-nodeset-part.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml deleted file mode 100644 index 177faaa19f..0000000000 --- a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml +++ /dev/null @@ -1,37 +0,0 @@ -<domain type='qemu'> - <name>SomeDummyHugepagesGuest</name> - <uuid>ef1bdff4-27f3-4e85-a807-5fb4d58463cc</uuid> - <memory unit='KiB'>1048576</memory> - <currentMemory unit='KiB'>1048576</currentMemory> - <memoryBacking> - <hugepages> - <page size='1048576' unit='KiB' nodeset='1'/> - </hugepages> - </memoryBacking> - <vcpu placement='static'>2</vcpu> - <os> - <type arch='x86_64' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <cpu> - <numa> - <cell id='0' cpus='0' memory='262144' unit='KiB'/> - <cell id='1' cpus='1' memory='786432' unit='KiB'/> - </numa> - </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-x86_64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.x86_64-latest.xml b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.x86_64-latest.xml new file mode 120000 index 0000000000..5603409c08 --- /dev/null +++ b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.x86_64-latest.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/hugepages-numa-nodeset.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml b/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml deleted file mode 100644 index e63407d1e2..0000000000 --- a/tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml +++ /dev/null @@ -1,40 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>4194304</memory> - <currentMemory unit='KiB'>4194304</currentMemory> - <memoryBacking> - <hugepages> - <page size='2048' unit='KiB' nodeset='1'/> - <page size='1048576' unit='KiB' nodeset='0,2-3'/> - </hugepages> - </memoryBacking> - <vcpu placement='static'>4</vcpu> - <os> - <type arch='x86_64' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <cpu> - <numa> - <cell id='0' cpus='0' memory='1048576' unit='KiB'/> - <cell id='1' cpus='1' memory='1048576' unit='KiB'/> - <cell id='2' cpus='2' memory='1048576' unit='KiB'/> - <cell id='3' cpus='3' memory='1048576' unit='KiB'/> - </numa> - </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-x86_64</emulator> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='none'/> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/hugepages-nvdimm.xml b/tests/qemuxml2xmloutdata/hugepages-nvdimm.x86_64-latest.xml similarity index 100% rename from tests/qemuxml2xmloutdata/hugepages-nvdimm.xml rename to tests/qemuxml2xmloutdata/hugepages-nvdimm.x86_64-latest.xml diff --git a/tests/qemuxml2xmloutdata/hugepages-shared.x86_64-latest.xml b/tests/qemuxml2xmloutdata/hugepages-shared.x86_64-latest.xml new file mode 120000 index 0000000000..3b7f1d12b1 --- /dev/null +++ b/tests/qemuxml2xmloutdata/hugepages-shared.x86_64-latest.xml @@ -0,0 +1 @@ +../qemuxml2argvdata/hugepages-shared.xml \ No newline at end of file diff --git a/tests/qemuxml2xmloutdata/hugepages-shared.xml b/tests/qemuxml2xmloutdata/hugepages-shared.xml deleted file mode 100644 index 4310442936..0000000000 --- a/tests/qemuxml2xmloutdata/hugepages-shared.xml +++ /dev/null @@ -1,55 +0,0 @@ -<domain type='qemu'> - <name>QEMUGuest1</name> - <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> - <memory unit='KiB'>4194304</memory> - <currentMemory unit='KiB'>4194304</currentMemory> - <memoryBacking> - <hugepages> - <page size='2048' unit='KiB' nodeset='1'/> - <page size='1048576' unit='KiB' nodeset='0,2-3'/> - </hugepages> - </memoryBacking> - <vcpu placement='static'>4</vcpu> - <numatune> - <memory mode='strict' nodeset='0-3'/> - <memnode cellid='3' mode='strict' nodeset='3'/> - </numatune> - <os> - <type arch='x86_64' machine='pc'>hvm</type> - <boot dev='hd'/> - </os> - <cpu> - <numa> - <cell id='0' cpus='0' memory='1048576' unit='KiB'/> - <cell id='1' cpus='1' memory='1048576' unit='KiB' memAccess='shared'/> - <cell id='2' cpus='2' memory='1048576' unit='KiB' memAccess='private'/> - <cell id='3' cpus='3' memory='1048576' unit='KiB'/> - </numa> - </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-x86_64</emulator> - <disk type='block' device='disk'> - <driver name='qemu' type='raw'/> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='hda' bus='ide'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> - <controller type='usb' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> - </controller> - <controller type='ide' index='0'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> - </controller> - <controller type='pci' index='0' model='pci-root'/> - <input type='mouse' bus='ps2'/> - <input type='keyboard' bus='ps2'/> - <audio id='1' type='none'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> - </memballoon> - </devices> -</domain> diff --git a/tests/qemuxml2xmloutdata/pages-dimm-discard.xml b/tests/qemuxml2xmloutdata/pages-dimm-discard.x86_64-latest.xml similarity index 100% rename from tests/qemuxml2xmloutdata/pages-dimm-discard.xml rename to tests/qemuxml2xmloutdata/pages-dimm-discard.x86_64-latest.xml diff --git a/tests/qemuxml2xmloutdata/pages-discard-hugepages.xml b/tests/qemuxml2xmloutdata/pages-discard-hugepages.x86_64-latest.xml similarity index 100% rename from tests/qemuxml2xmloutdata/pages-discard-hugepages.xml rename to tests/qemuxml2xmloutdata/pages-discard-hugepages.x86_64-latest.xml diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 3a2d029c4f..966496604d 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -295,24 +295,21 @@ mymain(void) DO_TEST_NOCAPS("pmu-feature-off"); DO_TEST_NOCAPS("pages-discard"); - DO_TEST("pages-discard-hugepages", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("pages-dimm-discard", QEMU_CAPS_DEVICE_PC_DIMM); - DO_TEST("hugepages-default", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-default-2M", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-default-system-size", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-nodeset", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-numa-default-2M", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-numa-default-dimm", QEMU_CAPS_DEVICE_PC_DIMM, - QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-numa-nodeset", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-numa-nodeset-part", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-shared", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-memaccess", QEMU_CAPS_DEVICE_PC_DIMM, - QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-memaccess2", QEMU_CAPS_DEVICE_PC_DIMM, - QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("hugepages-nvdimm", QEMU_CAPS_DEVICE_NVDIMM, - QEMU_CAPS_OBJECT_MEMORY_FILE); + DO_TEST_CAPS_LATEST("pages-discard-hugepages"); + DO_TEST_CAPS_LATEST("pages-dimm-discard"); + DO_TEST_CAPS_LATEST("hugepages-default"); + DO_TEST_CAPS_LATEST("hugepages-default-2M"); + DO_TEST_CAPS_LATEST("hugepages-default-system-size"); + DO_TEST_CAPS_LATEST("hugepages-nodeset"); + DO_TEST_CAPS_LATEST("hugepages-numa-default-2M"); + DO_TEST_CAPS_LATEST("hugepages-numa-default-dimm"); + DO_TEST_CAPS_LATEST("hugepages-numa-nodeset"); + DO_TEST_CAPS_LATEST("hugepages-numa-nodeset-part"); + DO_TEST_CAPS_LATEST("hugepages-shared"); + DO_TEST_CAPS_LATEST("hugepages-memaccess"); + DO_TEST_CAPS_LATEST("hugepages-memaccess2"); + DO_TEST_CAPS_LATEST("hugepages-memaccess3"); + DO_TEST_CAPS_LATEST("hugepages-nvdimm"); DO_TEST_NOCAPS("nosharepages"); DO_TEST_NOCAPS("restore-v2"); DO_TEST_NOCAPS("migrate"); -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
Currently, we have maybe a dozen tests for hugepages related stuff in qemuxml2xmltest. In all cases DO_TEST() is used, which means we have to enumerate all capabilities needed (though, it's usually just QEMU_CAPS_OBJECT_MEMORY_RAM and QEMU_CAPS_OBJECT_MEMORY_FILE, exceptionally QEMU_CAPS_DEVICE_PC_DIMM too).
Nevertheless, these caps made sense back in QEMU 2.X era when these objects were being introduced. But now, almost 8 years after the fact we can safely assume every QEMU knows these caps. Therefore, switch to DO_TEST_CAPS_LATEST().
Same comment as in the previous commit.
Since some of our expected output files are just a symlink to their respective input files, these are changed too. But from QEMU's POV nothing changes as no .args file is changed.
Oh, and I'm also adding a 'hugepages-memaccess3' test case, which was missing, surprisingly.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- .../qemuxml2argvdata/hugepages-default-2M.xml | 5 +- .../hugepages-default-system-size.xml | 5 +- [...] ...pages-discard-hugepages.x86_64-latest.xml} | 0 tests/qemuxml2xmltest.c | 33 +++++------ 37 files changed, 107 insertions(+), 282 deletions(-) rename tests/qemuxml2xmloutdata/{hugepages-default-2M.xml => hugepages-default-2M.x86_64-latest.xml} (100%) rename tests/qemuxml2xmloutdata/{hugepages-default-system-size.xml => hugepages-default-system-size.x86_64-latest.xml} (100%) [...] delete mode 100644 tests/qemuxml2xmloutdata/hugepages-shared.xml rename tests/qemuxml2xmloutdata/{pages-dimm-discard.xml => pages-dimm-discard.x86_64-latest.xml} (100%) rename tests/qemuxml2xmloutdata/{pages-discard-hugepages.xml => pages-discard-hugepages.x86_64-latest.xml} (100%)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

The aim of this test case it to make sure we error out when QEMU_CAPS_OBJECT_MEMORY_RAM is missing. Well, it's never going to be missing. Drop the test case. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/qemuxml2argvdata/cpu-numa-memshared-1.err | 1 - tests/qemuxml2argvdata/cpu-numa-memshared-1.xml | 1 - tests/qemuxml2argvtest.c | 1 - 3 files changed, 3 deletions(-) delete mode 100644 tests/qemuxml2argvdata/cpu-numa-memshared-1.err delete mode 120000 tests/qemuxml2argvdata/cpu-numa-memshared-1.xml diff --git a/tests/qemuxml2argvdata/cpu-numa-memshared-1.err b/tests/qemuxml2argvdata/cpu-numa-memshared-1.err deleted file mode 100644 index ad98a2162e..0000000000 --- a/tests/qemuxml2argvdata/cpu-numa-memshared-1.err +++ /dev/null @@ -1 +0,0 @@ -unsupported configuration: Shared memory mapping is not supported with this QEMU diff --git a/tests/qemuxml2argvdata/cpu-numa-memshared-1.xml b/tests/qemuxml2argvdata/cpu-numa-memshared-1.xml deleted file mode 120000 index 288045dce3..0000000000 --- a/tests/qemuxml2argvdata/cpu-numa-memshared-1.xml +++ /dev/null @@ -1 +0,0 @@ -cpu-numa-memshared.xml \ No newline at end of file diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 227493fe32..148d6b439e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1910,7 +1910,6 @@ mymain(void) DO_TEST_PARSE_ERROR_NOCAPS("cpu-numa-disjoint"); DO_TEST("cpu-numa-disjoint", QEMU_CAPS_NUMA); DO_TEST_FAILURE("cpu-numa-memshared", QEMU_CAPS_OBJECT_MEMORY_RAM); - DO_TEST_PARSE_ERROR_NOCAPS("cpu-numa-memshared-1"); DO_TEST("cpu-numa-memshared", QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST("cpu-host-model", QEMU_CAPS_DEVICE_PCI_BRIDGE, -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
The aim of this test case it to make sure we error out when QEMU_CAPS_OBJECT_MEMORY_RAM is missing. Well, it's never going to be missing. Drop the test case.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/qemuxml2argvdata/cpu-numa-memshared-1.err | 1 - tests/qemuxml2argvdata/cpu-numa-memshared-1.xml | 1 - tests/qemuxml2argvtest.c | 1 - 3 files changed, 3 deletions(-) delete mode 100644 tests/qemuxml2argvdata/cpu-numa-memshared-1.err delete mode 120000 tests/qemuxml2argvdata/cpu-numa-memshared-1.xml
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Introduced in QEMU's commit of v2.1.0-rc0~41^2~104 the memory-backend-ram is going to be present for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 27 +++++----------- src/qemu/qemu_validate.c | 34 --------------------- tests/qemuxml2argvdata/numatune-memnode.err | 2 +- tests/qemuxml2argvtest.c | 22 +++++-------- tests/qemuxml2xmltest.c | 5 ++- 5 files changed, 17 insertions(+), 73 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 372f088850..2a7146e6df 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3478,12 +3478,6 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, _("this qemu doesn't support the " "memory-backend-file object")); return -1; - } else if (STREQ(backendType, "memory-backend-ram") && - !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_RAM)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("this qemu doesn't support the " - "memory-backend-ram object")); - return -1; } else if (STREQ(backendType, "memory-backend-memfd") && !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_MEMFD)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -7223,6 +7217,7 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, int ret = -1; size_t ncells = virDomainNumaGetNodeCount(def->numa); ssize_t masterInitiator = -1; + int rc; if (!virDomainNumatuneNodesetIsAvailable(def->numa, priv->autoNodeset)) goto cleanup; @@ -7239,21 +7234,13 @@ qemuBuildNumaCommandLine(virQEMUDriverConfig *cfg, nodeBackends = g_new0(virJSONValue *, ncells); - /* using of -numa memdev= cannot be combined with -numa mem=, thus we - * need to check which approach to use */ - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_RAM) || - virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE) || - virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_MEMFD)) { - int rc; + for (i = 0; i < ncells; i++) { + if ((rc = qemuBuildMemoryCellBackendProps(def, cfg, i, priv, + &nodeBackends[i])) < 0) + goto cleanup; - for (i = 0; i < ncells; i++) { - if ((rc = qemuBuildMemoryCellBackendProps(def, cfg, i, priv, - &nodeBackends[i])) < 0) - goto cleanup; - - if (rc == 0) - needBackend = true; - } + if (rc == 0) + needBackend = true; } if (!needBackend && diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 1456a69351..5963442397 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -969,17 +969,6 @@ qemuValidateDomainDefNuma(const virDomainDef *def, const long system_page_size = virGetSystemPageSizeKB(); size_t ncells = virDomainNumaGetNodeCount(def->numa); size_t i; - bool hasMemoryCap = virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_RAM) || - virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE) || - virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_MEMFD); - bool needBacking = false; - - if (virDomainNumatuneHasPerNodeBinding(def->numa) && !hasMemoryCap) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Per-node memory binding is not supported " - "with this QEMU")); - return -1; - } if (def->mem.nhugepages && def->mem.hugepages[0].size != system_page_size && @@ -993,14 +982,6 @@ qemuValidateDomainDefNuma(const virDomainDef *def, for (i = 0; i < ncells; i++) { virBitmap *cpumask = virDomainNumaGetNodeCpumask(def->numa, i); - if (!hasMemoryCap && - virDomainNumaGetNodeMemoryAccessMode(def->numa, i)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Shared memory mapping is not supported " - "with this QEMU")); - return -1; - } - if (cpumask) { g_autofree char * cpumaskStr = NULL; if (!(cpumaskStr = virBitmapFormat(cpumask))) @@ -1016,15 +997,7 @@ qemuValidateDomainDefNuma(const virDomainDef *def, } } - if (!virQEMUCapsGetMachineNumaMemSupported(qemuCaps, - def->virtType, - def->os.machine)) { - needBacking = true; - } - if (virDomainNumaHasHMAT(def->numa)) { - needBacking = true; - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_NUMA_HMAT)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("HMAT is not supported with this QEMU")); @@ -1032,13 +1005,6 @@ qemuValidateDomainDefNuma(const virDomainDef *def, } } - if (needBacking && !hasMemoryCap) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("NUMA without specified memory backing is not " - "supported with this QEMU binary")); - return -1; - } - return 0; } diff --git a/tests/qemuxml2argvdata/numatune-memnode.err b/tests/qemuxml2argvdata/numatune-memnode.err index 1d5e57f996..ff4b1cce2e 100644 --- a/tests/qemuxml2argvdata/numatune-memnode.err +++ b/tests/qemuxml2argvdata/numatune-memnode.err @@ -1 +1 @@ -unsupported configuration: Per-node memory binding is not supported with this QEMU +unsupported configuration: disjoint NUMA cpu ranges are not supported with this QEMU diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 148d6b439e..4d02b0f97c 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1235,7 +1235,6 @@ mymain(void) DO_TEST_CAPS_LATEST("hugepages-memaccess"); DO_TEST_CAPS_LATEST("hugepages-memaccess2"); DO_TEST_PARSE_ERROR("hugepages-memaccess3", - QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST_CAPS_LATEST("hugepages-memaccess3"); DO_TEST_CAPS_LATEST("hugepages-nvdimm"); @@ -1869,7 +1868,6 @@ mymain(void) ARG_MIGRATE_FD, 7, ARG_QEMU_CAPS, QEMU_CAPS_NUMA, - QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_LAST, ARG_END); @@ -1909,7 +1907,7 @@ mymain(void) DO_TEST_PARSE_ERROR_NOCAPS("cpu-numa3"); DO_TEST_PARSE_ERROR_NOCAPS("cpu-numa-disjoint"); DO_TEST("cpu-numa-disjoint", QEMU_CAPS_NUMA); - DO_TEST_FAILURE("cpu-numa-memshared", QEMU_CAPS_OBJECT_MEMORY_RAM); + DO_TEST_FAILURE_NOCAPS("cpu-numa-memshared"); DO_TEST("cpu-numa-memshared", QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST("cpu-host-model", QEMU_CAPS_DEVICE_PCI_BRIDGE, @@ -1968,7 +1966,6 @@ mymain(void) DO_TEST("cputune-numatune", QEMU_CAPS_KVM, QEMU_CAPS_OBJECT_IOTHREAD, - QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST("vcpu-placement-static", QEMU_CAPS_KVM, @@ -1978,8 +1975,7 @@ mymain(void) DO_TEST_NOCAPS("numatune-memory"); DO_TEST_PARSE_ERROR_NOCAPS("numatune-memory-invalid-nodeset"); DO_TEST("numatune-memnode", - QEMU_CAPS_NUMA, - QEMU_CAPS_OBJECT_MEMORY_RAM); + QEMU_CAPS_NUMA); DO_TEST_PARSE_ERROR_NOCAPS("numatune-memnode"); DO_TEST_CAPS_VER("numatune-memnode", "5.2.0"); DO_TEST_CAPS_LATEST("numatune-memnode"); @@ -1988,19 +1984,16 @@ mymain(void) DO_TEST_CAPS_LATEST("numatune-system-memory"); DO_TEST("numatune-memnode-no-memory", - QEMU_CAPS_NUMA, - QEMU_CAPS_OBJECT_MEMORY_RAM); - DO_TEST_PARSE_ERROR_NOCAPS("numatune-memnode-no-memory"); + QEMU_CAPS_NUMA); DO_TEST("numatune-distances", QEMU_CAPS_NUMA); DO_TEST_NOCAPS("numatune-no-vcpu"); DO_TEST_CAPS_LATEST("numatune-hmat"); DO_TEST_NOCAPS("numatune-auto-nodeset-invalid"); - DO_TEST("numatune-auto-prefer", QEMU_CAPS_OBJECT_MEMORY_RAM, + DO_TEST("numatune-auto-prefer", QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST_FAILURE("numatune-static-nodeset-exceed-hostnode", - QEMU_CAPS_OBJECT_MEMORY_RAM); + DO_TEST_FAILURE_NOCAPS("numatune-static-nodeset-exceed-hostnode"); DO_TEST_PARSE_ERROR_NOCAPS("numatune-memnode-nocpu"); DO_TEST_PARSE_ERROR_NOCAPS("numatune-memnodes-problematic"); DO_TEST_NOCAPS("numad"); @@ -2645,17 +2638,16 @@ mymain(void) DO_TEST_NOCAPS("memory-hotplug"); DO_TEST("memory-hotplug", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA); DO_TEST("memory-hotplug-dimm", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, - QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE); + QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST_CAPS_LATEST("memory-hotplug-dimm-addr"); DO_TEST("memory-hotplug-ppc64-nonuma", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE); + QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST_FULL("memory-hotplug-ppc64-nonuma-abi-update", "", ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, ARG_QEMU_CAPS, QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_LAST, ARG_END); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 966496604d..7c2f525c68 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -933,7 +933,7 @@ mymain(void) DO_TEST("numatune-memnode-no-memory", QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST("numatune-distances", QEMU_CAPS_NUMA); DO_TEST("numatune-no-vcpu", QEMU_CAPS_NUMA); - DO_TEST("numatune-hmat", QEMU_CAPS_NUMA_HMAT, QEMU_CAPS_OBJECT_MEMORY_RAM); + DO_TEST("numatune-hmat", QEMU_CAPS_NUMA_HMAT); DO_TEST_CAPS_LATEST("numatune-memnode-restrictive-mode"); DO_TEST_NOCAPS("firmware-manual-bios"); @@ -1026,13 +1026,12 @@ mymain(void) DO_TEST("memory-hotplug-ppc64-nonuma", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE); + QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST_FULL("memory-hotplug-ppc64-nonuma-abi-update", "", WHEN_BOTH, ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, ARG_QEMU_CAPS, QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_LAST, ARG_END); DO_TEST_NOCAPS("memory-hotplug"); DO_TEST("memory-hotplug-dimm", QEMU_CAPS_DEVICE_PC_DIMM); -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
Introduced in QEMU's commit of v2.1.0-rc0~41^2~104 the memory-backend-ram is going to be present for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 27 +++++----------- src/qemu/qemu_validate.c | 34 --------------------- tests/qemuxml2argvdata/numatune-memnode.err | 2 +- tests/qemuxml2argvtest.c | 22 +++++-------- tests/qemuxml2xmltest.c | 5 ++- 5 files changed, 17 insertions(+), 73 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 - 29 files changed, 29 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 63590f139f..afcd69952b 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1280,7 +1280,6 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "ich9-intel-hda", QEMU_CAPS_DEVICE_ICH9_INTEL_HDA }, { "pvpanic", QEMU_CAPS_DEVICE_PANIC }, { "usb-kbd", QEMU_CAPS_DEVICE_USB_KBD }, - { "memory-backend-ram", QEMU_CAPS_OBJECT_MEMORY_RAM }, { "memory-backend-file", QEMU_CAPS_OBJECT_MEMORY_FILE }, { "usb-audio", QEMU_CAPS_OBJECT_USB_AUDIO }, { "iothread", QEMU_CAPS_OBJECT_IOTHREAD}, diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml index 8223d13409..847de7b133 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -44,7 +44,6 @@ <flag name='ich9-intel-hda'/> <flag name='enable-fips'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml index 96baa4e7bf..75f55c5ceb 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -43,7 +43,6 @@ <flag name='ich9-intel-hda'/> <flag name='enable-fips'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml index 6cd7256b0d..abb15f7cf0 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -23,7 +23,6 @@ <flag name='pci-bridge'/> <flag name='vfio-pci'/> <flag name='enable-fips'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml index 245a0bd2fb..22becc1752 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -57,7 +57,6 @@ <flag name='pvpanic'/> <flag name='enable-fips'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml index 250ad9d914..5920084f69 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -46,7 +46,6 @@ <flag name='ich9-intel-hda'/> <flag name='enable-fips'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml index e356f431c2..fb0a7d1afd 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -44,7 +44,6 @@ <flag name='ich9-intel-hda'/> <flag name='enable-fips'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml index 19edb90927..9d168d71a0 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -47,7 +47,6 @@ <flag name='ich9-intel-hda'/> <flag name='enable-fips'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml index 46bbfac186..e9a663dd7f 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -57,7 +57,6 @@ <flag name='pvpanic'/> <flag name='enable-fips'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml index 93ae1b6d0a..960153b7fa 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml @@ -15,7 +15,6 @@ <flag name='rng-random'/> <flag name='rng-egd'/> <flag name='enable-fips'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml index 9dbe8f1ca8..d907b26bc4 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -57,7 +57,6 @@ <flag name='pvpanic'/> <flag name='enable-fips'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml index f4c9ad1bc4..93bb657a35 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -45,7 +45,6 @@ <flag name='virtio-mmio'/> <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml index b40b8a5735..c6a8f0c712 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -43,7 +43,6 @@ <flag name='usb-storage.removable'/> <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml index 7b4915b67f..f1c392563a 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -46,7 +46,6 @@ <flag name='virtio-mmio'/> <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml index 40a4a8b19d..71f5741ca2 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -22,7 +22,6 @@ <flag name='virtio-ccw'/> <flag name='pci-bridge'/> <flag name='vfio-pci'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml index c71275506a..991c146bb7 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -56,7 +56,6 @@ <flag name='kvm-pit-lost-tick-policy'/> <flag name='pvpanic'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml index e38e8fa5f5..a2606fe46b 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -44,7 +44,6 @@ <flag name='virtio-mmio'/> <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml index 3b6e8a0a47..d4d3adb968 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -22,7 +22,6 @@ <flag name='virtio-ccw'/> <flag name='pci-bridge'/> <flag name='vfio-pci'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml index 876a5afe43..785ac2ca75 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -55,7 +55,6 @@ <flag name='kvm-pit-lost-tick-policy'/> <flag name='pvpanic'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml index f73c070c9e..1fa14964c5 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -55,7 +55,6 @@ <flag name='kvm-pit-lost-tick-policy'/> <flag name='pvpanic'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml index 234f386736..dd9a63e9e6 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -49,7 +49,6 @@ <flag name='virtio-mmio'/> <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml index 4e90d3953a..20d7b33de6 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -43,7 +43,6 @@ <flag name='usb-storage.removable'/> <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml index fd57627ad5..0fa7d84386 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -55,7 +55,6 @@ <flag name='kvm-pit-lost-tick-policy'/> <flag name='pvpanic'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml index 19a6c33353..e399d1abf1 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml @@ -49,7 +49,6 @@ <flag name='virtio-mmio'/> <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml index 0d3c321a67..771734470b 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -49,7 +49,6 @@ <flag name='usb-storage.removable'/> <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml index dc7b041294..5231630072 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -55,7 +55,6 @@ <flag name='kvm-pit-lost-tick-policy'/> <flag name='pvpanic'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml index d2d1295c0e..c7f56f56e2 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml @@ -48,7 +48,6 @@ <flag name='usb-storage.removable'/> <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml index 6c56dc9817..c681b6b1cd 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml @@ -55,7 +55,6 @@ <flag name='kvm-pit-lost-tick-policy'/> <flag name='pvpanic'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> diff --git a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml index e3134541a4..22d943e2e6 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml @@ -55,7 +55,6 @@ <flag name='kvm-pit-lost-tick-policy'/> <flag name='pvpanic'/> <flag name='usb-kbd'/> - <flag name='memory-backend-ram'/> <flag name='numa'/> <flag name='memory-backend-file'/> <flag name='usb-audio'/> -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
All supported QEMUs have this capability. Stop detecting it.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 - 29 files changed, 29 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index afcd69952b..6e5037762a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -300,7 +300,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "msg-timestamp", /* X_QEMU_CAPS_MSG_TIMESTAMP */ "active-commit", /* X_QEMU_CAPS_ACTIVE_COMMIT */ "change-backing-file", /* X_QEMU_CAPS_CHANGE_BACKING_FILE */ - "memory-backend-ram", /* QEMU_CAPS_OBJECT_MEMORY_RAM */ + "memory-backend-ram", /* X_QEMU_CAPS_OBJECT_MEMORY_RAM */ "numa", /* QEMU_CAPS_NUMA */ /* 170 */ diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 842f013013..6f4318aa88 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -278,7 +278,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ X_QEMU_CAPS_MSG_TIMESTAMP, /* -msg timestamp */ X_QEMU_CAPS_ACTIVE_COMMIT, /* block-commit works without 'top' */ X_QEMU_CAPS_CHANGE_BACKING_FILE, /* change name of backing file in metadata */ - QEMU_CAPS_OBJECT_MEMORY_RAM, /* -object memory-backend-ram */ + X_QEMU_CAPS_OBJECT_MEMORY_RAM, /* -object memory-backend-ram */ QEMU_CAPS_NUMA, /* newer -numa handling with disjoint cpu ranges */ /* 170 */ -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
Now that nothing uses this capability, it can be retired.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Introduced in QEMU's commit of v2.1.0-rc0~41^2~26 only for Linux, and later in v3.1.0-rc0~71^2~10 for all POSIX, the memory-backend-file is going to be present for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 9 ++--- src/qemu/qemu_command.c | 13 ++------ src/qemu/qemu_validate.c | 10 ------ .../hugepages-default-1G-nodeset-2M.err | 2 +- tests/qemuxml2argvtest.c | 33 ++++++------------- tests/qemuxml2xmltest.c | 26 +++++---------- 6 files changed, 26 insertions(+), 67 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 6e5037762a..329a120237 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1725,7 +1725,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMaxCPU[] = { static virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = { { "memory-backend-file", virQEMUCapsObjectPropsMemoryBackendFile, G_N_ELEMENTS(virQEMUCapsObjectPropsMemoryBackendFile), - QEMU_CAPS_OBJECT_MEMORY_FILE }, + -1 }, { "memory-backend-memfd", virQEMUCapsObjectPropsMemoryBackendMemfd, G_N_ELEMENTS(virQEMUCapsObjectPropsMemoryBackendMemfd), QEMU_CAPS_OBJECT_MEMORY_MEMFD }, @@ -6096,12 +6096,9 @@ virQEMUCapsFillDomainMemoryBackingCaps(virQEMUCaps *qemuCaps, VIR_DOMAIN_CAPS_ENUM_SET(memoryBacking->sourceType, VIR_DOMAIN_MEMORY_SOURCE_MEMFD); - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE)) - VIR_DOMAIN_CAPS_ENUM_SET(memoryBacking->sourceType, - VIR_DOMAIN_MEMORY_SOURCE_FILE); - VIR_DOMAIN_CAPS_ENUM_SET(memoryBacking->sourceType, - VIR_DOMAIN_MEMORY_SOURCE_ANONYMOUS); + VIR_DOMAIN_MEMORY_SOURCE_ANONYMOUS, + VIR_DOMAIN_MEMORY_SOURCE_FILE); } diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2a7146e6df..bcd30ef4f3 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3472,17 +3472,10 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, rc = 1; } else { /* otherwise check the required capability */ - if (STREQ(backendType, "memory-backend-file") && - !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE)) { + if (STREQ(backendType, "memory-backend-memfd") && + !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_MEMFD)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("this qemu doesn't support the " - "memory-backend-file object")); - return -1; - } else if (STREQ(backendType, "memory-backend-memfd") && - !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_MEMFD)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("this qemu doesn't support the " - "memory-backend-memfd object")); + _("this qemu doesn't support the memory-backend-memfd object")); return -1; } diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 5963442397..d4dca018aa 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -966,19 +966,9 @@ static int qemuValidateDomainDefNuma(const virDomainDef *def, virQEMUCaps *qemuCaps) { - const long system_page_size = virGetSystemPageSizeKB(); size_t ncells = virDomainNumaGetNodeCount(def->numa); size_t i; - if (def->mem.nhugepages && - def->mem.hugepages[0].size != system_page_size && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("huge pages per NUMA node are not " - "supported with this QEMU")); - return -1; - } - for (i = 0; i < ncells; i++) { virBitmap *cpumask = virDomainNumaGetNodeCpumask(def->numa, i); diff --git a/tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.err b/tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.err index 8c0706fb8b..b103478bb8 100644 --- a/tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.err +++ b/tests/qemuxml2argvdata/hugepages-default-1G-nodeset-2M.err @@ -1 +1 @@ -unsupported configuration: huge pages per NUMA node are not supported with this QEMU +two master hugepages detected: 2048 and 1048576 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 4d02b0f97c..bf3465ee15 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1234,8 +1234,7 @@ mymain(void) DO_TEST_PARSE_ERROR_NOCAPS("hugepages-memaccess-invalid"); DO_TEST_CAPS_LATEST("hugepages-memaccess"); DO_TEST_CAPS_LATEST("hugepages-memaccess2"); - DO_TEST_PARSE_ERROR("hugepages-memaccess3", - QEMU_CAPS_OBJECT_MEMORY_FILE); + DO_TEST_PARSE_ERROR_NOCAPS("hugepages-memaccess3"); DO_TEST_CAPS_LATEST("hugepages-memaccess3"); DO_TEST_CAPS_LATEST("hugepages-nvdimm"); DO_TEST_NOCAPS("nosharepages"); @@ -1907,8 +1906,7 @@ mymain(void) DO_TEST_PARSE_ERROR_NOCAPS("cpu-numa3"); DO_TEST_PARSE_ERROR_NOCAPS("cpu-numa-disjoint"); DO_TEST("cpu-numa-disjoint", QEMU_CAPS_NUMA); - DO_TEST_FAILURE_NOCAPS("cpu-numa-memshared"); - DO_TEST("cpu-numa-memshared", QEMU_CAPS_OBJECT_MEMORY_FILE); + DO_TEST_NOCAPS("cpu-numa-memshared"); DO_TEST("cpu-host-model", QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, @@ -1965,8 +1963,7 @@ mymain(void) DO_TEST_PARSE_ERROR_NOCAPS("cputune-vcpusched-overlap"); DO_TEST("cputune-numatune", QEMU_CAPS_KVM, - QEMU_CAPS_OBJECT_IOTHREAD, - QEMU_CAPS_OBJECT_MEMORY_FILE); + QEMU_CAPS_OBJECT_IOTHREAD); DO_TEST("vcpu-placement-static", QEMU_CAPS_KVM, QEMU_CAPS_OBJECT_IOTHREAD); @@ -1991,8 +1988,7 @@ mymain(void) DO_TEST_CAPS_LATEST("numatune-hmat"); DO_TEST_NOCAPS("numatune-auto-nodeset-invalid"); - DO_TEST("numatune-auto-prefer", - QEMU_CAPS_OBJECT_MEMORY_FILE); + DO_TEST_NOCAPS("numatune-auto-prefer"); DO_TEST_FAILURE_NOCAPS("numatune-static-nodeset-exceed-hostnode"); DO_TEST_PARSE_ERROR_NOCAPS("numatune-memnode-nocpu"); DO_TEST_PARSE_ERROR_NOCAPS("numatune-memnodes-problematic"); @@ -2637,18 +2633,15 @@ mymain(void) DO_TEST_PARSE_ERROR_NOCAPS("memory-hotplug-invalid-targetnode"); DO_TEST_NOCAPS("memory-hotplug"); DO_TEST("memory-hotplug", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA); - DO_TEST("memory-hotplug-dimm", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, - QEMU_CAPS_OBJECT_MEMORY_FILE); + DO_TEST("memory-hotplug-dimm", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA); DO_TEST_CAPS_LATEST("memory-hotplug-dimm-addr"); DO_TEST("memory-hotplug-ppc64-nonuma", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, - QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_FILE); + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE); DO_TEST_FULL("memory-hotplug-ppc64-nonuma-abi-update", "", ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, ARG_QEMU_CAPS, QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_LAST, ARG_END); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm"); @@ -2662,13 +2655,11 @@ mymain(void) DO_TEST_CAPS_VER("memory-hotplug-nvdimm-readonly", "5.2.0"); DO_TEST_CAPS_LATEST("memory-hotplug-nvdimm-readonly"); DO_TEST("memory-hotplug-nvdimm-ppc64", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_DEVICE_NVDIMM); DO_TEST_FULL("memory-hotplug-nvdimm-ppc64-abi-update", "", ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, ARG_QEMU_CAPS, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_DEVICE_NVDIMM, QEMU_CAPS_LAST, ARG_END); @@ -2840,16 +2831,12 @@ mymain(void) DO_TEST_CAPS_LATEST("virtio-options-video-packed"); DO_TEST_PARSE_ERROR_NOCAPS("virtio-options-memballoon-freepage-reporting"); - DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_KVM); - DO_TEST("fd-memory-numa-topology2", QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_KVM); - DO_TEST("fd-memory-numa-topology3", QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_KVM); + DO_TEST("fd-memory-numa-topology", QEMU_CAPS_KVM); + DO_TEST("fd-memory-numa-topology2", QEMU_CAPS_KVM); + DO_TEST("fd-memory-numa-topology3", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("fd-memory-numa-topology4"); - DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_KVM); + DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("memfd-memory-numa"); DO_TEST_CAPS_LATEST("memfd-memory-default-hugepage"); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 7c2f525c68..40763607ba 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -657,7 +657,6 @@ mymain(void) DO_TEST_NOCAPS("seclabel-device-multiple"); DO_TEST_FULL("seclabel-dynamic-none-relabel", "", WHEN_INACTIVE, ARG_QEMU_CAPS, QEMU_CAPS_DEVICE_CIRRUS_VGA, - QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_SPICE, QEMU_CAPS_LAST, ARG_END); DO_TEST_NOCAPS("numad-static-vcpu-no-numatune"); @@ -926,11 +925,11 @@ mymain(void) DO_TEST_NOCAPS("cpu-numa-no-memory-element"); DO_TEST_NOCAPS("cpu-numa-disordered"); DO_TEST("cpu-numa-disjoint", QEMU_CAPS_NUMA); - DO_TEST("cpu-numa-memshared", QEMU_CAPS_OBJECT_MEMORY_FILE); + DO_TEST_NOCAPS("cpu-numa-memshared"); DO_TEST_NOCAPS("numatune-auto-prefer"); - DO_TEST("numatune-memnode", QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_FILE); - DO_TEST("numatune-memnode-no-memory", QEMU_CAPS_OBJECT_MEMORY_FILE); + DO_TEST("numatune-memnode", QEMU_CAPS_NUMA); + DO_TEST_NOCAPS("numatune-memnode-no-memory"); DO_TEST("numatune-distances", QEMU_CAPS_NUMA); DO_TEST("numatune-no-vcpu", QEMU_CAPS_NUMA); DO_TEST("numatune-hmat", QEMU_CAPS_NUMA_HMAT); @@ -1025,14 +1024,13 @@ mymain(void) DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64"); DO_TEST("memory-hotplug-ppc64-nonuma", QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, - QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_FILE); + QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE); DO_TEST_FULL("memory-hotplug-ppc64-nonuma-abi-update", "", WHEN_BOTH, ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, ARG_QEMU_CAPS, QEMU_CAPS_KVM, QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_LAST, ARG_END); + QEMU_CAPS_LAST, ARG_END); DO_TEST_NOCAPS("memory-hotplug"); DO_TEST("memory-hotplug-dimm", QEMU_CAPS_DEVICE_PC_DIMM); DO_TEST_CAPS_LATEST("memory-hotplug-dimm-addr"); @@ -1044,13 +1042,11 @@ mymain(void) DO_TEST("memory-hotplug-nvdimm-readonly", QEMU_CAPS_DEVICE_NVDIMM, QEMU_CAPS_DEVICE_NVDIMM_UNARMED); DO_TEST("memory-hotplug-nvdimm-ppc64", QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_DEVICE_NVDIMM); DO_TEST_FULL("memory-hotplug-nvdimm-ppc64-abi-update", "", WHEN_BOTH, ARG_PARSEFLAGS, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, ARG_QEMU_CAPS, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, - QEMU_CAPS_OBJECT_MEMORY_FILE, QEMU_CAPS_DEVICE_NVDIMM, QEMU_CAPS_LAST, ARG_END); DO_TEST_CAPS_LATEST("memory-hotplug-virtio-pmem"); @@ -1087,16 +1083,12 @@ mymain(void) DO_TEST_CAPS_LATEST("virtio-options"); - DO_TEST("fd-memory-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_KVM); - DO_TEST("fd-memory-numa-topology2", QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_KVM); - DO_TEST("fd-memory-numa-topology3", QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_KVM); + DO_TEST("fd-memory-numa-topology", QEMU_CAPS_KVM); + DO_TEST("fd-memory-numa-topology2", QEMU_CAPS_KVM); + DO_TEST("fd-memory-numa-topology3", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("fd-memory-numa-topology4"); - DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_OBJECT_MEMORY_FILE, - QEMU_CAPS_KVM); + DO_TEST("fd-memory-no-numa-topology", QEMU_CAPS_KVM); DO_TEST_CAPS_LATEST("memfd-memory-numa"); DO_TEST_CAPS_LATEST("memfd-memory-default-hugepage"); -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
Introduced in QEMU's commit of v2.1.0-rc0~41^2~26 only for Linux, and later in v3.1.0-rc0~71^2~10 for all POSIX, the memory-backend-file is going to be present for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 9 ++--- src/qemu/qemu_command.c | 13 ++------ src/qemu/qemu_validate.c | 10 ------ .../hugepages-default-1G-nodeset-2M.err | 2 +- tests/qemuxml2argvtest.c | 33 ++++++------------- tests/qemuxml2xmltest.c | 26 +++++---------- 6 files changed, 26 insertions(+), 67 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 - 29 files changed, 29 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 329a120237..fa814214ab 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1280,7 +1280,6 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = { { "ich9-intel-hda", QEMU_CAPS_DEVICE_ICH9_INTEL_HDA }, { "pvpanic", QEMU_CAPS_DEVICE_PANIC }, { "usb-kbd", QEMU_CAPS_DEVICE_USB_KBD }, - { "memory-backend-file", QEMU_CAPS_OBJECT_MEMORY_FILE }, { "usb-audio", QEMU_CAPS_OBJECT_USB_AUDIO }, { "iothread", QEMU_CAPS_OBJECT_IOTHREAD}, { "ivshmem", QEMU_CAPS_DEVICE_IVSHMEM }, diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml index 847de7b133..88e5a982f7 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -45,7 +45,6 @@ <flag name='enable-fips'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml index 75f55c5ceb..e30e025e29 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -44,7 +44,6 @@ <flag name='enable-fips'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml index abb15f7cf0..f96bea1901 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -24,7 +24,6 @@ <flag name='vfio-pci'/> <flag name='enable-fips'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='iothread'/> <flag name='migrate-rdma'/> <flag name='aes-key-wrap'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml index 22becc1752..c4599e2520 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -58,7 +58,6 @@ <flag name='enable-fips'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='rtc-reset-reinjection'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml index 5920084f69..c3d1c90195 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -47,7 +47,6 @@ <flag name='enable-fips'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml index fb0a7d1afd..899eabfc22 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -45,7 +45,6 @@ <flag name='enable-fips'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml index 9d168d71a0..dc89b93e38 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -48,7 +48,6 @@ <flag name='enable-fips'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml index e9a663dd7f..7d95c8e62a 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -58,7 +58,6 @@ <flag name='enable-fips'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='rtc-reset-reinjection'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml index 960153b7fa..44d8bec650 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml @@ -16,7 +16,6 @@ <flag name='rng-egd'/> <flag name='enable-fips'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='iothread'/> <flag name='migrate-rdma'/> <flag name='vserport-change-event'/> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml index d907b26bc4..f9e4031b14 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -58,7 +58,6 @@ <flag name='enable-fips'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='rtc-reset-reinjection'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml index 93bb657a35..d5f66fcbd8 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -46,7 +46,6 @@ <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml index c6a8f0c712..dd8f93e4cd 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -44,7 +44,6 @@ <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml index f1c392563a..f82171b523 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -47,7 +47,6 @@ <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml index 71f5741ca2..1d9ccea520 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -23,7 +23,6 @@ <flag name='pci-bridge'/> <flag name='vfio-pci'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='iothread'/> <flag name='migrate-rdma'/> <flag name='aes-key-wrap'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml index 991c146bb7..b8bc71ff69 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -57,7 +57,6 @@ <flag name='pvpanic'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='rtc-reset-reinjection'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml index a2606fe46b..37abd13332 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -45,7 +45,6 @@ <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml index d4d3adb968..c946be4268 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -23,7 +23,6 @@ <flag name='pci-bridge'/> <flag name='vfio-pci'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='iothread'/> <flag name='migrate-rdma'/> <flag name='aes-key-wrap'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml index 785ac2ca75..066e52697f 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -56,7 +56,6 @@ <flag name='pvpanic'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='rtc-reset-reinjection'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml index 1fa14964c5..513817c15c 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -56,7 +56,6 @@ <flag name='pvpanic'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='rtc-reset-reinjection'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml index dd9a63e9e6..249bfcea54 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -50,7 +50,6 @@ <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml index 20d7b33de6..8626b28acb 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -44,7 +44,6 @@ <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml index 0fa7d84386..a3b66b344f 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -56,7 +56,6 @@ <flag name='pvpanic'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='rtc-reset-reinjection'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml index e399d1abf1..965e2da794 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml @@ -50,7 +50,6 @@ <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml index 771734470b..2a4cf7b100 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -50,7 +50,6 @@ <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml index 5231630072..7fb947b426 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -56,7 +56,6 @@ <flag name='pvpanic'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='rtc-reset-reinjection'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml index c7f56f56e2..85ac3b90d3 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml @@ -49,7 +49,6 @@ <flag name='ich9-intel-hda'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='iothread'/> <flag name='migrate-rdma'/> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml index c681b6b1cd..434e148eeb 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml @@ -56,7 +56,6 @@ <flag name='pvpanic'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='rtc-reset-reinjection'/> <flag name='iothread'/> diff --git a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml index 22d943e2e6..a486c390cb 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml @@ -56,7 +56,6 @@ <flag name='pvpanic'/> <flag name='usb-kbd'/> <flag name='numa'/> - <flag name='memory-backend-file'/> <flag name='usb-audio'/> <flag name='rtc-reset-reinjection'/> <flag name='iothread'/> -- 2.37.4

In the commit summary: *detecting On a Thursday in 2022, Michal Privoznik wrote:
All supported QEMUs have this capability. Stop detecting it.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 1 - [...] tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 - 29 files changed, 29 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index fa814214ab..7ebd18af1b 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -304,7 +304,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "numa", /* QEMU_CAPS_NUMA */ /* 170 */ - "memory-backend-file", /* QEMU_CAPS_OBJECT_MEMORY_FILE */ + "memory-backend-file", /* X_QEMU_CAPS_OBJECT_MEMORY_FILE */ "usb-audio", /* QEMU_CAPS_OBJECT_USB_AUDIO */ "rtc-reset-reinjection", /* QEMU_CAPS_RTC_RESET_REINJECTION */ "splash-timeout", /* X_QEMU_CAPS_SPLASH_TIMEOUT */ diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 6f4318aa88..0ede28b44e 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -282,7 +282,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_NUMA, /* newer -numa handling with disjoint cpu ranges */ /* 170 */ - QEMU_CAPS_OBJECT_MEMORY_FILE, /* -object memory-backend-file */ + X_QEMU_CAPS_OBJECT_MEMORY_FILE, /* -object memory-backend-file */ QEMU_CAPS_OBJECT_USB_AUDIO, /* usb-audio device support */ QEMU_CAPS_RTC_RESET_REINJECTION, /* rtc-reset-reinjection monitor command */ X_QEMU_CAPS_SPLASH_TIMEOUT, /* -boot splash-time */ -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
Now that nothing uses this capability, it can be retired.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Introduced in QEMU's commit of v2.11.0-rc0~95^2~9 the .discard attribute of memory-backend-file is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 15 ++++----------- .../pages-dimm-discard.x86_64-latest.args | 2 +- .../pages-discard-hugepages.x86_64-latest.args | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index bcd30ef4f3..395b2e0a8f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3351,17 +3351,10 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, return -1; if (!mem->nvdimmPath && - discard == VIR_TRISTATE_BOOL_YES) { - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("this QEMU doesn't support memory discard")); - return -1; - } - - if (virJSONValueObjectAdd(&props, - "B:discard-data", true, - NULL) < 0) - return -1; + virJSONValueObjectAdd(&props, + "T:discard-data", discard, + NULL) < 0) { + return -1; } if (qemuBuildMemoryBackendPropsShare(props, memAccess) < 0) diff --git a/tests/qemuxml2argvdata/pages-dimm-discard.x86_64-latest.args b/tests/qemuxml2argvdata/pages-dimm-discard.x86_64-latest.args index 6324443e93..19ed3928de 100644 --- a/tests/qemuxml2argvdata/pages-dimm-discard.x86_64-latest.args +++ b/tests/qemuxml2argvdata/pages-dimm-discard.x86_64-latest.args @@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \ -no-acpi \ -boot strict=on \ -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \ --object '{"qom-type":"memory-backend-file","id":"memdimm0","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-fedora","prealloc":true,"size":1073741824,"host-nodes":[1,2,3],"policy":"bind"}' \ +-object '{"qom-type":"memory-backend-file","id":"memdimm0","mem-path":"/dev/hugepages1G/libvirt/qemu/-1-fedora","discard-data":false,"prealloc":true,"size":1073741824,"host-nodes":[1,2,3],"policy":"bind"}' \ -device '{"driver":"pc-dimm","node":0,"memdev":"memdimm0","id":"dimm0","slot":0}' \ -object '{"qom-type":"memory-backend-file","id":"memdimm1","mem-path":"/var/lib/libvirt/qemu/ram/-1-fedora/dimm1","discard-data":true,"share":false,"size":536870912}' \ -device '{"driver":"pc-dimm","node":0,"memdev":"memdimm1","id":"dimm1","slot":1}' \ diff --git a/tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args b/tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args index 880e0de192..3b03f940f9 100644 --- a/tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args +++ b/tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args @@ -16,7 +16,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-SomeDummyHugepagesGu/.config \ -m 1024 \ -overcommit mem-lock=off \ -smp 2,sockets=2,cores=1,threads=1 \ --object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu","prealloc":true,"size":268435456}' \ +-object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu","discard-data":false,"prealloc":true,"size":268435456}' \ -numa node,nodeid=0,cpus=0,memdev=ram-node0 \ -object '{"qom-type":"memory-backend-file","id":"ram-node1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-SomeDummyHugepagesGu","discard-data":true,"prealloc":true,"size":805306368}' \ -numa node,nodeid=1,cpus=1,memdev=ram-node1 \ -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
Introduced in QEMU's commit of v2.11.0-rc0~95^2~9 the .discard attribute of memory-backend-file is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 15 ++++----------- .../pages-dimm-discard.x86_64-latest.args | 2 +- .../pages-discard-hugepages.x86_64-latest.args | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 - 29 files changed, 29 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7ebd18af1b..f9b62680ba 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1699,7 +1699,6 @@ static virQEMUCapsDeviceTypeProps virQEMUCapsDeviceProps[] = { }; static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] = { - { "discard-data", QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD }, { "align", QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN }, { "pmem", QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM }, /* As of QEMU commit 8db0b20415c129cf5e577a593a4a0372d90b7cc9 the diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml index 88e5a982f7..25175dbe40 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -92,7 +92,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml index e30e025e29..1cee3e84b5 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -90,7 +90,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml index f96bea1901..7eda72597a 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -59,7 +59,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='vfio-ccw'/> <flag name='screendump_device'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml index c4599e2520..f0c65ef45f 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -122,7 +122,6 @@ <flag name='tpm-crb'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vmgenid'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml index c3d1c90195..1d8671ce49 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -94,7 +94,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml index 899eabfc22..bd02db19d7 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -92,7 +92,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml index dc89b93e38..62f57c8f3d 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -91,7 +91,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml index 7d95c8e62a..7437631233 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -122,7 +122,6 @@ <flag name='tpm-crb'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vmgenid'/> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml index 44d8bec650..9414b4f645 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml @@ -30,7 +30,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='egl-headless'/> <flag name='memory-backend-memfd'/> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml index f9e4031b14..27335beb96 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -121,7 +121,6 @@ <flag name='tpm-crb'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vmgenid'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml index d5f66fcbd8..0a4a746c70 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -93,7 +93,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml index dd8f93e4cd..5f67489600 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -90,7 +90,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml index f82171b523..64c0d6a51b 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -89,7 +89,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml index 1d9ccea520..7f0b971e77 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -57,7 +57,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='vfio-ccw'/> <flag name='screendump_device'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml index b8bc71ff69..7369c2e1b2 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -121,7 +121,6 @@ <flag name='tpm-crb'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vmgenid'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml index 37abd13332..466832fde8 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -94,7 +94,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml index c946be4268..fefa817b9d 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -57,7 +57,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='vfio-ccw'/> <flag name='screendump_device'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml index 066e52697f..e9c6f9a3c6 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -120,7 +120,6 @@ <flag name='tpm-crb'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vmgenid'/> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml index 513817c15c..7e6a3616c9 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -119,7 +119,6 @@ <flag name='tpm-crb'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vmgenid'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml index 249bfcea54..a547b93546 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -101,7 +101,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml index 8626b28acb..9e39eaea5f 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -90,7 +90,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml index a3b66b344f..0ed9738f2c 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -119,7 +119,6 @@ <flag name='tpm-crb'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vmgenid'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml index 965e2da794..58426f96fa 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml @@ -101,7 +101,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml index 2a4cf7b100..3ba6d550aa 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -96,7 +96,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml index 7fb947b426..2ab4198e58 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -119,7 +119,6 @@ <flag name='tpm-crb'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vmgenid'/> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml index 85ac3b90d3..cfc56d42d3 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml @@ -95,7 +95,6 @@ <flag name='nbd-tls'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vhost-vsock'/> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml index 434e148eeb..1afbe830d0 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml @@ -119,7 +119,6 @@ <flag name='tpm-crb'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vmgenid'/> diff --git a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml index a486c390cb..febb341d45 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml @@ -119,7 +119,6 @@ <flag name='tpm-crb'/> <flag name='pr-manager-helper'/> <flag name='qom-list-properties'/> - <flag name='memory-backend-file.discard-data'/> <flag name='screendump_device'/> <flag name='hda-output'/> <flag name='vmgenid'/> -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
All supported QEMUs have this capability. Stop detecting it.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - [...] tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 - 29 files changed, 29 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f9b62680ba..723fa446ea 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -476,7 +476,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "tpm-crb", /* QEMU_CAPS_DEVICE_TPM_CRB */ "pr-manager-helper", /* QEMU_CAPS_PR_MANAGER_HELPER */ "qom-list-properties", /* QEMU_CAPS_QOM_LIST_PROPERTIES */ - "memory-backend-file.discard-data", /* QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD */ + "memory-backend-file.discard-data", /* X_QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD */ /* 295 */ "virtual-css-bridge", /* X_QEMU_CAPS_CCW */ diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 0ede28b44e..edce3f1473 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -455,7 +455,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_DEVICE_TPM_CRB, /* -device tpm-crb */ QEMU_CAPS_PR_MANAGER_HELPER, /* -object pr-manager-helper */ QEMU_CAPS_QOM_LIST_PROPERTIES, /* qom-list-properties monitor command */ - QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD, /* -object memory-backend-file,discard-data */ + X_QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD, /* -object memory-backend-file,discard-data */ /* 295 */ X_QEMU_CAPS_CCW, /* -device virtual-css-bridge */ -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
Now that nothing uses this capability, it can be retired.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Introduced in QEMU's commit of v2.12.0-rc0~148^2~4 the .align attribute of memory-backend-file is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 395b2e0a8f..256ef4912c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3410,16 +3410,8 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, if (virJSONValueObjectAdd(&props, "U:size", mem->size * 1024, NULL) < 0) return -1; - if (mem->alignsize) { - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("nvdimm align property is not available " - "with this QEMU binary")); - return -1; - } - if (virJSONValueObjectAdd(&props, "U:align", mem->alignsize * 1024, NULL) < 0) - return -1; - } + if (virJSONValueObjectAdd(&props, "P:align", mem->alignsize * 1024, NULL) < 0) + return -1; if (mem->nvdimmPmem) { if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM)) { -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
Introduced in QEMU's commit of v2.12.0-rc0~148^2~4 the .align attribute of memory-backend-file is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

All supported QEMUs have this capability. Stop detecting it. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 - 29 files changed, 29 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 723fa446ea..040c989457 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1699,7 +1699,6 @@ static virQEMUCapsDeviceTypeProps virQEMUCapsDeviceProps[] = { }; static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] = { - { "align", QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN }, { "pmem", QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM }, /* As of QEMU commit 8db0b20415c129cf5e577a593a4a0372d90b7cc9 the * "x-use-canonical-path-for-ramblock-id" property is considered stable and diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml index 25175dbe40..a89a77fbde 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -101,7 +101,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml index 1cee3e84b5..47529e9c6e 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml @@ -102,7 +102,6 @@ <flag name='iothread.poll-max-ns'/> <flag name='machine.pseries.cap-nested-hv'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml index 7eda72597a..7456516422 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -70,7 +70,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml index f0c65ef45f..53b1dda4da 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -135,7 +135,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml index 1d8671ce49..9002c29711 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -104,7 +104,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml index bd02db19d7..3b0828efd3 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml @@ -105,7 +105,6 @@ <flag name='iothread.poll-max-ns'/> <flag name='machine.pseries.cap-nested-hv'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml index 62f57c8f3d..2db333b322 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.riscv64.xml @@ -100,7 +100,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml index 7437631233..5fbc028142 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -135,7 +135,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml index 9414b4f645..2ba3ca88a5 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.sparc.xml @@ -36,7 +36,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='query-current-machine'/> <flag name='bitmap-merge'/> diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml index 27335beb96..6b2faaf51b 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -134,7 +134,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml index 0a4a746c70..b0b9fff8b8 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -103,7 +103,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml index 5f67489600..d537801191 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.ppc64.xml @@ -103,7 +103,6 @@ <flag name='iothread.poll-max-ns'/> <flag name='machine.pseries.cap-nested-hv'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml index 64c0d6a51b..c775410ced 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.riscv64.xml @@ -98,7 +98,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml index 7f0b971e77..a89bf23f48 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -68,7 +68,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml index 7369c2e1b2..b22a8f4efe 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -134,7 +134,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml index 466832fde8..cef489646a 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -104,7 +104,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml index fefa817b9d..3c20758fe0 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -68,7 +68,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> <flag name='bitmap-merge'/> diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml index e9c6f9a3c6..2a1ede597a 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -134,7 +134,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml index 7e6a3616c9..c36e457708 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -132,7 +132,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml index a547b93546..da509b777d 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -111,7 +111,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml index 9e39eaea5f..88e6957240 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml @@ -101,7 +101,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='machine.pseries.cap-nested-hv'/> - <flag name='memory-backend-file.align'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml index 0ed9738f2c..16fe1026b5 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -132,7 +132,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml index 58426f96fa..f6b0c084e4 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml @@ -111,7 +111,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> <flag name='query-current-machine'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml index 3ba6d550aa..0f5b887bcd 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml @@ -109,7 +109,6 @@ <flag name='iothread.poll-max-ns'/> <flag name='machine.pseries.cap-nested-hv'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml index 2ab4198e58..9eef4f0820 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -132,7 +132,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml index cfc56d42d3..6e3b7e00f3 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.ppc64.xml @@ -106,7 +106,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='machine.pseries.cap-nested-hv'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml index 1afbe830d0..7b92a0b8c8 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml @@ -132,7 +132,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> diff --git a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml index febb341d45..01dbf72185 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml @@ -132,7 +132,6 @@ <flag name='memory-backend-memfd.hugetlb'/> <flag name='iothread.poll-max-ns'/> <flag name='egl-headless.rendernode'/> - <flag name='memory-backend-file.align'/> <flag name='memory-backend-file.pmem'/> <flag name='nvdimm.unarmed'/> <flag name='virtio-pci-non-transitional'/> -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
All supported QEMUs have this capability. Stop detecting it.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 1 - tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - [...] tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 - 29 files changed, 29 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano

Now that nothing uses this capability, it can be retired. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 040c989457..39c2d38969 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -516,7 +516,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 320 */ "machine.pseries.cap-nested-hv", /* QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV */ "egl-headless.rendernode", /* QEMU_CAPS_EGL_HEADLESS_RENDERNODE */ - "memory-backend-file.align", /* QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN */ + "memory-backend-file.align", /* X_QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN */ "memory-backend-file.pmem", /* QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM */ "nvdimm.unarmed", /* QEMU_CAPS_DEVICE_NVDIMM_UNARMED */ diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index edce3f1473..0e0034663c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -495,7 +495,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 320 */ QEMU_CAPS_MACHINE_PSERIES_CAP_NESTED_HV, /* -machine pseries.cap-nested-hv */ QEMU_CAPS_EGL_HEADLESS_RENDERNODE, /* -display egl-headless,rendernode= */ - QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN, /* -object memory-backend-file,align= */ + X_QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN, /* -object memory-backend-file,align= */ QEMU_CAPS_OBJECT_MEMORY_FILE_PMEM, /* -object memory-backend-file,pmem= */ QEMU_CAPS_DEVICE_NVDIMM_UNARMED, /* -device nvdimm,unarmed= */ -- 2.37.4

On a Thursday in 2022, Michal Privoznik wrote:
Now that nothing uses this capability, it can be retired.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
participants (2)
-
Ján Tomko
-
Michal Privoznik