aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-pci.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2015-06-04 12:34:39 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-06-10 18:15:06 +0200
commitb6ce27a593ab39ac28baebc3045901925046bebd (patch)
tree3cb96868b01b805c9810096ae5f7b060f9665276 /hw/virtio/virtio-pci.h
parentcc52ea90f835aa66d431db712b22f8b15bec2e46 (diff)
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>
Diffstat (limited to 'hw/virtio/virtio-pci.h')
-rw-r--r--hw/virtio/virtio-pci.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index ea1343ded3..ff5ab71e76 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -94,6 +94,7 @@ typedef struct VirtioPCIClass {
typedef struct VirtIOPCIRegion {
MemoryRegion mr;
uint32_t offset;
+ uint32_t size;
uint32_t type;
} VirtIOPCIRegion;
@@ -105,6 +106,9 @@ struct VirtIOPCIProxy {
VirtIOPCIRegion device;
VirtIOPCIRegion notify;
MemoryRegion modern_bar;
+ uint32_t legacy_io_bar;
+ uint32_t msix_bar;
+ uint32_t modern_mem_bar;
uint32_t flags;
uint32_t class_code;
uint32_t nvectors;