On Wed, Oct 29, 2025 at 09:48:58 -0500, Praveen K Paladugu wrote:
From: Praveen K Paladugu <prapal@linux.microsoft.com>
qemu recently introduced `query-accelerators` command to generically query the list of supported accelerators. Below is an example QMP invocation in qemu:
{ "execute": "query-accelerators"} {"return": {"enabled": "kvm", "present": ["kvm", "mshv", "qtest", "tcg", "xen"]}}
"enabled" here indicates "kvm" is enabled and present.
If query-accelerators command is available, use it. If not, fallback to existing mechanisms for quyerying kvm and hvf capabilities.
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com> --- src/qemu/qemu_capabilities.c | 40 +- src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_monitor.c | 12 + src/qemu/qemu_monitor.h | 5 + src/qemu/qemu_monitor_json.c | 35 + src/qemu/qemu_monitor_json.h | 6 + .../qemu_10.1.50-q35.x86_64.xml | 1795 + .../qemu_10.1.50-tcg.x86_64.xml | 1827 + tests/domaincapsdata/qemu_10.1.50.x86_64.xml | 1795 + .../caps_10.1.50_x86_64.replies | 46770 ++++++++++++++++ .../caps_10.1.50_x86_64.xml | 4950 ++ 11 files changed, 57231 insertions(+), 5 deletions(-) create mode 100644 tests/domaincapsdata/qemu_10.1.50-q35.x86_64.xml create mode 100644 tests/domaincapsdata/qemu_10.1.50-tcg.x86_64.xml create mode 100644 tests/domaincapsdata/qemu_10.1.50.x86_64.xml create mode 100644 tests/qemucapabilitiesdata/caps_10.1.50_x86_64.replies create mode 100644 tests/qemucapabilitiesdata/caps_10.1.50_x86_64.xml
We always call these files according to the upcoming QEMU release (i.e, 10.2.0 in this case) and just make sure to update them once it is officially release. And we already have the files for the upcoming QEMU 10.2.0 so just remove all these new files. In case the files were generated with QEMU snapshot that is too old to support the feature you are adding support for, you just regenerate the files with newer QEMU. But since our capabilities data generation guru (Peter) is out this week, I suggest waiting for him to come back. Also we're in freeze now and your patch will have to wait anyway. Jirka