diff mbox series

[03/10] hw/i386: Select VGA_PCI in Kconfig

Message ID 20230206140809.26028-4-farosas@suse.de (mailing list archive)
State New, archived
Headers show
Series Kconfig vs. default devices | expand

Commit Message

Fabiano Rosas Feb. 6, 2023, 2:08 p.m. UTC
Machines that have "std" as default VGA display need to always build
vga-pci.c, otherwise we get a crash when CONFIG_PCI_DEVICES=n:

$ ./qemu-system-x86_64 -M q35 -vga std
qemu-system-x86_64: unknown type 'VGA'
Aborted (core dumped)

Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
 hw/i386/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Huth Feb. 7, 2023, 3:47 p.m. UTC | #1
On 06/02/2023 15.08, Fabiano Rosas wrote:
> Machines that have "std" as default VGA display need to always build
> vga-pci.c, otherwise we get a crash when CONFIG_PCI_DEVICES=n:
> 
> $ ./qemu-system-x86_64 -M q35 -vga std

I'd remove the "-vga std" in above example to show that it also crashed "by 
default".

> qemu-system-x86_64: unknown type 'VGA'
> Aborted (core dumped)
> 
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
>   hw/i386/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 527b95df81..8e59cb6634 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -30,9 +30,9 @@ config PC
>       imply TEST_DEVICES
>       imply TPM_CRB
>       imply TPM_TIS_ISA
> -    imply VGA_PCI
>       imply VIRTIO_VGA
>       imply NVDIMM
> +    select VGA_PCI
>       select FDC_ISA
>       select I8259
>       select I8254

Maybe it would be better to add it to the i440fx and the q35 machine only, 
so that you could still compile the isapc machine without it?

  Thomas
Fabiano Rosas Feb. 7, 2023, 5:41 p.m. UTC | #2
Thomas Huth <thuth@redhat.com> writes:

> On 06/02/2023 15.08, Fabiano Rosas wrote:
>> Machines that have "std" as default VGA display need to always build
>> vga-pci.c, otherwise we get a crash when CONFIG_PCI_DEVICES=n:
>> 
>> $ ./qemu-system-x86_64 -M q35 -vga std
>
> I'd remove the "-vga std" in above example to show that it also crashed "by 
> default".
>
>> qemu-system-x86_64: unknown type 'VGA'
>> Aborted (core dumped)
>> 
>> Signed-off-by: Fabiano Rosas <farosas@suse.de>
>> ---
>>   hw/i386/Kconfig | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
>> index 527b95df81..8e59cb6634 100644
>> --- a/hw/i386/Kconfig
>> +++ b/hw/i386/Kconfig
>> @@ -30,9 +30,9 @@ config PC
>>       imply TEST_DEVICES
>>       imply TPM_CRB
>>       imply TPM_TIS_ISA
>> -    imply VGA_PCI
>>       imply VIRTIO_VGA
>>       imply NVDIMM
>> +    select VGA_PCI
>>       select FDC_ISA
>>       select I8259
>>       select I8254
>
> Maybe it would be better to add it to the i440fx and the q35 machine only, 
> so that you could still compile the isapc machine without it?

isapc depends on i440fx, so it's will bring VGA_PCI into the build
anyway.
diff mbox series

Patch

diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 527b95df81..8e59cb6634 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -30,9 +30,9 @@  config PC
     imply TEST_DEVICES
     imply TPM_CRB
     imply TPM_TIS_ISA
-    imply VGA_PCI
     imply VIRTIO_VGA
     imply NVDIMM
+    select VGA_PCI
     select FDC_ISA
     select I8259
     select I8254