[PATCH v1 0/5] qemu: Allow prealloc for virtio-mem-pci

See 5/5 for explanation, but long story short when prealloc is needed we can't set it on memory-backend-* but on virtio-mem-pci. Patches 1-3 are cleanup and independent of the feature. Michal Prívozník (5): qemuBuildMemoryDeviceProps: Fix const correctness qemu: Separate out hugepages handling from qemuBuildMemoryBackendProps() qemu: Move @prealloc into qemuBuildMemoryGetPagesize() qemu_capabilities: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_PREALLOC qemu: Allow prealloc for virtio-mem-pci src/qemu/qemu_capabilities.c | 8 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 220 +++++++------ src/qemu/qemu_command.h | 6 +- src/qemu/qemu_hotplug.c | 2 +- .../caps_5.1.0.x86_64.replies | 255 +++++++++++++-- .../caps_5.2.0.x86_64.replies | 260 ++++++++++++++-- .../caps_6.0.0.x86_64.replies | 282 +++++++++++++++-- .../caps_6.1.0.x86_64.replies | 282 +++++++++++++++-- .../caps_6.2.0.x86_64.replies | 282 +++++++++++++++-- .../caps_7.0.0.x86_64.replies | 293 ++++++++++++++++-- .../caps_7.0.0.x86_64.xml | 1 + ...mory-hotplug-virtio-mem.x86_64-latest.args | 2 +- 13 files changed, 1646 insertions(+), 248 deletions(-) -- 2.34.1

The @mem agrument of qemuBuildMemoryDeviceProps() function is only read from. Make this fact obvious from the function declaration too. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_command.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index bca867a492..fb87649e65 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4002,7 +4002,7 @@ qemuBuildMemoryDimmBackendStr(virCommand *cmd, virJSONValue * qemuBuildMemoryDeviceProps(const virDomainDef *def, - virDomainMemoryDef *mem) + const virDomainMemoryDef *mem) { g_autoptr(virJSONValue) props = NULL; const char *device = NULL; diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index dbdf3a4793..dd981e333f 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -154,7 +154,7 @@ int qemuBuildMemoryBackendProps(virJSONValue **backendProps, virJSONValue * qemuBuildMemoryDeviceProps(const virDomainDef *def, - virDomainMemoryDef *mem); + const virDomainMemoryDef *mem); /* Current, best practice */ virJSONValue * -- 2.34.1

The qemuBuildMemoryBackendProps() function is already long enough. Move code that decides what hugepages to use into a separate function. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 148 +++++++++++++++++++++++----------------- 1 file changed, 86 insertions(+), 62 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index fb87649e65..858aa0211a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3603,6 +3603,86 @@ qemuBuildMemoryGetDefaultPagesize(virQEMUDriverConfig *cfg, } +static int +qemuBuildMemoryGetPagesize(virQEMUDriverConfig *cfg, + const virDomainDef *def, + const virDomainMemoryDef *mem, + unsigned long long *pagesizeRet, + bool *needHugepageRet, + bool *useHugepageRet) +{ + const long system_page_size = virGetSystemPageSizeKB(); + unsigned long long pagesize = mem->pagesize; + bool needHugepage = !!pagesize; + bool useHugepage = !!pagesize; + + if (pagesize == 0) { + virDomainHugePage *master_hugepage = NULL; + virDomainHugePage *hugepage = NULL; + bool thisHugepage = false; + size_t i; + + /* Find the huge page size we want to use */ + for (i = 0; i < def->mem.nhugepages; i++) { + hugepage = &def->mem.hugepages[i]; + + if (!hugepage->nodemask) { + master_hugepage = hugepage; + continue; + } + + /* just find the master hugepage in case we don't use NUMA */ + if (mem->targetNode < 0) + continue; + + if (virBitmapGetBit(hugepage->nodemask, mem->targetNode, + &thisHugepage) < 0) { + /* Ignore this error. It's not an error after all. Well, + * the nodemask for this <page/> can contain lower NUMA + * nodes than we are querying in here. */ + continue; + } + + if (thisHugepage) { + /* Hooray, we've found the page size */ + needHugepage = true; + break; + } + } + + if (i == def->mem.nhugepages) { + /* We have not found specific huge page to be used with this + * NUMA node. Use the generic setting then (<page/> without any + * @nodemask) if possible. */ + hugepage = master_hugepage; + } + + if (hugepage) { + pagesize = hugepage->size; + useHugepage = true; + } + } + + if (pagesize == system_page_size) { + /* However, if user specified to use "huge" page + * of regular system page size, it's as if they + * hasn't specified any huge pages at all. */ + pagesize = 0; + needHugepage = false; + useHugepage = false; + } else if (useHugepage && pagesize == 0) { + if (qemuBuildMemoryGetDefaultPagesize(cfg, &pagesize) < 0) + return -1; + } + + *pagesizeRet = pagesize; + *needHugepageRet = needHugepage; + *useHugepageRet = useHugepage; + + return 0; +} + + /** * qemuBuildMemoryBackendProps: * @backendProps: [out] constructed object @@ -3640,18 +3720,16 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, { const char *backendType = "memory-backend-file"; virDomainNumatuneMemMode mode; - const long system_page_size = virGetSystemPageSizeKB(); virDomainMemoryAccess memAccess = mem->access; - size_t i; g_autofree char *memPath = NULL; bool prealloc = false; virBitmap *nodemask = NULL; int rc; g_autoptr(virJSONValue) props = NULL; bool nodeSpecified = virDomainNumatuneNodeSpecified(def->numa, mem->targetNode); - unsigned long long pagesize = mem->pagesize; - bool needHugepage = !!pagesize; - bool useHugepage = !!pagesize; + unsigned long long pagesize = 0; + bool needHugepage = false; + bool useHugepage = false; int discard = mem->discard; bool disableCanonicalPath = false; @@ -3696,63 +3774,9 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, virDomainNumatuneGetMode(def->numa, -1, &mode) < 0) mode = VIR_DOMAIN_NUMATUNE_MEM_STRICT; - if (pagesize == 0) { - virDomainHugePage *master_hugepage = NULL; - virDomainHugePage *hugepage = NULL; - bool thisHugepage = false; - - /* Find the huge page size we want to use */ - for (i = 0; i < def->mem.nhugepages; i++) { - hugepage = &def->mem.hugepages[i]; - - if (!hugepage->nodemask) { - master_hugepage = hugepage; - continue; - } - - /* just find the master hugepage in case we don't use NUMA */ - if (mem->targetNode < 0) - continue; - - if (virBitmapGetBit(hugepage->nodemask, mem->targetNode, - &thisHugepage) < 0) { - /* Ignore this error. It's not an error after all. Well, - * the nodemask for this <page/> can contain lower NUMA - * nodes than we are querying in here. */ - continue; - } - - if (thisHugepage) { - /* Hooray, we've found the page size */ - needHugepage = true; - break; - } - } - - if (i == def->mem.nhugepages) { - /* We have not found specific huge page to be used with this - * NUMA node. Use the generic setting then (<page/> without any - * @nodemask) if possible. */ - hugepage = master_hugepage; - } - - if (hugepage) { - pagesize = hugepage->size; - useHugepage = true; - } - } - - if (pagesize == system_page_size) { - /* However, if user specified to use "huge" page - * of regular system page size, it's as if they - * hasn't specified any huge pages at all. */ - pagesize = 0; - needHugepage = false; - useHugepage = false; - } else if (useHugepage && pagesize == 0) { - if (qemuBuildMemoryGetDefaultPagesize(cfg, &pagesize) < 0) - return -1; - } + if (qemuBuildMemoryGetPagesize(cfg, def, mem, &pagesize, + &needHugepage, &useHugepage) < 0) + return -1; props = virJSONValueNewObject(); -- 2.34.1

