On Mon, Nov 03, 2025 at 12:17:48 -0600, Praveen K Paladugu wrote:
On 10/30/2025 2:31 AM, Peter Krempa wrote:
On Wed, Oct 29, 2025 at 16:26:42 +0100, Jiri Denemark via Devel wrote:
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.
Agreed. Unfortunately I didn't explicitly state this fact in the README for the caps dumps. I'll try to mention it to minimize confusion.
I've posted an patch updating the readme explicitly stating that we want only dumps for official release version with the possibility to capture stuff from upcoming next release along with the expectation for a final update and also what filename ought to be used.
Additionally we keep patches adding capability dumps separated from patches adding any code.
I received some prior feedback that all the patches should pass all the tests. So, I lumped the code changes and the test data into the same patch.
Yes that is true, but this can be separated by updating capabilities first and then patching just the corresponding change in the probing conversation.
I will separate them out in the future.
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.
I'll be updating the caps very soon as I'm waiting for a few qemu patches to make it in to base a new capability on.
Note that for the in-development versions of qemu which are bumped frequently it's best to generate the dumps on the same box to minimize churn, so I'll do it as I did the previous dumps.
That would be great. I am trying to re-generate these dumps following above suggestions and am running into various issue with features in Qemu.
The failures I am seeing could be related to building qemu with correct features and running on correct hardware.
So I've posted a patch updating 'caps_10.2.0' dump to latest commit, which also now supports query-accelerators. I've also in my full review reply added a diff that was captured from the same qemu the above dump was captured so that once you apply that your patch will pass.