]> git.ipfire.org Git - thirdparty/qemu.git/commit
monitor: generalize query-mshv/"info mshv" to query-accelerators/"info accelerators"
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 13 Oct 2025 10:49:04 +0000 (12:49 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Oct 2025 09:03:59 +0000 (11:03 +0200)
commit71d5babbd6fffc7def1ecbf29f9753e3a2807761
treea19af507cb70a1a9c9ca5428402c3f4a95bbf8e6
parent2808652b4fae100dd1a46344c686db6e6136784e
monitor: generalize query-mshv/"info mshv" to query-accelerators/"info accelerators"

The recently-introduced query-mshv command is a duplicate of query-kvm,
and neither provides a full view of which accelerators are supported
by a particular binary of QEMU and which is in use.

KVM was the first accelerator added to QEMU, predating QOM and TYPE_ACCEL,
so it got a pass.  But now, instead of adding a badly designed copy, solve
the problem completely for all accelerators with a command that provides
the whole picture:

    >> {"execute": "query-accelerators"}
    << {"return": {"enabled": "tcg", "present": ["kvm", "mshv", "qtest", "tcg", "xen"]}}

Cc: Praveen K Paladugu <prapal@microsoft.com>
Cc: Magnus Kulke <magnuskulke@linux.microsoft.com>
Suggested-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hmp-commands-info.hx
hw/core/machine-hmp-cmds.c
hw/core/machine-qmp-cmds.c
include/monitor/hmp.h
qapi/accelerator.json