qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] monitor: generalized query for accelerator availability
@ 2025-10-13 11:26 Paolo Bonzini
  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
  0 siblings, 2 replies; 5+ messages in thread
From: Paolo Bonzini @ 2025-10-13 11:26 UTC (permalink / raw)
  To: qemu-devel
  Cc: Praveen K Paladugu, Magnus Kulke, Markus Armbruster,
	Daniel P . Berrangé

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-14  8:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-13 11:26 [PATCH 0/2] monitor: generalized query for accelerator availability Paolo Bonzini
2025-10-13 11:26 ` [PATCH 1/2] monitor: clarify "info accel" help message Paolo Bonzini
2025-10-14  8:50   ` Daniel P. Berrangé
2025-10-13 11:26 ` [PATCH 2/2] monitor: generalize query-mshv/"info mshv" to query-accelerators/"info accelerators" Paolo Bonzini
2025-10-14  8:54   ` Daniel P. Berrangé

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).