qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is


From: Thomas Huth
Subject: Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created
Date: Mon, 9 May 2022 08:09:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0

On 06/05/2022 17.43, Paolo Bonzini wrote:
On 5/6/22 16:48, Peter Maydell wrote:
I'm just in progress of preparing a pull request with misc patches, I can
also throw it in there if nobody minds.
Paolo mentioned on IRC yesterday that there was some detail he thought
it wasn't handling right with VGA_DEVICE, but I didn't really understand
the details. Paolo ?

Yeah, I was wondering if this would warn for "-device VGA".

Yes, it's possible to trigger the warning like this:

$ ./qemu-system-ppc -M ppce500 -device VGA
qemu-system-ppc: warning: A -vga option was passed but this machine type does not use that option; No VGA device has been created

But if so it should be enough to do this to fix it:

diff --git a/softmmu/vl.c b/softmmu/vl.c
index eef1558281..7ff76b795a 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -1352,6 +1352,7 @@ static void qemu_disable_default_devices(void)

      if (!vga_model && !default_vga) {
          vga_interface_type = VGA_DEVICE;
+        vga_interface_created = true;
      }
      if (!has_defaults || machine_class->no_serial) {
          default_serial = 0;

That fixes the warning, indeed. Thanks, I'll fix up the patch with this hunk and respin my pull request.

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]