qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/riscv: virt: Warn the user if -bios is provided when using KVM
@ 2022-03-23 17:13 Ralf Ramsauer
  2022-03-23 21:05 ` Alistair Francis
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ralf Ramsauer @ 2022-03-23 17:13 UTC (permalink / raw)
  To: qemu-devel
  Cc: apatel, Peter Maydell, anup, Ralf Ramsauer, Palmer Dabbelt,
	stefan.huber, alistair23, jiangyifei

The -bios option is silently ignored if used in combination with -enable-kvm.
The reason is that the machine starts in S-Mode, and the bios typically runs in
M-Mode.

Warn the user that the bios won't be loaded.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
---
 hw/riscv/virt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
index 4496a15346..a4d13114ee 100644
--- a/hw/riscv/virt.c
+++ b/hw/riscv/virt.c
@@ -1312,6 +1312,9 @@ static void virt_machine_init(MachineState *machine)
      * when KVM is enabled.
      */
     if (kvm_enabled()) {
+        if (machine->firmware && strcmp(machine->firmware, "none"))
+            warn_report("BIOS is not supported in combination with KVM. "
+                        "Ignoring BIOS.");
         g_free(machine->firmware);
         machine->firmware = g_strdup("none");
     }
-- 
2.32.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-31 22:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-23 17:13 [PATCH] hw/riscv: virt: Warn the user if -bios is provided when using KVM Ralf Ramsauer
2022-03-23 21:05 ` Alistair Francis
2022-03-23 22:31   ` [EXT] " Ralf Ramsauer
2022-03-23 22:31 ` [PATCH v2] " Ralf Ramsauer
2022-03-24  2:46   ` Alistair Francis
2022-03-24  9:08 ` [PATCH] " Daniel P. Berrangé
2022-03-31  0:11   ` Alistair Francis
2022-03-31 22:07     ` [EXT] " Ralf Ramsauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).