[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH REBASE 5/7] qemu: Introduce QEMU_CAPS_MACHINE_MEMORY_BACKEND



On 9/8/20 1:21 PM, Ján Tomko wrote:
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 redhat com>
---
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?

Good point. We can do that. However, I will need to do a slight change to 6/7 to qemuTestCapsCacheInsert() because there I'm filling default-ram-id for all qemuCaps, even old versions that don't have it in real world. So basically, I will need to move this version check into qemuTestCapsCacheInsert() but I guess that's okay if I put a comment next to it.

Michal


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]