system/vl.c: parse all '-accel' opts
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | system/vl.c: do not allow mixed -accel optssystem/ | +14 | 3 replies | |
| 2/2 | system/vl.c: parse all -accel optionssystem/ | +1 | 4 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Philippe Mathieu-Daudé |
|---|---|
| 1/2 | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] system/vl.c: parse all '-accel' opts
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.
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(-)
Signature · 1 line
2.45.2