diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-09-10 14:20:34 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2015-06-12 10:13:23 +0200 |
commit | 9eafb62d47ac1c8c2d431e1b4829445444ccc2ee (patch) | |
tree | 28aee414fadcebcf3ab76bfa3d1d3bae24f044e6 /hw/virtio/virtio-pci.h | |
parent | 2c84167b4efa4a0e81946ef624e96005396e14b2 (diff) |
virtio-gpu-pci: add virtio pci support
This patch adds virtio-gpu-pci, which is the pci proxy for the virtio
gpu device. With this patch in place virtio-gpu is functional. You
need a linux guest with a virtio-gpu driver though, and output will
appear pretty late in boot, once the kernel initialized drm and fbcon.
Written by Dave Airlie and Gerd Hoffmann.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-pci.h')
-rw-r--r-- | hw/virtio/virtio-pci.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h index d962125351..96025ca205 100644 --- a/hw/virtio/virtio-pci.h +++ b/hw/virtio/virtio-pci.h @@ -25,6 +25,7 @@ #include "hw/virtio/virtio-bus.h" #include "hw/virtio/virtio-9p.h" #include "hw/virtio/virtio-input.h" +#include "hw/virtio/virtio-gpu.h" #ifdef CONFIG_VIRTFS #include "hw/9pfs/virtio-9p.h" #endif @@ -42,6 +43,7 @@ typedef struct VHostSCSIPCI VHostSCSIPCI; typedef struct VirtIORngPCI VirtIORngPCI; typedef struct VirtIOInputPCI VirtIOInputPCI; typedef struct VirtIOInputHIDPCI VirtIOInputHIDPCI; +typedef struct VirtIOGPUPCI VirtIOGPUPCI; /* virtio-pci-bus */ @@ -261,6 +263,18 @@ struct VirtIOInputHIDPCI { VirtIOInputHID vdev; }; +/* + * virtio-gpu-pci: This extends VirtioPCIProxy. + */ +#define TYPE_VIRTIO_GPU_PCI "virtio-gpu-pci" +#define VIRTIO_GPU_PCI(obj) \ + OBJECT_CHECK(VirtIOGPUPCI, (obj), TYPE_VIRTIO_GPU_PCI) + +struct VirtIOGPUPCI { + VirtIOPCIProxy parent_obj; + VirtIOGPU vdev; +}; + /* Virtio ABI version, if we increment this, we break the guest driver. */ #define VIRTIO_PCI_ABI_VERSION 0 |