From: Marc-André Lureau <marcandre.lureau(a)redhat.com>
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(a)redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau(a)redhat.com>
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
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.s390x.replies | 98 ++++++++++++----
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 4 +-
.../caps_3.0.0.x86_64.replies | 110 +++++++++++++-----
.../caps_3.0.0.x86_64.xml | 3 +-
20 files changed, 718 insertions(+), 177 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 5d15e6d3fb..eab2444c5d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -510,6 +510,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"blockdev",
"vfio-ap",
"memory-backend-memfd",
+ "memory-backend-memfd.hugetlb",
);
@@ -1358,6 +1359,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 },
@@ -1367,6 +1372,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 a14aa0b7fc..c60bfa5a85 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -494,6 +494,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check
*/
QEMU_CAPS_BLOCKDEV, /* -blockdev and blockdev-add are supported */
QEMU_CAPS_DEVICE_VFIO_AP, /* -device vfio-ap */
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 20b683aad9..4254018d4c 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml
@@ -163,9 +163,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 3a63c369a4..0cbc6e3119 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml
@@ -161,9 +161,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 f8f4266d50..a1789808b9 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml
@@ -129,9 +129,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 e53f7621c0..73df166bc7 100644
--- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml
@@ -204,9 +204,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 93b04260da..7a8a4c782d 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.ppc64.xml
@@ -161,9 +161,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 57096e735e..634d76ef26 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv32.xml
@@ -101,6 +101,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 e88c69b2c7..d042eda06c 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.riscv64.xml
@@ -101,6 +101,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.s390x.replies
b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.replies
index 0560835b9f..3bcdfce293 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.replies
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.replies
@@ -3978,13 +3978,71 @@
{
"execute": "qom-list-properties",
"arguments": {
- "typename": "spapr-machine"
+ "typename": "memory-backend-memfd"
},
"id": "libvirt-32"
}
{
- "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"
+}
+
+{
+ "id": "libvirt-33",
"error": {
"class": "DeviceNotFound",
"desc": "Class 'spapr-machine' not found"
@@ -3993,7 +4051,7 @@
{
"execute": "query-machines",
- "id": "libvirt-33"
+ "id": "libvirt-34"
}
{
@@ -4056,12 +4114,12 @@
"cpu-max": 248
}
],
- "id": "libvirt-33"
+ "id": "libvirt-34"
}
{
"execute": "query-cpu-definitions",
- "id": "libvirt-34"
+ "id": "libvirt-35"
}
{
@@ -4612,35 +4670,35 @@
"migration-safe": true
}
],
- "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"
}
{
@@ -5800,12 +5858,12 @@
"option": "drive"
}
],
- "id": "libvirt-37"
+ "id": "libvirt-38"
}
{
"execute": "query-migrate-capabilities",
- "id": "libvirt-38"
+ "id": "libvirt-39"
}
{
@@ -5875,12 +5933,12 @@
"capability": "late-block-activate"
}
],
- "id": "libvirt-38"
+ "id": "libvirt-39"
}
{
"execute": "query-qmp-schema",
- "id": "libvirt-39"
+ "id": "libvirt-40"
}
{
@@ -17555,7 +17613,7 @@
"meta-type": "object"
}
],
- "id": "libvirt-39"
+ "id": "libvirt-40"
}
{
@@ -17566,7 +17624,7 @@
"name": "host"
}
},
- "id": "libvirt-40"
+ "id": "libvirt-41"
}
{
@@ -17608,7 +17666,7 @@
}
}
},
- "id": "libvirt-40"
+ "id": "libvirt-41"
}
{
@@ -17622,11 +17680,11 @@
}
}
},
- "id": "libvirt-41"
+ "id": "libvirt-42"
}
{
- "id": "libvirt-41",
+ "id": "libvirt-42",
"error": {
"class": "GenericError",
"desc": "Property '.migratable' not found"
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
index 3b5f9818a5..79de349da1 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml
@@ -130,9 +130,11 @@
<flag name='tpm-emulator'/>
<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>387601</microcodeVersion>
+ <microcodeVersion>388416</microcodeVersion>
<package></package>
<arch>s390x</arch>
<hostCPU type='kvm' model='z14-base' migratability='no'>
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 689135a41c..ffe3e06236 100644
--- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
@@ -206,9 +206,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.1.708.g4ede3d42df