On Wed, Jun 24, 2026 at 09:17:05 +0000, sandesh.patel--- via Devel wrote:
From: Sandesh Patel <sandesh.patel@nutanix.com>
Unlike x86 boolean CPU features, ARM CPU features are exposed by QEMU as multi-bit properties whose accepted values depend on the host; only a subset of the possible values are valid on any given host.
A pending QEMU patch series [1] introduces a new QMP command, 'query-arm-cpu-props-info', which returns, for each ARM CPU property, its type and the set of values supported on the host.
Add support to query feature supported values
[1] https://lore.kernel.org/qemu-arm/20260605083358.1320563-1-khushit.shah@nutan...
Signed-off-by: Sandesh Patel <sandesh.patel@nutanix.com> ---
Couple points about capability changes:
src/qemu/qemu_capabilities.c | 13 +++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_monitor.c | 51 +++++++++++ src/qemu/qemu_monitor.h | 26 ++++++ src/qemu/qemu_monitor_json.c | 66 ++++++++++++++ src/qemu/qemu_monitor_json.h | 5 + .../caps_11.1.0_aarch64.replies | 69 ++++++++++++++ .../caps_11.1.0_aarch64.xml | 1 + tests/qemumonitorjsontest.c | 91 +++++++++++++++++++ 9 files changed, 323 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index a28f87ad2b..cb933aa630 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -767,6 +767,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 495 */ "blockdev-mirror.target-is-zero", /* QEMU_CAPS_BLOCKDEV_MIRROR_TARGET_IS_ZERO */ + "query-arm-cpu-props-info", /* QEMU_CAPS_QUERY_ARM_CPU_PROPS_INFO */
Generally new capability goes in a separate patch to show what it influences.
);
@@ -812,6 +813,7 @@ struct _virQEMUCapsAccel { virQEMUCapsMachineType *machineTypes; virQEMUCapsHostCPUData hostCPU; qemuMonitorCPUDefs *cpuModels; + qemuMonitorCPUPropsInfoList *cpuProps; /* currently only populated on ARM + KVM */ };
[...]
diff --git a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.replies b/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.replies index 41cd5496c6..40fd157680 100644 --- a/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_11.1.0_aarch64.replies @@ -24932,6 +24932,40 @@ "in-use", "auto" ] + }, + { + "name": "query-arm-cpu-props-info", + "ret-type": "[999]", + "meta-type": "command", + "arg-type": "0" + }, + { + "name": "[999]", + "element-type": "999", + "meta-type": "array" + }, + { + "name": "999", + "members": [ + { + "name": "name", + "type": "str" + }, + { + "name": "type", + "type": "str" + }, + { + "name": "supported-values", + "type": "[str]" + }, + { + "name": "composite", + "default": null, + "type": "str" + } + ], + "meta-type": "object" } ], "id": "libvirt-4" @@ -37945,6 +37979,41 @@ } }
+{ + "execute": "query-arm-cpu-props-info", + "id": "libvirt-46" +} + +{ + "return": [ + { + "name": "hw_prop_WRPs", + "supported-values": [ + "0-3" + ], + "type": "number" + }, + { + "name": "hw_prop_API", + "composite": "pauth", + "supported-values": [ + "off" + ], + "type": "string" + }, + { + "name": "feat_RAS", + "supported-values": [ + "0.0", + "1.0", + "1.1_base" + ], + "type": "string" + } + ], + "id": "libvirt-46" +} + { "execute": "qmp_capabilities", "id": "libvirt-1"
Changes to this file *must* be generated from a real qemu using the dumping tool. Manual change like this are not acceptable. Also changes to the capability dumps *must* be a separate patch. The change will also only be accepted once the qemu code hits the upstream repo. I'm taking care of re-generating this one so once the corresponding code is upstream feel free to ping me to do a refresh. In case the CPU I'm generating this on (a raspberry pi 5) doesn't support what you need you can add another variant of the caps (see the README in tests/qemucapabilitiesdata). In case you generate that on a non-released qemu version you'll be also responsible to updating it once qemu-11.1 is released. Further updates will happen only when you then contribute another version of said variant once next qemu version is released.