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
