[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] system/vl.c: parse all -accel options
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH 2/2] system/vl.c: parse all -accel options |
Date: |
Mon, 1 Jul 2024 10:30:38 -0300 |
We're not honouring KVM options that are provided by any -accel option
aside from the first. In this example:
qemu-system-riscv64 -accel kvm,riscv-aia=emul (...) \ -accel
kvm,riscv-aia=hwaccel
'riscv-aia' will be set to 'emul', ignoring the last occurrence of the
option that set 'riscv-aia' to 'hwaccel'.
The previous change guarantees that we'll not have mixed accelerators in
the command line, and now it's safe to activate 'merge_lists' for
'qemu_accel_opts'. This will merge all accel options in the same list,
allowing the 'qemu_opt_foreach()' callback in do_configure_accelerator()
to apply each one of them in the Accel class.
Reported-by: Andrew Jones <ajones@ventanamicro.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
---
system/vl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/system/vl.c b/system/vl.c
index 32602e68b7..5ed9a9229f 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -259,6 +259,7 @@ static QemuOptsList qemu_accel_opts = {
.name = "accel",
.implied_opt_name = "accel",
.head = QTAILQ_HEAD_INITIALIZER(qemu_accel_opts.head),
+ .merge_lists = true,
.desc = {
/*
* no elements => accept any
--
2.45.2
Re: [PATCH 0/2] system/vl.c: parse all '-accel' opts, Paolo Bonzini, 2024/07/01