The qemuBuildMemoryGetPagesize() function has everything is needs to decide whether preallocation is needed or not. Move the logic from qemuBuildMemoryBackendProps() into qemuBuildMemoryGetPagesize(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 858aa0211a..9ab2b25fe2 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3609,12 +3609,14 @@ qemuBuildMemoryGetPagesize(virQEMUDriverConfig *cfg, const virDomainMemoryDef *mem, unsigned long long *pagesizeRet, bool *needHugepageRet, - bool *useHugepageRet) + bool *useHugepageRet, + bool *preallocRet) { const long system_page_size = virGetSystemPageSizeKB(); unsigned long long pagesize = mem->pagesize; bool needHugepage = !!pagesize; bool useHugepage = !!pagesize; + bool prealloc = false; if (pagesize == 0) { virDomainHugePage *master_hugepage = NULL; @@ -3675,9 +3677,23 @@ qemuBuildMemoryGetPagesize(virQEMUDriverConfig *cfg, return -1; } + if (def->mem.allocation == VIR_DOMAIN_MEMORY_ALLOCATION_IMMEDIATE) + prealloc = true; + + /* If the NVDIMM is a real device then there's nothing to prealloc. + * If anything, we would be only wearing off the device. + * Similarly, virtio-pmem-pci doesn't need prealloc either. */ + if (mem->nvdimmPath && !mem->nvdimmPmem && + mem->model != VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM) + prealloc = true; + + if (useHugepage) + prealloc = true; + *pagesizeRet = pagesize; *needHugepageRet = needHugepage; *useHugepageRet = useHugepage; + *preallocRet = prealloc; return 0; } @@ -3767,15 +3783,12 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, if (discard == VIR_TRISTATE_BOOL_ABSENT) discard = def->mem.discard; - if (def->mem.allocation == VIR_DOMAIN_MEMORY_ALLOCATION_IMMEDIATE) - prealloc = true; - if (virDomainNumatuneGetMode(def->numa, mem->targetNode, &mode) < 0 && virDomainNumatuneGetMode(def->numa, -1, &mode) < 0) mode = VIR_DOMAIN_NUMATUNE_MEM_STRICT; if (qemuBuildMemoryGetPagesize(cfg, def, mem, &pagesize, - &needHugepage, &useHugepage) < 0) + &needHugepage, &useHugepage, &prealloc) < 0) return -1; props = virJSONValueNewObject(); @@ -3784,13 +3797,10 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, def->mem.source == VIR_DOMAIN_MEMORY_SOURCE_MEMFD) { backendType = "memory-backend-memfd"; - if (useHugepage) { - if (virJSONValueObjectAdd(&props, "b:hugetlb", useHugepage, NULL) < 0 || - virJSONValueObjectAdd(&props, "U:hugetlbsize", pagesize << 10, NULL) < 0) { - return -1; - } - - prealloc = true; + if (useHugepage && + (virJSONValueObjectAdd(&props, "b:hugetlb", useHugepage, NULL) < 0 || + virJSONValueObjectAdd(&props, "U:hugetlbsize", pagesize << 10, NULL) < 0)) { + return -1; } if (qemuBuildMemoryBackendPropsShare(props, memAccess) < 0) @@ -3804,15 +3814,9 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, if (mem->nvdimmPath) { memPath = g_strdup(mem->nvdimmPath); - /* If the NVDIMM is a real device then there's nothing to prealloc. - * If anything, we would be only wearing off the device. - * Similarly, virtio-pmem-pci doesn't need prealloc either. */ - if (!mem->nvdimmPmem && mem->model != VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM) - prealloc = true; } else if (useHugepage) { if (qemuGetDomainHupageMemPath(priv->driver, def, pagesize, &memPath) < 0) return -1; - prealloc = true; } else { /* We can have both pagesize and mem source. If that's the case, * prefer hugepages as those are more specific. */ -- 2.34.1

On a Wednesday in 2022, Michal Privoznik wrote:
The qemuBuildMemoryGetPagesize() function has everything is needs to decide whether preallocation is needed or not. Move the logic from qemuBuildMemoryBackendProps() into qemuBuildMemoryGetPagesize().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 858aa0211a..9ab2b25fe2 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3675,9 +3677,23 @@ qemuBuildMemoryGetPagesize(virQEMUDriverConfig *cfg, return -1; }
+ if (def->mem.allocation == VIR_DOMAIN_MEMORY_ALLOCATION_IMMEDIATE) + prealloc = true; + + /* If the NVDIMM is a real device then there's nothing to prealloc. + * If anything, we would be only wearing off the device. + * Similarly, virtio-pmem-pci doesn't need prealloc either. */ + if (mem->nvdimmPath && !mem->nvdimmPmem && + mem->model != VIR_DOMAIN_MEMORY_MODEL_VIRTIO_PMEM) + prealloc = true; + + if (useHugepage) + prealloc = true; +
In the old location, the uses of if (useHugepage) were guarded by if (!mem->nvdimmPath). Please add the condition here as well. Jano
*pagesizeRet = pagesize; *needHugepageRet = needHugepage; *useHugepageRet = useHugepage; + *preallocRet = prealloc;
return 0; }

This new capability tracks whether virtio-mem device is capable of memory preallocation, which is detected by the device having .prealloc attribute. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_capabilities.c | 8 + src/qemu/qemu_capabilities.h | 1 + .../caps_5.1.0.x86_64.replies | 255 +++++++++++++-- .../caps_5.2.0.x86_64.replies | 260 ++++++++++++++-- .../caps_6.0.0.x86_64.replies | 282 +++++++++++++++-- .../caps_6.1.0.x86_64.replies | 282 +++++++++++++++-- .../caps_6.2.0.x86_64.replies | 282 +++++++++++++++-- .../caps_7.0.0.x86_64.replies | 293 ++++++++++++++++-- .../caps_7.0.0.x86_64.xml | 1 + 9 files changed, 1508 insertions(+), 156 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 66d5effba8..5cccc267a4 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -657,6 +657,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 420 */ "device.json+hotplug", /* QEMU_CAPS_DEVICE_JSON */ + "virtio-mem-pci.prealloc", /* QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_PREALLOC */ ); @@ -1538,6 +1539,10 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVhostUserFS[] = { "bootindex", QEMU_CAPS_VHOST_USER_FS_BOOTINDEX, NULL }, }; +static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioMemPCI[] = { + { "prealloc", QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_PREALLOC, NULL }, +}; + /* see documentation for virQEMUQAPISchemaPathGet for the query format */ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = { { "block-commit/arg-type/*top", QEMU_CAPS_ACTIVE_COMMIT }, @@ -1699,6 +1704,9 @@ static virQEMUCapsDeviceTypeProps virQEMUCapsDeviceProps[] = { { "vhost-user-fs-device", virQEMUCapsDevicePropsVhostUserFS, G_N_ELEMENTS(virQEMUCapsDevicePropsVhostUserFS), QEMU_CAPS_DEVICE_VHOST_USER_FS }, + { "virtio-mem-pci", virQEMUCapsDevicePropsVirtioMemPCI, + G_N_ELEMENTS(virQEMUCapsDevicePropsVirtioMemPCI), + QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI }, }; static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendFile[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 2c1b6a99c4..fcfecb1db1 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -636,6 +636,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 420 */ QEMU_CAPS_DEVICE_JSON, /* -device accepts JSON (and works with hot-unplug) */ + QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_PREALLOC, /* -device virtio-mem-pci.prealloc= */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.replies index b8f3c79026..cfb28e77bd 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.replies @@ -20625,12 +20625,215 @@ "id": "libvirt-37" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-mem-pci" + }, + "id": "libvirt-38" +} + +{ + "return": [ + { + "name": "romfile", + "type": "str" + }, + { + "default-value": -1, + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "failover_pair_id", + "type": "str" + }, + { + "default-value": true, + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 1, + "name": "rombar", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-extcap-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "ats", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-ignore-backend-features", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-pm-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-flr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-deverr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "disable-modern", + "type": "bool" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "type": "bool" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "memaddr", + "type": "uint64" + }, + { + "default-value": 0, + "name": "node", + "type": "uint32" + }, + { + "name": "virtio-backend", + "type": "child<virtio-mem>" + }, + { + "name": "memdev", + "type": "link<memory-backend>" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "name": "requested-size", + "type": "size" + }, + { + "name": "size", + "type": "size" + }, + { + "default-value": true, + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "use-started", + "type": "bool" + }, + { + "name": "block-size", + "type": "size" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + } + ], + "id": "libvirt-38" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -20700,7 +20903,7 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -20708,7 +20911,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -20777,7 +20980,7 @@ "type": "int" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -20785,7 +20988,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -22371,12 +22574,12 @@ "type": "bool" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-machines", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -22768,7 +22971,7 @@ "deprecated": false } ], - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -22776,7 +22979,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -22866,12 +23069,12 @@ "type": "string" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-cpu-definitions", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -24573,12 +24776,12 @@ "migration-safe": true } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-models", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -24586,12 +24789,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-types", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -24599,12 +24802,12 @@ "passthrough", "emulator" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-command-line-options", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -25899,12 +26102,12 @@ "option": "drive" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-migrate-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -25982,16 +26185,16 @@ "capability": "validate-uuid" } ], - "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 is not enabled in KVM" @@ -26006,7 +26209,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -26314,7 +26517,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -26328,7 +26531,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -26636,7 +26839,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.replies index 54d8db5904..22a1087e23 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.replies @@ -21220,12 +21220,220 @@ "id": "libvirt-37" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-mem-pci" + }, + "id": "libvirt-38" +} + +{ + "return": [ + { + "name": "romfile", + "type": "str" + }, + { + "default-value": -1, + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "name": "failover_pair_id", + "type": "str" + }, + { + "default-value": true, + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 1, + "name": "rombar", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-extcap-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "ats", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-ignore-backend-features", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-pm-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-flr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-deverr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "disable-modern", + "type": "bool" + }, + { + "default-value": 0, + "name": "memaddr", + "type": "uint64" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "name": "memdev", + "type": "link<memory-backend>" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "type": "bool" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "node", + "type": "uint32" + }, + { + "default-value": false, + "name": "x-disable-legacy-check", + "type": "bool" + }, + { + "default-value": true, + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "requested-size", + "type": "size" + }, + { + "name": "block-size", + "type": "size" + }, + { + "default-value": true, + "name": "use-started", + "type": "bool" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + }, + { + "name": "size", + "type": "size" + }, + { + "name": "virtio-backend", + "type": "child<virtio-mem>" + } + ], + "id": "libvirt-38" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -21295,7 +21503,7 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -21303,7 +21511,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -21372,7 +21580,7 @@ "type": "int" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -21380,7 +21588,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -22978,12 +23186,12 @@ "type": "bool" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-machines", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -23441,7 +23649,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -23449,7 +23657,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -23534,12 +23742,12 @@ "type": "string" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-cpu-definitions", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -25364,12 +25572,12 @@ "deprecated": false } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-models", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -25377,12 +25585,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-types", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -25390,12 +25598,12 @@ "passthrough", "emulator" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-command-line-options", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -26690,12 +26898,12 @@ "option": "drive" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-migrate-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -26773,16 +26981,16 @@ "capability": "validate-uuid" } ], - "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 is not enabled in KVM" @@ -26797,7 +27005,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -27106,7 +27314,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -27120,7 +27328,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -27429,7 +27637,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.replies index 986bb56630..4cde1b4eb5 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.replies @@ -22982,12 +22982,242 @@ "id": "libvirt-37" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-mem-pci" + }, + "id": "libvirt-38" +} + +{ + "return": [ + { + "name": "failover_pair_id", + "type": "str" + }, + { + "name": "romfile", + "type": "str" + }, + { + "default-value": -1, + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "default-value": 4294967295, + "name": "romsize", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 1, + "name": "rombar", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-extcap-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "acpi-index", + "type": "uint32" + }, + { + "default-value": false, + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "ats", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-ignore-backend-features", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-pm-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "aer", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-flr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-ats-page-aligned", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-deverr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "disable-modern", + "type": "bool" + }, + { + "default-value": 0, + "name": "memaddr", + "type": "uint64" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "name": "memdev", + "type": "link<memory-backend>" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "type": "bool" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "node", + "type": "uint32" + }, + { + "default-value": false, + "name": "x-disable-legacy-check", + "type": "bool" + }, + { + "default-value": true, + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "requested-size", + "type": "size" + }, + { + "name": "block-size", + "type": "size" + }, + { + "default-value": true, + "name": "use-started", + "type": "bool" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + }, + { + "name": "size", + "type": "size" + }, + { + "name": "virtio-backend", + "type": "child<virtio-mem>" + } + ], + "id": "libvirt-38" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -23061,7 +23291,7 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -23069,7 +23299,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -23138,7 +23368,7 @@ "type": "int" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -23146,7 +23376,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -24792,12 +25022,12 @@ "type": "bool" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-machines", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -25244,7 +25474,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -25252,7 +25482,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -25350,12 +25580,12 @@ "type": "child<container>" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-cpu-definitions", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -27223,12 +27453,12 @@ "deprecated": false } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-models", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -27236,12 +27466,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-types", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -27249,12 +27479,12 @@ "passthrough", "emulator" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-command-line-options", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -28573,12 +28803,12 @@ "option": "drive" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-migrate-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -28660,12 +28890,12 @@ "capability": "background-snapshot" } ], - "id": "libvirt-47" + "id": "libvirt-48" } { "execute": "query-sev-capabilities", - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -28675,7 +28905,7 @@ "cert-chain": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA", "pdh": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA" }, - "id": "libvirt-48" + "id": "libvirt-49" } { @@ -28686,7 +28916,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -29007,7 +29237,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -29021,7 +29251,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -29342,7 +29572,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies index 92feb723e6..1fb3b3de8c 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.replies @@ -23224,12 +23224,242 @@ "id": "libvirt-37" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-mem-pci" + }, + "id": "libvirt-38" +} + +{ + "return": [ + { + "name": "failover_pair_id", + "type": "str" + }, + { + "name": "romfile", + "type": "str" + }, + { + "default-value": -1, + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "default-value": 4294967295, + "name": "romsize", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 1, + "name": "rombar", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-extcap-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "acpi-index", + "type": "uint32" + }, + { + "default-value": false, + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "ats", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-ignore-backend-features", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-pm-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "aer", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-flr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-ats-page-aligned", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-deverr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "disable-modern", + "type": "bool" + }, + { + "default-value": 0, + "name": "memaddr", + "type": "uint64" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "name": "memdev", + "type": "link<memory-backend>" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "type": "bool" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "node", + "type": "uint32" + }, + { + "default-value": false, + "name": "x-disable-legacy-check", + "type": "bool" + }, + { + "default-value": true, + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "requested-size", + "type": "size" + }, + { + "name": "block-size", + "type": "size" + }, + { + "default-value": true, + "name": "use-started", + "type": "bool" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + }, + { + "name": "size", + "type": "size" + }, + { + "name": "virtio-backend", + "type": "child<virtio-mem>" + } + ], + "id": "libvirt-38" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -23308,7 +23538,7 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -23316,7 +23546,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -23390,7 +23620,7 @@ "type": "int" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -23398,7 +23628,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -25056,12 +25286,12 @@ "type": "bool" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-machines", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -25526,7 +25756,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -25534,7 +25764,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -25637,12 +25867,12 @@ "type": "child<container>" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-cpu-definitions", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -27699,12 +27929,12 @@ "deprecated": false } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-models", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -27712,12 +27942,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-types", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -27725,12 +27955,12 @@ "passthrough", "emulator" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-command-line-options", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -29062,12 +29292,12 @@ "option": "drive" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-migrate-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -29149,16 +29379,16 @@ "capability": "background-snapshot" } ], - "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": "Failed to open /dev/sev: No such file or directory" @@ -29173,7 +29403,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -29496,7 +29726,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -29510,7 +29740,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -29833,7 +30063,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies index 29b8e4e8d2..8a574c893b 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.replies @@ -26405,12 +26405,242 @@ "id": "libvirt-37" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-mem-pci" + }, + "id": "libvirt-38" +} + +{ + "return": [ + { + "name": "failover_pair_id", + "type": "str" + }, + { + "name": "romfile", + "type": "str" + }, + { + "default-value": -1, + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "default-value": 4294967295, + "name": "romsize", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 1, + "name": "rombar", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-extcap-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "acpi-index", + "type": "uint32" + }, + { + "default-value": false, + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "ats", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-ignore-backend-features", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-pm-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "aer", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-flr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-ats-page-aligned", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-deverr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "disable-modern", + "type": "bool" + }, + { + "default-value": 0, + "name": "memaddr", + "type": "uint64" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "name": "memdev", + "type": "link<memory-backend>" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "type": "bool" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "node", + "type": "uint32" + }, + { + "default-value": false, + "name": "x-disable-legacy-check", + "type": "bool" + }, + { + "default-value": true, + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "name": "requested-size", + "type": "size" + }, + { + "name": "block-size", + "type": "size" + }, + { + "default-value": true, + "name": "use-started", + "type": "bool" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + }, + { + "name": "size", + "type": "size" + }, + { + "name": "virtio-backend", + "type": "child<virtio-mem>" + } + ], + "id": "libvirt-38" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -26489,7 +26719,7 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -26497,7 +26727,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -26571,7 +26801,7 @@ "type": "int" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -26579,7 +26809,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -28319,12 +28549,12 @@ "type": "bool" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-machines", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -28807,7 +29037,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -28815,7 +29045,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -28918,12 +29148,12 @@ "type": "child<container>" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-cpu-definitions", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -30992,12 +31222,12 @@ "deprecated": false } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-models", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -31005,12 +31235,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-types", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -31018,12 +31248,12 @@ "passthrough", "emulator" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-command-line-options", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -32355,12 +32585,12 @@ "option": "drive" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-migrate-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -32442,16 +32672,16 @@ "capability": "background-snapshot" } ], - "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: Failed to open /dev/sev: No such file or directory" @@ -32466,7 +32696,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -32799,7 +33029,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -32813,7 +33043,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -33146,7 +33376,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.replies index 90735073e5..3d92303f79 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.replies @@ -26526,12 +26526,253 @@ "id": "libvirt-37" } +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-mem-pci" + }, + "id": "libvirt-38" +} + +{ + "return": [ + { + "name": "failover_pair_id", + "type": "str" + }, + { + "name": "romfile", + "type": "str" + }, + { + "default-value": -1, + "name": "addr", + "description": "Slot and optional function number, example: 06.0 or 06", + "type": "int32" + }, + { + "default-value": 4294967295, + "name": "romsize", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-lnksta-dllla", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 1, + "name": "rombar", + "type": "uint32" + }, + { + "default-value": true, + "name": "x-pcie-extcap-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "acpi-index", + "type": "uint32" + }, + { + "default-value": false, + "name": "multifunction", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "migrate-extra", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "ats", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-ignore-backend-features", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-pm-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "aer", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-flr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-lnkctl-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-ats-page-aligned", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "page-per-vq", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-pcie-deverr-init", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "virtio-pci-bus-master-bug-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "modern-pio-notify", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-pcie", + "description": "on/off", + "type": "bool" + }, + { + "default-value": "auto", + "name": "disable-legacy", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "default-value": false, + "name": "disable-modern", + "type": "bool" + }, + { + "default-value": 0, + "name": "memaddr", + "type": "uint64" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "name": "memdev", + "type": "link<memory-backend>" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "type": "bool" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "node", + "type": "uint32" + }, + { + "default-value": false, + "name": "x-disable-legacy-check", + "type": "bool" + }, + { + "default-value": true, + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "name": "requested-size", + "type": "size" + }, + { + "default-value": true, + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + }, + { + "name": "block-size", + "type": "size" + }, + { + "default-value": false, + "name": "prealloc", + "type": "bool" + }, + { + "default-value": true, + "name": "use-started", + "type": "bool" + }, + { + "default-value": "auto", + "name": "unplugged-inaccessible", + "description": "on/off/auto", + "type": "OnOffAuto" + }, + { + "name": "size", + "type": "size" + }, + { + "name": "virtio-backend", + "type": "child<virtio-mem>" + } + ], + "id": "libvirt-38" +} + { "execute": "qom-list-properties", "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -26610,7 +26851,7 @@ "type": "bool" } ], - "id": "libvirt-38" + "id": "libvirt-39" } { @@ -26618,7 +26859,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -26692,7 +26933,7 @@ "type": "int" } ], - "id": "libvirt-39" + "id": "libvirt-40" } { @@ -26700,7 +26941,7 @@ "arguments": { "typename": "max-x86_64-cpu" }, - "id": "libvirt-40" + "id": "libvirt-41" } { @@ -28440,12 +28681,12 @@ "type": "bool" } ], - "id": "libvirt-40" + "id": "libvirt-41" } { "execute": "query-machines", - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -28946,7 +29187,7 @@ "default-ram-id": "pc.ram" } ], - "id": "libvirt-41" + "id": "libvirt-42" } { @@ -28954,7 +29195,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-42" + "id": "libvirt-43" } { @@ -29057,12 +29298,12 @@ "type": "child<container>" } ], - "id": "libvirt-42" + "id": "libvirt-43" } { "execute": "query-cpu-definitions", - "id": "libvirt-43" + "id": "libvirt-44" } { @@ -31131,12 +31372,12 @@ "deprecated": false } ], - "id": "libvirt-43" + "id": "libvirt-44" } { "execute": "query-tpm-models", - "id": "libvirt-44" + "id": "libvirt-45" } { @@ -31144,12 +31385,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-44" + "id": "libvirt-45" } { "execute": "query-tpm-types", - "id": "libvirt-45" + "id": "libvirt-46" } { @@ -31157,12 +31398,12 @@ "passthrough", "emulator" ], - "id": "libvirt-45" + "id": "libvirt-46" } { "execute": "query-command-line-options", - "id": "libvirt-46" + "id": "libvirt-47" } { @@ -32498,12 +32739,12 @@ "option": "drive" } ], - "id": "libvirt-46" + "id": "libvirt-47" } { "execute": "query-migrate-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } { @@ -32585,16 +32826,16 @@ "capability": "background-snapshot" } ], - "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: Failed to open /dev/sev: No such file or directory" @@ -32609,7 +32850,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -32942,7 +33183,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } { @@ -32956,7 +33197,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { @@ -33289,7 +33530,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } { diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml index 6b80e7817e..b3c885dc9c 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -242,6 +242,7 @@ <flag name='sev-guest-kernel-hashes'/> <flag name='sev-inject-launch-secret'/> <flag name='device.json+hotplug'/> + <flag name='virtio-mem-pci.prealloc'/> <version>6002050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> -- 2.34.1

There are a some scenarios in which we want to prealloc guest memory (e.g. when requested in domain XML, when using hugepages, etc.). With 'regular' <memory/> models (like 'dimm', 'nvdimm' or 'virtio-pmem') or regular guest memory it is corresponding memory-backend-* object that ends up with .prealloc attribute set. And that's desired because neither of those devices can change its size on the fly. However, with virtio-mem model things are a bit different. While one can set .prealloc attribute on corresponding memory-backend-* object it doesn't make much sense, because virtio-mem can inflate/deflate on the fly, i.e. change how big of a portion of the memory-backend-* object is exposed to the guest. For instance, from a say 4GiB module only a half can be exposed to the guest. Therefore, it doesn't make much sense to preallocate whole 4GiB and keep them allocated. But we still want the part exposed to the guest preallocated (when conditions described at the beginning are met). Having said that, with new enough QEMU the virtio-mem-pci device gained new attribute ".prealloc" which instructs the device to talk to the memory backend object and allocate only the requested portion of memory. Now, that our algorithm for setting .prealloc was isolated in a single function, the function can be called when constructing cmd line for virtio-mem-pci device. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 42 +++++++++++++------ src/qemu/qemu_command.h | 4 +- src/qemu/qemu_hotplug.c | 2 +- ...mory-hotplug-virtio-mem.x86_64-latest.args | 2 +- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9ab2b25fe2..c145f6242f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3690,10 +3690,14 @@ qemuBuildMemoryGetPagesize(virQEMUDriverConfig *cfg, if (useHugepage) prealloc = true; - *pagesizeRet = pagesize; - *needHugepageRet = needHugepage; - *useHugepageRet = useHugepage; - *preallocRet = prealloc; + if (pagesizeRet) + *pagesizeRet = pagesize; + if (needHugepageRet) + *needHugepageRet = needHugepage; + if (useHugepageRet) + *useHugepageRet = useHugepage; + if (preallocRet) + *preallocRet = prealloc; return 0; } @@ -3869,14 +3873,18 @@ qemuBuildMemoryBackendProps(virJSONValue **backendProps, return -1; if (mem->model == VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM) { - /* Explicitly disable prealloc for virtio-mem as it's not supported - * currently. Warn users if their config would result in prealloc. */ - if (priv->memPrealloc || prealloc) { - VIR_WARN("Memory preallocation is unsupported for virtio-mem memory devices"); + if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_PREALLOC)) { + /* Explicitly disable prealloc for virtio-mem if it isn't supported. + * Warn users if their config would result in prealloc. */ + if (priv->memPrealloc || prealloc) { + VIR_WARN("Memory preallocation is unsupported for virtio-mem memory devices"); + } + + if (priv->memPrealloc && + virJSONValueObjectAppendBoolean(props, "prealloc", 0) < 0) + return -1; } - if (priv->memPrealloc && - virJSONValueObjectAppendBoolean(props, "prealloc", 0) < 0) - return -1; + if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MEMORY_BACKEND_RESERVE) && virJSONValueObjectAppendBoolean(props, "reserve", 0) < 0) return -1; @@ -4029,7 +4037,9 @@ qemuBuildMemoryDimmBackendStr(virCommand *cmd, virJSONValue * -qemuBuildMemoryDeviceProps(const virDomainDef *def, +qemuBuildMemoryDeviceProps(virQEMUDriverConfig *cfg, + qemuDomainObjPrivate *priv, + const virDomainDef *def, const virDomainMemoryDef *mem) { g_autoptr(virJSONValue) props = NULL; @@ -4037,6 +4047,7 @@ qemuBuildMemoryDeviceProps(const virDomainDef *def, g_autofree char *uuidstr = NULL; virTristateBool unarmed = VIR_TRISTATE_BOOL_ABSENT; g_autofree char *memdev = NULL; + bool prealloc = false; if (!mem->info.alias) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", @@ -4060,6 +4071,10 @@ qemuBuildMemoryDeviceProps(const virDomainDef *def, case VIR_DOMAIN_MEMORY_MODEL_VIRTIO_MEM: device = "virtio-mem-pci"; + + if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_PREALLOC) && + qemuBuildMemoryGetPagesize(cfg, def, mem, NULL, NULL, NULL, &prealloc) < 0) + return NULL; break; case VIR_DOMAIN_MEMORY_MODEL_NONE: @@ -4087,6 +4102,7 @@ qemuBuildMemoryDeviceProps(const virDomainDef *def, "S:uuid", uuidstr, "T:unarmed", unarmed, "s:memdev", memdev, + "B:prealloc", prealloc, "s:id", mem->info.alias, NULL) < 0) return NULL; @@ -7798,7 +7814,7 @@ qemuBuildMemoryDeviceCommandLine(virCommand *cmd, if (qemuBuildMemoryDimmBackendStr(cmd, def->mems[i], def, cfg, priv) < 0) return -1; - if (!(props = qemuBuildMemoryDeviceProps(def, def->mems[i]))) + if (!(props = qemuBuildMemoryDeviceProps(cfg, priv, def, def->mems[i]))) return -1; if (qemuBuildDeviceCommandlineFromJSON(cmd, props, priv->qemuCaps) < 0) diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index dd981e333f..ba175aff9c 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -153,7 +153,9 @@ int qemuBuildMemoryBackendProps(virJSONValue **backendProps, bool systemMemory); virJSONValue * -qemuBuildMemoryDeviceProps(const virDomainDef *def, +qemuBuildMemoryDeviceProps(virQEMUDriverConfig *cfg, + qemuDomainObjPrivate *priv, + const virDomainDef *def, const virDomainMemoryDef *mem); /* Current, best practice */ diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index f3ec24635d..efc6db8455 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2399,7 +2399,7 @@ qemuDomainAttachMemory(virQEMUDriver *driver, objalias = g_strdup_printf("mem%s", mem->info.alias); - if (!(devprops = qemuBuildMemoryDeviceProps(vm->def, mem))) + if (!(devprops = qemuBuildMemoryDeviceProps(cfg, priv, vm->def, mem))) goto cleanup; if (qemuBuildMemoryBackendProps(&props, objalias, cfg, diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args index 1d83ec88a8..77dbc0c89c 100644 --- a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args +++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args @@ -21,7 +21,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -object '{"qom-type":"memory-backend-ram","id":"memvirtiomem0","reserve":false,"size":1073741824}' \ -device '{"driver":"virtio-mem-pci","node":0,"block-size":2097152,"requested-size":536870912,"memdev":"memvirtiomem0","id":"virtiomem0","bus":"pci.0","addr":"0x2"}' \ -object '{"qom-type":"memory-backend-file","id":"memvirtiomem1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","reserve":false,"size":2147483648,"host-nodes":[1,2,3],"policy":"bind"}' \ --device '{"driver":"virtio-mem-pci","node":0,"block-size":2097152,"requested-size":1073741824,"memdev":"memvirtiomem1","id":"virtiomem1","bus":"pci.0","addr":"0x3"}' \ +-device '{"driver":"virtio-mem-pci","node":0,"block-size":2097152,"requested-size":1073741824,"memdev":"memvirtiomem1","prealloc":true,"id":"virtiomem1","bus":"pci.0","addr":"0x3"}' \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ -display none \ -no-user-config \ -- 2.34.1

On a Wednesday in 2022, Michal Privoznik wrote:
See 5/5 for explanation, but long story short when prealloc is needed we can't set it on memory-backend-* but on virtio-mem-pci.
Patches 1-3 are cleanup and independent of the feature.
Michal Prívozník (5): qemuBuildMemoryDeviceProps: Fix const correctness qemu: Separate out hugepages handling from qemuBuildMemoryBackendProps() qemu: Move @prealloc into qemuBuildMemoryGetPagesize() qemu_capabilities: Introduce QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_PREALLOC qemu: Allow prealloc for virtio-mem-pci
src/qemu/qemu_capabilities.c | 8 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 220 +++++++------ src/qemu/qemu_command.h | 6 +- src/qemu/qemu_hotplug.c | 2 +- .../caps_5.1.0.x86_64.replies | 255 +++++++++++++-- .../caps_5.2.0.x86_64.replies | 260 ++++++++++++++-- .../caps_6.0.0.x86_64.replies | 282 +++++++++++++++-- .../caps_6.1.0.x86_64.replies | 282 +++++++++++++++-- .../caps_6.2.0.x86_64.replies | 282 +++++++++++++++-- .../caps_7.0.0.x86_64.replies | 293 ++++++++++++++++-- .../caps_7.0.0.x86_64.xml | 1 + ...mory-hotplug-virtio-mem.x86_64-latest.args | 2 +- 13 files changed, 1646 insertions(+), 248 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
participants (2)
-
Ján Tomko
-
Michal Privoznik