Re: [PATCH 0/2] system/vl.c: parse all '-accel' opts

2024-07-01 Thread Daniel Henrique Barboza




On 7/1/24 1:31 PM, Paolo Bonzini wrote:

On Mon, Jul 1, 2024 at 3:30 PM Daniel Henrique Barboza
 wrote:

My initial intention was to fix a problem we're having with libvirt and
RISC-V where we can't set 'riscv-aia' by appending '-accel kvm,riscv-aia=val'
via  in the domain XML. libvirt will add a leading
'-accel kvm' in the regular command line and ignore the second. But to
fix that (patch 2) we must first guarantee that we're not mixing different
accelerators.


I think you can use -global, if you tweak qdev_prop_check_globals() to
also allow descendents of TYPE_ACCEL.

For example:

./qemu-system-x86_64 -accel kvm -global kvm-accel.kernel-irqchip=off


I'll try it out! Thanks,


Daniel




Paolo





Re: [PATCH 0/2] system/vl.c: parse all '-accel' opts

2024-07-01 Thread Paolo Bonzini
On Mon, Jul 1, 2024 at 3:30 PM Daniel Henrique Barboza
 wrote:
> My initial intention was to fix a problem we're having with libvirt and
> RISC-V where we can't set 'riscv-aia' by appending '-accel kvm,riscv-aia=val'
> via  in the domain XML. libvirt will add a leading
> '-accel kvm' in the regular command line and ignore the second. But to
> fix that (patch 2) we must first guarantee that we're not mixing different
> accelerators.

I think you can use -global, if you tweak qdev_prop_check_globals() to
also allow descendents of TYPE_ACCEL.

For example:

   ./qemu-system-x86_64 -accel kvm -global kvm-accel.kernel-irqchip=off

Paolo