From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> QEMU 3.1 should only expose the property if the host is actually capable of creating hugetable-backed memfd. However, it may fail at runtime depending on requested "hugetlbsize". Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx> Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- src/qemu/qemu_capabilities.c | 8 ++ src/qemu/qemu_capabilities.h | 1 + .../caps_2.12.0.aarch64.replies | 94 ++++++++++++--- .../caps_2.12.0.aarch64.xml | 3 +- .../caps_2.12.0.ppc64.replies | 90 +++++++++++--- .../caps_2.12.0.ppc64.xml | 3 +- .../caps_2.12.0.s390x.replies | 98 ++++++++++++---- .../caps_2.12.0.s390x.xml | 3 +- .../caps_2.12.0.x86_64.replies | 110 +++++++++++++----- .../caps_2.12.0.x86_64.xml | 3 +- .../caps_3.0.0.ppc64.replies | 90 +++++++++++--- .../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 3 +- .../caps_3.0.0.riscv32.replies | 86 +++++++++++--- .../caps_3.0.0.riscv32.xml | 1 + .../caps_3.0.0.riscv64.replies | 86 +++++++++++--- .../caps_3.0.0.riscv64.xml | 1 + .../caps_3.0.0.x86_64.replies | 110 +++++++++++++----- .../caps_3.0.0.x86_64.xml | 3 +- 18 files changed, 637 insertions(+), 156 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index d866fbc183..e333e90171 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -509,6 +509,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "vfio-pci.display", "blockdev", "memory-backend-memfd", + "memory-backend-memfd.hugetlb", ); @@ -1411,6 +1412,10 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] = { "discard-data", QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD }, }; +static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendMemfd[] = { + { "hugetlb", QEMU_CAPS_OBJECT_MEMORY_MEMFD_HUGETLB }, +}; + static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsSPAPRMachine[] = { { "cap-hpt-max-page-size", QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE }, { "cap-htm", QEMU_CAPS_MACHINE_PSERIES_CAP_HTM }, @@ -1420,6 +1425,9 @@ static virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = { { "memory-backend-file", virQEMUCapsObjectPropsMemoryBackendFile, ARRAY_CARDINALITY(virQEMUCapsObjectPropsMemoryBackendFile), QEMU_CAPS_OBJECT_MEMORY_FILE }, + { "memory-backend-memfd", virQEMUCapsObjectPropsMemoryBackendMemfd, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsMemoryBackendMemfd), + QEMU_CAPS_OBJECT_MEMORY_FILE }, { "spapr-machine", virQEMUCapsObjectPropsSPAPRMachine, ARRAY_CARDINALITY(virQEMUCapsObjectPropsSPAPRMachine), -1 }, diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index b56d92c2f9..1f0f49979c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -493,6 +493,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_VFIO_PCI_DISPLAY, /* -device vfio-pci.display */ QEMU_CAPS_BLOCKDEV, /* -blockdev and blockdev-add are supported */ QEMU_CAPS_OBJECT_MEMORY_MEMFD, /* -object memory-backend-memfd */ + QEMU_CAPS_OBJECT_MEMORY_MEMFD_HUGETLB, /* -object memory-backend-memfd.hugetlb */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.replies b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.replies index 4208a66156..2cd6705d78 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.replies @@ -5403,13 +5403,71 @@ { "execute": "qom-list-properties", "arguments": { - "typename": "spapr-machine" + "typename": "memory-backend-memfd" }, "id": "libvirt-31" } { - "id": "libvirt-31", + "return": [ + { + "name": "policy", + "type": "HostMemPolicy" + }, + { + "name": "share", + "type": "bool" + }, + { + "name": "host-nodes", + "type": "int" + }, + { + "name": "prealloc", + "type": "bool" + }, + { + "name": "dump", + "type": "bool" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "merge", + "type": "bool" + }, + { + "name": "seal", + "type": "bool" + }, + { + "name": "hugetlbsize", + "type": "int" + }, + { + "name": "hugetlb", + "type": "bool" + }, + { + "name": "type", + "type": "string" + } + ], + "id": "libvirt-31" +} + +{ + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, + "id": "libvirt-32" +} + +{ + "id": "libvirt-32", "error": { "class": "DeviceNotFound", "desc": "Class 'spapr-machine' not found" @@ -5418,7 +5476,7 @@ { "execute": "query-machines", - "id": "libvirt-32" + "id": "libvirt-33" } { @@ -5715,12 +5773,12 @@ "cpu-max": 1 } ], - "id": "libvirt-32" + "id": "libvirt-33" } { "execute": "query-cpu-definitions", - "id": "libvirt-33" + "id": "libvirt-34" } { @@ -5896,35 +5954,35 @@ "static": false } ], - "id": "libvirt-33" + "id": "libvirt-34" } { "execute": "query-tpm-models", - "id": "libvirt-34" + "id": "libvirt-35" } { "return": [ ], - "id": "libvirt-34" + "id": "libvirt-35" } { "execute": "query-tpm-types", - "id": "libvirt-35" + "id": "libvirt-36" } { "return": [ "emulator" ], - "id": "libvirt-35" + "id": "libvirt-36" } { "execute": "query-command-line-options", - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -7085,12 +7143,12 @@ "option": "drive" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { "execute": "query-migrate-capabilities", - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -7152,12 +7210,12 @@ "capability": "dirty-bitmaps" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { "execute": "query-qmp-schema", - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -18525,12 +18583,12 @@ "meta-type": "object" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-gic-capabilities", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -18546,7 +18604,7 @@ "kernel": false } ], - "id": "libvirt-39" + "id": "libvirt-40" } { diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml index e4de7da349..1bf025007d 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -164,9 +164,10 @@ <flag name='egl-headless'/> <flag name='vfio-pci.display'/> <flag name='memory-backend-memfd'/> + <flag name='memory-backend-memfd.hugetlb'/> <version>2011090</version> <kvmVersion>0</kvmVersion> - <microcodeVersion>344910</microcodeVersion> + <microcodeVersion>345725</microcodeVersion> <package>v2.12.0-rc0</package> <arch>aarch64</arch> <cpu type='kvm' name='pxa262'/> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies index bd28546275..d8aef1e9d1 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies @@ -5458,11 +5458,69 @@ { "execute": "qom-list-properties", "arguments": { - "typename": "spapr-machine" + "typename": "memory-backend-memfd" }, "id": "libvirt-32" } +{ + "return": [ + { + "name": "policy", + "type": "HostMemPolicy" + }, + { + "name": "share", + "type": "bool" + }, + { + "name": "host-nodes", + "type": "int" + }, + { + "name": "prealloc", + "type": "bool" + }, + { + "name": "dump", + "type": "bool" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "merge", + "type": "bool" + }, + { + "name": "seal", + "type": "bool" + }, + { + "name": "hugetlbsize", + "type": "int" + }, + { + "name": "hugetlb", + "type": "bool" + }, + { + "name": "type", + "type": "string" + } + ], + "id": "libvirt-32" +} + +{ + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, + "id": "libvirt-33" +} + { "return": [ { @@ -5621,12 +5679,12 @@ "type": "bool" } ], - "id": "libvirt-32" + "id": "libvirt-33" } { "execute": "query-machines", - "id": "libvirt-33" + "id": "libvirt-34" } { @@ -5764,12 +5822,12 @@ "cpu-max": 1 } ], - "id": "libvirt-33" + "id": "libvirt-34" } { "execute": "query-cpu-definitions", - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -7965,35 +8023,35 @@ "static": false } ], - "id": "libvirt-34" + "id": "libvirt-35" } { "execute": "query-tpm-models", - "id": "libvirt-35" + "id": "libvirt-36" } { "return": [ ], - "id": "libvirt-35" + "id": "libvirt-36" } { "execute": "query-tpm-types", - "id": "libvirt-36" + "id": "libvirt-37" } { "return": [ "emulator" ], - "id": "libvirt-36" + "id": "libvirt-37" } { "execute": "query-command-line-options", - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -9149,12 +9207,12 @@ "option": "drive" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { "execute": "query-migrate-capabilities", - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -9216,12 +9274,12 @@ "capability": "dirty-bitmaps" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-qmp-schema", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -20589,7 +20647,7 @@ "meta-type": "object" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml index ffe451b332..d722a5d6e8 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml @@ -162,9 +162,10 @@ <flag name='egl-headless'/> <flag name='vfio-pci.display'/> <flag name='memory-backend-memfd'/> + <flag name='memory-backend-memfd.hugetlb'/> <version>2011090</version> <kvmVersion>0</kvmVersion> - <microcodeVersion>425694</microcodeVersion> + <microcodeVersion>426509</microcodeVersion> <package>v2.12.0-rc0</package> <arch>ppc64</arch> <cpu type='kvm' name='default'/> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies index f98afbceae..b5a14b5916 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies @@ -3818,13 +3818,71 @@ { "execute": "qom-list-properties", "arguments": { - "typename": "spapr-machine" + "typename": "memory-backend-memfd" }, "id": "libvirt-31" } { - "id": "libvirt-31", + "return": [ + { + "name": "policy", + "type": "HostMemPolicy" + }, + { + "name": "share", + "type": "bool" + }, + { + "name": "host-nodes", + "type": "int" + }, + { + "name": "prealloc", + "type": "bool" + }, + { + "name": "dump", + "type": "bool" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "merge", + "type": "bool" + }, + { + "name": "seal", + "type": "bool" + }, + { + "name": "hugetlbsize", + "type": "int" + }, + { + "name": "hugetlb", + "type": "bool" + }, + { + "name": "type", + "type": "string" + } + ], + "id": "libvirt-31" +} + +{ + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, + "id": "libvirt-32" +} + +{ + "id": "libvirt-32", "error": { "class": "DeviceNotFound", "desc": "Class 'spapr-machine' not found" @@ -3833,7 +3891,7 @@ { "execute": "query-machines", - "id": "libvirt-32" + "id": "libvirt-33" } { @@ -3891,12 +3949,12 @@ "alias": "s390-ccw-virtio" } ], - "id": "libvirt-32" + "id": "libvirt-33" } { "execute": "query-cpu-definitions", - "id": "libvirt-33" + "id": "libvirt-34" } { @@ -4431,35 +4489,35 @@ "migration-safe": true } ], - "id": "libvirt-33" + "id": "libvirt-34" } { "execute": "query-tpm-models", - "id": "libvirt-34" + "id": "libvirt-35" } { "return": [ ], - "id": "libvirt-34" + "id": "libvirt-35" } { "execute": "query-tpm-types", - "id": "libvirt-35" + "id": "libvirt-36" } { "return": [ "emulator" ], - "id": "libvirt-35" + "id": "libvirt-36" } { "execute": "query-command-line-options", - "id": "libvirt-36" + "id": "libvirt-37" } { @@ -5584,12 +5642,12 @@ "option": "drive" } ], - "id": "libvirt-36" + "id": "libvirt-37" } { "execute": "query-migrate-capabilities", - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -5651,12 +5709,12 @@ "capability": "dirty-bitmaps" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { "execute": "query-qmp-schema", - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -17024,7 +17082,7 @@ "meta-type": "object" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -17035,7 +17093,7 @@ "name": "host" } }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -17073,7 +17131,7 @@ } } }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -17087,11 +17145,11 @@ } } }, - "id": "libvirt-40" + "id": "libvirt-41" } { - "id": "libvirt-40", + "id": "libvirt-41", "error": { "class": "GenericError", "desc": "Property '.migratable' not found" diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml index 7fa50bdfaa..2082b1f6d3 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -130,9 +130,10 @@ <flag name='egl-headless'/> <flag name='vfio-pci.display'/> <flag name='memory-backend-memfd'/> + <flag name='memory-backend-memfd.hugetlb'/> <version>2012000</version> <kvmVersion>0</kvmVersion> - <microcodeVersion>374287</microcodeVersion> + <microcodeVersion>375102</microcodeVersion> <package></package> <arch>s390x</arch> <hostCPU type='kvm' model='z14-base' migratability='no'> diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.replies index e0b6d2f937..675b85b43d 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.replies @@ -4816,13 +4816,71 @@ { "execute": "qom-list-properties", "arguments": { - "typename": "spapr-machine" + "typename": "memory-backend-memfd" }, "id": "libvirt-36" } { - "id": "libvirt-36", + "return": [ + { + "name": "policy", + "type": "HostMemPolicy" + }, + { + "name": "share", + "type": "bool" + }, + { + "name": "host-nodes", + "type": "int" + }, + { + "name": "prealloc", + "type": "bool" + }, + { + "name": "dump", + "type": "bool" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "merge", + "type": "bool" + }, + { + "name": "seal", + "type": "bool" + }, + { + "name": "hugetlbsize", + "type": "int" + }, + { + "name": "hugetlb", + "type": "bool" + }, + { + "name": "type", + "type": "string" + } + ], + "id": "libvirt-36" +} + +{ + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, + "id": "libvirt-37" +} + +{ + "id": "libvirt-37", "error": { "class": "DeviceNotFound", "desc": "Class 'spapr-machine' not found" @@ -4831,7 +4889,7 @@ { "execute": "query-machines", - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -5030,12 +5088,12 @@ "cpu-max": 255 } ], - "id": "libvirt-37" + "id": "libvirt-38" } { "execute": "query-cpu-definitions", - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -5549,12 +5607,12 @@ "migration-safe": true } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-tpm-models", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -5562,12 +5620,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-tpm-types", - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -5575,12 +5633,12 @@ "passthrough", "emulator" ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-command-line-options", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -6867,12 +6925,12 @@ "option": "drive" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-migrate-capabilities", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -6934,12 +6992,12 @@ "capability": "dirty-bitmaps" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-qmp-schema", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -18307,7 +18365,7 @@ "meta-type": "object" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -18318,7 +18376,7 @@ "name": "host" } }, - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -18508,7 +18566,7 @@ } } }, - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -18700,7 +18758,7 @@ } } }, - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -18955,7 +19013,7 @@ } } }, - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -18969,7 +19027,7 @@ } } }, - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -19159,7 +19217,7 @@ } } }, - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -19351,7 +19409,7 @@ } } }, - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -19606,12 +19664,12 @@ } } }, - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-sev-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -19621,7 +19679,7 @@ "cert-chain": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA", "pdh": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA" }, - "id": "libvirt-48" + "id": "libvirt-49" } { diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml index b3f6bdc302..f2a63d7a88 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -205,9 +205,10 @@ <flag name='egl-headless'/> <flag name='vfio-pci.display'/> <flag name='memory-backend-memfd'/> + <flag name='memory-backend-memfd.hugetlb'/> <version>2011090</version> <kvmVersion>0</kvmVersion> - <microcodeVersion>413556</microcodeVersion> + <microcodeVersion>414371</microcodeVersion> <package>v2.12.0-rc0</package> <arch>x86_64</arch> <hostCPU type='kvm' model='base' migratability='yes'> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.replies b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.replies index eb57c77a90..aff01371a3 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.replies +++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.replies @@ -5541,11 +5541,69 @@ { "execute": "qom-list-properties", "arguments": { - "typename": "spapr-machine" + "typename": "memory-backend-memfd" }, "id": "libvirt-32" } +{ + "return": [ + { + "name": "policy", + "type": "HostMemPolicy" + }, + { + "name": "share", + "type": "bool" + }, + { + "name": "host-nodes", + "type": "int" + }, + { + "name": "prealloc", + "type": "bool" + }, + { + "name": "dump", + "type": "bool" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "merge", + "type": "bool" + }, + { + "name": "seal", + "type": "bool" + }, + { + "name": "hugetlbsize", + "type": "int" + }, + { + "name": "hugetlb", + "type": "bool" + }, + { + "name": "type", + "type": "string" + } + ], + "id": "libvirt-32" +} + +{ + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, + "id": "libvirt-33" +} + { "return": [ { @@ -5714,12 +5772,12 @@ "type": "bool" } ], - "id": "libvirt-32" + "id": "libvirt-33" } { "execute": "query-machines", - "id": "libvirt-33" + "id": "libvirt-34" } { @@ -5862,12 +5920,12 @@ "cpu-max": 1 } ], - "id": "libvirt-33" + "id": "libvirt-34" } { "execute": "query-cpu-definitions", - "id": "libvirt-34" + "id": "libvirt-35" } { @@ -8063,35 +8121,35 @@ "static": false } ], - "id": "libvirt-34" + "id": "libvirt-35" } { "execute": "query-tpm-models", - "id": "libvirt-35" + "id": "libvirt-36" } { "return": [ ], - "id": "libvirt-35" + "id": "libvirt-36" } { "execute": "query-tpm-types", - "id": "libvirt-36" + "id": "libvirt-37" } { "return": [ "emulator" ], - "id": "libvirt-36" + "id": "libvirt-37" } { "execute": "query-command-line-options", - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -9221,12 +9279,12 @@ "option": "drive" } ], - "id": "libvirt-37" + "id": "libvirt-38" } { "execute": "query-migrate-capabilities", - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -9296,12 +9354,12 @@ "capability": "late-block-activate" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-qmp-schema", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -21460,7 +21518,7 @@ "meta-type": "object" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml index f3df19fc33..c901c671a5 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml @@ -162,9 +162,10 @@ <flag name='egl-headless'/> <flag name='vfio-pci.display'/> <flag name='memory-backend-memfd'/> + <flag name='memory-backend-memfd.hugetlb'/> <version>2012050</version> <kvmVersion>0</kvmVersion> - <microcodeVersion>444131</microcodeVersion> + <microcodeVersion>444946</microcodeVersion> <package>v2.12.0-1689-g518d23a</package> <arch>ppc64</arch> <cpu type='kvm' name='default'/> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.replies b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.replies index 3e8d136a32..663b4a49c0 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.replies +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.replies @@ -1734,13 +1734,71 @@ { "execute": "qom-list-properties", "arguments": { - "typename": "spapr-machine" + "typename": "memory-backend-memfd" }, "id": "libvirt-27" } { - "id": "libvirt-27", + "return": [ + { + "name": "policy", + "type": "HostMemPolicy" + }, + { + "name": "share", + "type": "bool" + }, + { + "name": "host-nodes", + "type": "int" + }, + { + "name": "prealloc", + "type": "bool" + }, + { + "name": "dump", + "type": "bool" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "merge", + "type": "bool" + }, + { + "name": "seal", + "type": "bool" + }, + { + "name": "hugetlbsize", + "type": "int" + }, + { + "name": "hugetlb", + "type": "bool" + }, + { + "name": "type", + "type": "string" + } + ], + "id": "libvirt-27" +} + +{ + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, + "id": "libvirt-28" +} + +{ + "id": "libvirt-28", "error": { "class": "DeviceNotFound", "desc": "Class 'spapr-machine' not found" @@ -1749,7 +1807,7 @@ { "execute": "query-machines", - "id": "libvirt-28" + "id": "libvirt-29" } { @@ -1786,23 +1844,23 @@ "cpu-max": 1 } ], - "id": "libvirt-28" + "id": "libvirt-29" } { "execute": "query-tpm-models", - "id": "libvirt-29" + "id": "libvirt-30" } { "return": [ ], - "id": "libvirt-29" + "id": "libvirt-30" } { "execute": "query-tpm-types", - "id": "libvirt-30" + "id": "libvirt-31" } { @@ -1810,12 +1868,12 @@ "passthrough", "emulator" ], - "id": "libvirt-30" + "id": "libvirt-31" } { "execute": "query-command-line-options", - "id": "libvirt-31" + "id": "libvirt-32" } { @@ -2940,12 +2998,12 @@ "option": "drive" } ], - "id": "libvirt-31" + "id": "libvirt-32" } { "execute": "query-migrate-capabilities", - "id": "libvirt-32" + "id": "libvirt-33" } { @@ -3015,12 +3073,12 @@ "capability": "late-block-activate" } ], - "id": "libvirt-32" + "id": "libvirt-33" } { "execute": "query-qmp-schema", - "id": "libvirt-33" + "id": "libvirt-34" } { @@ -14695,5 +14753,5 @@ "meta-type": "object" } ], - "id": "libvirt-33" + "id": "libvirt-34" } diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml index bf04826ad0..2e1530e0eb 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml @@ -102,6 +102,7 @@ <flag name='tpm-emulator'/> <flag name='egl-headless'/> <flag name='memory-backend-memfd'/> + <flag name='memory-backend-memfd.hugetlb'/> <version>3000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.replies b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.replies index 3631193566..cc66c232ab 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.replies +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.replies @@ -1734,13 +1734,71 @@ { "execute": "qom-list-properties", "arguments": { - "typename": "spapr-machine" + "typename": "memory-backend-memfd" }, "id": "libvirt-27" } { - "id": "libvirt-27", + "return": [ + { + "name": "policy", + "type": "HostMemPolicy" + }, + { + "name": "share", + "type": "bool" + }, + { + "name": "host-nodes", + "type": "int" + }, + { + "name": "prealloc", + "type": "bool" + }, + { + "name": "dump", + "type": "bool" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "merge", + "type": "bool" + }, + { + "name": "seal", + "type": "bool" + }, + { + "name": "hugetlbsize", + "type": "int" + }, + { + "name": "hugetlb", + "type": "bool" + }, + { + "name": "type", + "type": "string" + } + ], + "id": "libvirt-27" +} + +{ + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, + "id": "libvirt-28" +} + +{ + "id": "libvirt-28", "error": { "class": "DeviceNotFound", "desc": "Class 'spapr-machine' not found" @@ -1749,7 +1807,7 @@ { "execute": "query-machines", - "id": "libvirt-28" + "id": "libvirt-29" } { @@ -1786,23 +1844,23 @@ "cpu-max": 1 } ], - "id": "libvirt-28" + "id": "libvirt-29" } { "execute": "query-tpm-models", - "id": "libvirt-29" + "id": "libvirt-30" } { "return": [ ], - "id": "libvirt-29" + "id": "libvirt-30" } { "execute": "query-tpm-types", - "id": "libvirt-30" + "id": "libvirt-31" } { @@ -1810,12 +1868,12 @@ "passthrough", "emulator" ], - "id": "libvirt-30" + "id": "libvirt-31" } { "execute": "query-command-line-options", - "id": "libvirt-31" + "id": "libvirt-32" } { @@ -2940,12 +2998,12 @@ "option": "drive" } ], - "id": "libvirt-31" + "id": "libvirt-32" } { "execute": "query-migrate-capabilities", - "id": "libvirt-32" + "id": "libvirt-33" } { @@ -3015,12 +3073,12 @@ "capability": "late-block-activate" } ], - "id": "libvirt-32" + "id": "libvirt-33" } { "execute": "query-qmp-schema", - "id": "libvirt-33" + "id": "libvirt-34" } { @@ -14695,5 +14753,5 @@ "meta-type": "object" } ], - "id": "libvirt-33" + "id": "libvirt-34" } diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml index b5f8f94052..4f54dc0217 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml @@ -102,6 +102,7 @@ <flag name='tpm-emulator'/> <flag name='egl-headless'/> <flag name='memory-backend-memfd'/> + <flag name='memory-backend-memfd.hugetlb'/> <version>3000000</version> <kvmVersion>0</kvmVersion> <microcodeVersion>0</microcodeVersion> diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.replies index 17edb990e1..f5bbe5c650 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.replies @@ -4928,13 +4928,71 @@ { "execute": "qom-list-properties", "arguments": { - "typename": "spapr-machine" + "typename": "memory-backend-memfd" }, "id": "libvirt-36" } { - "id": "libvirt-36", + "return": [ + { + "name": "policy", + "type": "HostMemPolicy" + }, + { + "name": "share", + "type": "bool" + }, + { + "name": "host-nodes", + "type": "int" + }, + { + "name": "prealloc", + "type": "bool" + }, + { + "name": "dump", + "type": "bool" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "merge", + "type": "bool" + }, + { + "name": "seal", + "type": "bool" + }, + { + "name": "hugetlbsize", + "type": "int" + }, + { + "name": "hugetlb", + "type": "bool" + }, + { + "name": "type", + "type": "string" + } + ], + "id": "libvirt-36" +} + +{ + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, + "id": "libvirt-37" +} + +{ + "id": "libvirt-37", "error": { "class": "DeviceNotFound", "desc": "Class 'spapr-machine' not found" @@ -4943,7 +5001,7 @@ { "execute": "query-machines", - "id": "libvirt-37" + "id": "libvirt-38" } { @@ -5152,12 +5210,12 @@ "cpu-max": 255 } ], - "id": "libvirt-37" + "id": "libvirt-38" } { "execute": "query-cpu-definitions", - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -5594,12 +5652,12 @@ "migration-safe": true } ], - "id": "libvirt-38" + "id": "libvirt-39" } { "execute": "query-tpm-models", - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -5607,12 +5665,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-39" + "id": "libvirt-40" } { "execute": "query-tpm-types", - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -5620,12 +5678,12 @@ "passthrough", "emulator" ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-command-line-options", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -6924,12 +6982,12 @@ "option": "drive" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { "execute": "query-migrate-capabilities", - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -6999,12 +7057,12 @@ "capability": "late-block-activate" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-qmp-schema", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -18884,7 +18942,7 @@ "meta-type": "object" } ], - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -18895,7 +18953,7 @@ "name": "host" } }, - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -19088,7 +19146,7 @@ } } }, - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -19283,7 +19341,7 @@ } } }, - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -19546,7 +19604,7 @@ } } }, - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -19560,7 +19618,7 @@ } } }, - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -19753,7 +19811,7 @@ } } }, - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -19948,7 +20006,7 @@ } } }, - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -20211,16 +20269,16 @@ } } }, - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-sev-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { - "id": "libvirt-48", + "id": "libvirt-49", "error": { "class": "GenericError", "desc": "SEV feature is not available" diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml index 2f22fd10b6..67e490dcdf 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -207,9 +207,10 @@ <flag name='egl-headless'/> <flag name='vfio-pci.display'/> <flag name='memory-backend-memfd'/> + <flag name='memory-backend-memfd.hugetlb'/> <version>3000000</version> <kvmVersion>0</kvmVersion> - <microcodeVersion>425157</microcodeVersion> + <microcodeVersion>425972</microcodeVersion> <package>v3.0.0</package> <arch>x86_64</arch> <hostCPU type='kvm' model='base' migratability='yes'> -- 2.19.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list