On Fri, 6 May 2022 at 16:43, Paolo Bonzini <[email protected]> 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". 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;
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. What I would have expected would have been some kind of callback where the device created with -device whatever arranged to set vga_interface_type to VGA_DEVICE when it was created; but that's clearly not how the code works, so I'm confused about how it does work... thanks -- PMM
