[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: |
Peter Maydell |
Subject: |
Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created |
Date: |
Fri, 6 May 2022 17:29:23 +0100 |
On Fri, 6 May 2022 at 17:10, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> 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.
Oh, I see now -- qemu_disable_default_devices() does a
preliminary scan through of every supplied -device option,
looking to see if it has a driver=foo that matches some
value in the default_list[] array; if it does then we
set default_vga or whatever to false. (So effectively we
have a hardcoded list of things we consider to be "VGA
devices" for this purpose, which might or might not be the same
as the set of actual VGA devices we support...)
I guess this is all here for backwards compatibility purposes?
I kind of expect that short options like '-vga' might have
magic extra behaviour beyond "create a device", but having
some devices that have magic "make the board behave differently"
behaviour when they're created with '-device' is a bit
unexpected to me.
thanks
-- PMM
- [PATCH v3] Warn user if the vga flag is passed but no vga device is created, Gautam Agrawal, 2022/05/01
- Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created, Peter Maydell, 2022/05/05
- Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created, Stefan Hajnoczi, 2022/05/06
- Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created, Thomas Huth, 2022/05/06
- Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created, Peter Maydell, 2022/05/06
- Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created, Paolo Bonzini, 2022/05/06
- Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created, Peter Maydell, 2022/05/06
- Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created, Paolo Bonzini, 2022/05/06
- Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created,
Peter Maydell <=
- Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created, Gerd Hoffmann, 2022/05/09
- Re: [PATCH v3] Warn user if the vga flag is passed but no vga device is created, Thomas Huth, 2022/05/09