qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] qdev,accel-system: allow Accel type globals
@ 2024-07-03  9:46 Daniel Henrique Barboza
  2024-07-03  9:46 ` [PATCH 1/2] qdev: change qdev_prop_set_globals() to use Object* Daniel Henrique Barboza
  2024-07-03  9:46 ` [PATCH 2/2] qdev, accel-system: add support to Accel globals Daniel Henrique Barboza
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Henrique Barboza @ 2024-07-03  9:46 UTC (permalink / raw)
  To: qemu-devel
  Cc: pbonzini, richard.henderson, berrange, eduardo,
	Daniel Henrique Barboza

Hi,

This is another approach of the problem we tried to fix with [1]. It was
suggested by Paolo during the review.

In the current handling of '-accel' only the first instance is parsed.
All other instances (aside from a 'helper' command that triggers the
help text and exits) is ignored. So this command line:

qemu-system-riscv64 -accel kvm -accel kvm,riscv-aia=hwaccel

Won't change 'riscv-aia' to 'hwaccel'. 

This is affecting at least one use case we have with libvirt and RISC-V:
we can't set 'riscv-aia' by appending '-accel kvm,riscv-aia=val'
via <qemu:cmdline> in the domain XML. libvirt will add a leading
'-accel kvm' in the regular command line and ignore the second. We'll
add official libvirt support for this KVM property in the near future
(we're still discussing if this prop should be a bool instead), but
for now a QEMU side change would unlock this RISC-V KVM use case in
libvirt.

With this series we'll be able to set 'riscv-aia' using globals as
follows:

qemu-system-riscv64 -accel kvm -global kvm-accel.riscv-aia=hwaccel

This change benefit all archs (not just RISC-V) and will allow globals
to be used with all accelerators, not just KVM.

[1] https://lore.kernel.org/qemu-devel/20240701133038.1489043-1-dbarboza@ventanamicro.com/

Daniel Henrique Barboza (2):
  qdev: change qdev_prop_set_globals() to use Object*
  qdev, accel-system: add support to Accel globals

 accel/accel-system.c         |  3 +++
 hw/core/qdev-properties.c    | 39 +++++++++++++++++++++++-------------
 hw/core/qdev.c               |  2 +-
 include/hw/qdev-properties.h |  2 +-
 4 files changed, 30 insertions(+), 16 deletions(-)

-- 
2.45.2



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

end of thread, other threads:[~2024-07-03 11:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03  9:46 [PATCH 0/2] qdev,accel-system: allow Accel type globals Daniel Henrique Barboza
2024-07-03  9:46 ` [PATCH 1/2] qdev: change qdev_prop_set_globals() to use Object* Daniel Henrique Barboza
2024-07-03 11:04   ` Daniel P. Berrangé
2024-07-03  9:46 ` [PATCH 2/2] qdev, accel-system: add support to Accel globals Daniel Henrique Barboza

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