Am 24.04.2014 12:30, schrieb Gerd Hoffmann:
> Add a standard vga variant which doesn't occupy any legacy
> ressources and thus can easily be used as secondary (or legacy-free)
> graphics adapter.  Programming must be done using the MMIO bar.
> 
> Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
[...]
> diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
> index ad49156..0865dc4 100644
> --- a/hw/display/vga-pci.c
> +++ b/hw/display/vga-pci.c
[...]
> @@ -208,9 +261,17 @@ static const TypeInfo vga_info = {
>      .class_init    = vga_class_init,
>  };
>  
> +static const TypeInfo secondary_info = {
> +    .name          = "secondary-vga",
> +    .parent        = TYPE_PCI_DEVICE,
> +    .instance_size = sizeof(PCIVGAState),
> +    .class_init    = secondary_class_init,
> +};
> +
>  static void vga_register_types(void)
>  {
>      type_register_static(&vga_info);
> +    type_register_static(&secondary_info);
>  }
>  
>  type_init(vga_register_types)

This is adding a new optional PCI device. Please append a patch to this
pull that adds a qtest to tests/, which instantiates it via -device.
There's a lot of stub examples to copy by now, e.g. the audio ones.

Thanks,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

Reply via email to