|
From: | Paolo Bonzini |
Subject: | Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created |
Date: | Fri, 6 May 2022 18:10:07 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 |
On 5/6/22 17:47, Peter Maydell wrote:
if (!vga_model && !default_vga) { vga_interface_type = VGA_DEVICE; + vga_interface_created = true; } if (!has_defaults || machine_class->no_serial) { default_serial = 0;Can you explain why that's right? qemu_disable_default_devices() isn't creating any devices at all, so it's not clear to me (a) why it's setting vga_interface_type or (b) why setting vga_interface_created to true is OK.
VGA_DEVICE means the device has been specified on the command line, but the board should otherwise behave as if "-vga something" was there.
While the device has not been created yet, it will be in qemu_create_cli_devices(), and that's what !default_vga means at this point of the function.
This in fact means that almost all three occurrences of "vga_interface_type != VGA_NONE" are wrong. :(
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |