Hi, 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.
This also means that we can mix different accelerators in the same command line. In fact we can do whatever we want as long as the first instance of '-accel' is valid. E.g. this command line will boot a x86_64 KVM guest without problems: qemu-system-x86_64 -accel kvm -accel tcg -accel not_an_accel (...) And this will boot a KVM guest with kernel-irqchip=off because it will ignore the second '-accel' that sets its back to 'on': qemu-system-x86_64 -accel kvm,kernel-irqchip=off \ -accel kvm,kernel-irqchip=on (...) 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 <qemu:cmdline> 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. Both patches can be squashed in a single patch if preferrable. I'm sending in separate because I'm not fully confident in patch 1. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Thomas Huth <th...@redhat.com> Daniel Henrique Barboza (2): system/vl.c: do not allow mixed -accel opts system/vl.c: parse all -accel options system/vl.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) -- 2.45.2