[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/2] qdev,accel-system: allow Accel type globals
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH 0/2] qdev,accel-system: allow Accel type globals |
Date: |
Wed, 3 Jul 2024 06:46:24 -0300 |
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]
20240701133038.1489043-1-dbarboza@ventanamicro.com/">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
- [PATCH 0/2] qdev,accel-system: allow Accel type globals,
Daniel Henrique Barboza <=