On a Tuesday in 2020, Michal Privoznik wrote:
This capability corresponds to '-machine memory-backend=' command line argument. Unfortunately, it is not possible for us to detect the capability via QMP and therefore we have to have a version check.
The QEMU capability was introduced in v5.1.0-3-gc556600598.
Please rephrase this or drop the period at the end, e.g.: QEMU commit v5.1.0-3-gc556600598 introduced the capability. (to make it easier to select)
Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/qemu/qemu_capabilities.c | 7 +++++++ src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 + 3 files changed, 11 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index dcfd7cdd4e..d0a7c7b30e 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -597,6 +597,9 @@ VIR_ENUM_IMPL(virQEMUCaps, "spapr-tpm-proxy", "numa.hmat", "blockdev-hostdev-scsi", + + /* 380 */ + "machine.memory-backend", ); @@ -5104,6 +5107,10 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCapsPtr qemuCaps) /* TCG couldn't be disabled nor queried until QEMU 2.10 */ if (qemuCaps->version < 2010000) virQEMUCapsSet(qemuCaps, QEMU_CAPS_TCG); + + /* no way to query for -machine memory-backend */ + if (qemuCaps->version >= 5001050)
That's a git version. Also, the above mentioned commit introduces the 'default-ram-id' property, which does show up in our capability replies file. Can't we safely assume that its presence also means that -machine memory-backend is supported? Jano
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_MEMORY_BACKEND); } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 5d08941538..9b2842e84b 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -578,6 +578,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ QEMU_CAPS_NUMA_HMAT, /* -numa hmat */ QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI, /* -blockdev used for (i)SCSI hostdevs */ + /* 380 */ + QEMU_CAPS_MACHINE_MEMORY_BACKEND, /* -machine memory-backend */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml index 151bd18137..11eb15ca6a 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -242,6 +242,7 @@ <flag name='intel-iommu.aw-bits'/> <flag name='numa.hmat'/> <flag name='blockdev-hostdev-scsi'/> + <flag name='machine.memory-backend'/> <version>5001050</version> <kvmVersion>0</kvmVersion> <microcodeVersion>43100243</microcodeVersion> -- 2.26.2
Attachment:
signature.asc
Description: PGP signature