summaryrefslogtreecommitdiffstats
path: root/hw/virtio/virtio-pci.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin2015-06-04 12:34:22 +0200
committerMichael S. Tsirkin2015-06-10 18:15:05 +0200
commitdfb8e184db758bff275f94f7aa634300886cfe21 (patch)
tree5e805168820468f1ca4a47d913d7511384f99900 /hw/virtio/virtio-pci.h
parentlinux-headers: add virtio_pci (diff)
downloadqemu-dfb8e184db758bff275f94f7aa634300886cfe21.tar.gz
qemu-dfb8e184db758bff275f94f7aa634300886cfe21.tar.xz
qemu-dfb8e184db758bff275f94f7aa634300886cfe21.zip
virtio-pci: initial virtio 1.0 support
This is somewhat functional. With this, and linux driver from my tree, I was able to use virtio net as virtio 1.0 device for light browsing. At the moment, dataplane and vhost code is still missing. Based on Cornelia's virtio 1.0 patchset: Date: Thu, 11 Dec 2014 14:25:02 +0100 From: Cornelia Huck <cornelia.huck@de.ibm.com> To: virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org Cc: rusty@rustcorp.com.au, thuth@linux.vnet.ibm.com, mst@redhat.com, Cornelia Huck <cornelia.huck@de.ibm.com> Subject: [PATCH RFC v6 00/20] qemu: towards virtio-1 host support Message-Id: <1418304322-7546-1-git-send-email-cornelia.huck@de.ibm.com> which is itself still missing some core bits. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-pci.h')
-rw-r--r--hw/virtio/virtio-pci.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index de394687ef..7a6481f96d 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -88,9 +88,25 @@ typedef struct VirtioPCIClass {
struct VirtIOPCIProxy {
PCIDevice pci_dev;
MemoryRegion bar;
+ MemoryRegion common;
+ MemoryRegion isr;
+ MemoryRegion device;
+ MemoryRegion notify;
+ MemoryRegion modern_bar;
uint32_t flags;
uint32_t class_code;
uint32_t nvectors;
+ uint32_t dfselect;
+ uint32_t gfselect;
+ uint32_t guest_features[2];
+ struct {
+ uint16_t num;
+ bool enabled;
+ uint32_t desc[2];
+ uint32_t avail[2];
+ uint32_t used[2];
+ } vqs[VIRTIO_QUEUE_MAX];
+
bool ioeventfd_disabled;
bool ioeventfd_started;
VirtIOIRQFD *vector_irqfd;