virtio-pci: fill VirtIOPCIRegions early.
commitb6ce27a593ab39ac28baebc3045901925046bebd
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 4 Jun 2015 10:34:39 +0000 (4 12:34 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 10 Jun 2015 16:15:06 +0000 (10 18:15 +0200)
tree3cb96868b01b805c9810096ae5f7b060f9665276
parentcc52ea90f835aa66d431db712b22f8b15bec2e46
virtio-pci: fill VirtIOPCIRegions early.

Initialize the modern bar and the VirtIOPCIRegion fields early, in
realize.  Also add a size field to VirtIOPCIRegion and variables for
pci bars to VirtIOPCIProxy.

This allows virtio-pci subclasses to change things before the
device_plugged callback applies them.  virtio-vga will use that to
arrange regions in a way that virtio-vga is compatible to both stdvga
(in vga mode) and virtio-gpu-pci (in pci mode).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-pci.c
hw/virtio/virtio-pci.h