mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
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>
This commit is contained in:
parent
2c84167b4e
commit
9eafb62d47
3 changed files with 83 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue