From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Praveen K Paladugu" <prapal@microsoft.com>,
"Magnus Kulke" <magnuskulke@linux.microsoft.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>
Subject: [PATCH 0/2] monitor: generalized query for accelerator availability
Date: Mon, 13 Oct 2025 13:26:48 +0200 [thread overview]
Message-ID: <20251013112650.935921-1-pbonzini@redhat.com> (raw)
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"]}}
Since query-mshv was not in any released version, drop it. Because the
code looks similar, I am not splitting this into removal of query-mshv
and addition of the new command.
Paolo
Paolo Bonzini (2):
monitor: clarify "info accel" help message
monitor: generalize query-mshv/"info mshv" to query-accelerators/"info
accelerators"
qapi/accelerator.json | 47 +++++++++++++++++++++++++++++---------
include/monitor/hmp.h | 2 +-
hw/core/machine-hmp-cmds.c | 21 +++++++++--------
hw/core/machine-qmp-cmds.c | 20 ++++++++++++----
hmp-commands-info.hx | 19 +++++++++------
5 files changed, 76 insertions(+), 33 deletions(-)
--
2.51.0
next reply other threads:[~2025-10-13 12:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 11:26 Paolo Bonzini [this message]
2025-10-13 11:26 ` [PATCH 1/2] monitor: clarify "info accel" help message Paolo Bonzini
2025-10-13 11:26 ` [PATCH 2/2] monitor: generalize query-mshv/"info mshv" to query-accelerators/"info accelerators" Paolo Bonzini
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=20251013112650.935921-1-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=magnuskulke@linux.microsoft.com \
--cc=prapal@microsoft.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).