Virtuozzo QEMU development (svt-core@virtuozzo.com)
 help / color / mirror / Atom feed
From: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
To: svt-core@virtuozzo.com
Cc: andrey.drobyshev@virtuozzo.com, efim.shevrin@virtuozzo.com,
	den@openvz.org
Subject: [RFC HCI-8.1 PATCH 2/5] qemu: capabilities: probe aux-ram-share machine property #VSTOR-103860
Date: Fri,  9 Oct 2026 17:04:32 +0300	[thread overview]
Message-ID: <20261009140435.483100-3-andrey.drobyshev@virtuozzo.com> (raw)
In-Reply-To: <20261009140435.483100-1-andrey.drobyshev@virtuozzo.com>

QEMU 10.0 added the 'aux-ram-share' machine property: with it set,
auxiliary RAM blocks that don't come from a memory-backend object
(VGA VRAM, firmware and option ROMs, ACPI tables) are allocated as
shared memfd instead of anonymous private memory.

It is a property of the base machine class, so probe it on the 'none'
machine together with the other generic machine properties.  Used by
the next commits to share auxiliary RAM of VMs that pin guest memory
for device DMA.

Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
---
 src/qemu/qemu_capabilities.c                               | 2 ++
 src/qemu/qemu_capabilities.h                               | 1 +
 tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml         | 1 +
 tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml           | 1 +
 tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml           | 1 +
 tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml   | 1 +
 tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml          | 1 +
 tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml | 1 +
 8 files changed, 9 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 4071f93c865..6546a0bdf42 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -749,6 +749,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
               "max-workers", /* QEMU_CAPS_BLOCKSTREAM_MAX_WORKERS */
               "cpr-exec-command", /* QEMU_CAPS_MIGRATION_PARAM_CPR_EXEC_COMMAND */
               "win-dmp.guest-aware", /* QEMU_CAPS_WIN_DMP_GUEST_AWARE */
+              "machine.aux-ram-share", /* QEMU_CAPS_MACHINE_AUX_RAM_SHARE */
     );
 
 
@@ -1808,6 +1809,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsVirt[] = {
 static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsGeneric[] = {
     { "confidential-guest-support", QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT },
     { "shim", QEMU_CAPS_MACHINE_SHIM },
+    { "aux-ram-share", QEMU_CAPS_MACHINE_AUX_RAM_SHARE },
 };
 
 static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsGenericPC[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index e5f22323551..18e89cf8458 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -730,6 +730,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
     QEMU_CAPS_BLOCKSTREAM_MAX_WORKERS, /* 'max-workers' block-stream opt is supported */
     QEMU_CAPS_MIGRATION_PARAM_CPR_EXEC_COMMAND, /* 'cpr-exec-command' migrate-set-parameters member is supported */
     QEMU_CAPS_WIN_DMP_GUEST_AWARE, /* 'win-dmp' is offered only to a guest that can use it */
+    QEMU_CAPS_MACHINE_AUX_RAM_SHARE, /* -machine aux-ram-share */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml b/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml
index 94e73db2fb3..cd43e84d43b 100644
--- a/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_10.0.0_aarch64.xml
@@ -165,6 +165,7 @@
   <flag name='nvme-ns'/>
   <flag name='usb-bot'/>
   <flag name='drive-mirror-copy-mode'/>
+  <flag name='machine.aux-ram-share'/>
   <version>10000000</version>
   <microcodeVersion>61700285</microcodeVersion>
   <package>v10.0.0</package>
diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml b/tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml
index ffdd9a71ca8..da71b876293 100644
--- a/tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_10.0.0_ppc64.xml
@@ -173,6 +173,7 @@
   <flag name='nvme-ns'/>
   <flag name='usb-bot'/>
   <flag name='drive-mirror-copy-mode'/>
+  <flag name='machine.aux-ram-share'/>
   <version>10000000</version>
   <microcodeVersion>42900285</microcodeVersion>
   <package>v10.0.0</package>
diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml b/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml
index e4a6e82d74f..12f9886250a 100644
--- a/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml
+++ b/tests/qemucapabilitiesdata/caps_10.0.0_s390x.xml
@@ -139,6 +139,7 @@
   <flag name='nvme-ns'/>
   <flag name='usb-bot'/>
   <flag name='drive-mirror-copy-mode'/>
+  <flag name='machine.aux-ram-share'/>
   <version>10000000</version>
   <microcodeVersion>39100285</microcodeVersion>
   <package>v10.0.0</package>
diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml
index 6ac39b20915..471c8d70aa5 100644
--- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml
+++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml
@@ -211,6 +211,7 @@
   <flag name='amd-iommu'/>
   <flag name='usb-bot'/>
   <flag name='drive-mirror-copy-mode'/>
+  <flag name='machine.aux-ram-share'/>
   <version>10000000</version>
   <microcodeVersion>43100285</microcodeVersion>
   <package>v10.0.0</package>
diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml
index d45f6492596..406358efb15 100644
--- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml
@@ -212,6 +212,7 @@
   <flag name='usb-bot'/>
   <flag name='drive-mirror-copy-mode'/>
   <flag name='max-workers'/>
+  <flag name='machine.aux-ram-share'/>
   <version>10000000</version>
   <microcodeVersion>43100285</microcodeVersion>
   <package>v10.0.0</package>
diff --git a/tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml b/tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml
index bd1c7cec7fd..368d5566bc7 100644
--- a/tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml
+++ b/tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml
@@ -193,6 +193,7 @@
   <flag name='usb-bot'/>
   <flag name='tdx-guest'/>
   <flag name='drive-mirror-copy-mode'/>
+  <flag name='machine.aux-ram-share'/>
   <version>10000050</version>
   <microcodeVersion>43100286</microcodeVersion>
   <package>v10.0.0-1724-gf9a3def17b</package>
-- 
2.47.1


  parent reply	other threads:[~2026-10-09 14:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 14:04 [RFC HCI-8.1 PATCH 0/5] qemu: allow qemu-update with VFIO hostdevs on shared memfd RAM #VSTOR-103860 Andrey Drobyshev
2026-10-09 14:04 ` [RFC HCI-8.1 PATCH 1/5] qemu update: allow qemu-update for VMs with PCI and USB hostdevs #VSTOR-103860 #VSTOR-137800 Andrey Drobyshev
2026-10-09 14:04 ` Andrey Drobyshev [this message]
2026-10-09 14:04 ` [RFC HCI-8.1 PATCH 3/5] qemu: back guest RAM with shared memfd for VMs with DMA-pinning devices #VSTOR-103860 Andrey Drobyshev
2026-10-09 14:04 ` [RFC HCI-8.1 PATCH 4/5] qemu: share auxiliary RAM of " Andrey Drobyshev
2026-10-09 14:04 ` [RFC HCI-8.1 PATCH 5/5] qemu update: refuse PCI hostdevs on non-shared guest RAM #VSTOR-103860 Andrey Drobyshev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261009140435.483100-3-andrey.drobyshev@virtuozzo.com \
    --to=andrey.drobyshev@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=efim.shevrin@virtuozzo.com \
    --cc=svt-core@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox