aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-pci.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-05-17 10:32:39 -0300
committerAvi Kivity <avi@redhat.com>2012-05-21 19:22:50 +0300
commit7d37d351dffee60fc7048bbfd8573421f15eb724 (patch)
tree19e988d239f10b8bb538e2e13d6617f25f6b99f5 /hw/virtio-pci.h
parentcb697aaab9c1d8078721513a11cb1ce2729b9c92 (diff)
virtio/vhost: Add support for KVM in-kernel MSI injection
Make use of the new vector notifier to track changes of the MSI-X configuration of virtio PCI devices. On enabling events, we establish the required virtual IRQ to MSI-X message route and link the signaling eventfd file descriptor to this vIRQ line. That way, vhost-generated interrupts can be directly delivered to an in-kernel MSI-X consumer like the x86 APIC. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/virtio-pci.h')
-rw-r--r--hw/virtio-pci.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h
index e5604282e5..8d28d4b789 100644
--- a/hw/virtio-pci.h
+++ b/hw/virtio-pci.h
@@ -25,6 +25,11 @@
#define VIRTIO_PCI_FLAG_USE_IOEVENTFD (1 << VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT)
typedef struct {
+ int virq;
+ unsigned int users;
+} VirtIOIRQFD;
+
+typedef struct {
PCIDevice pci_dev;
VirtIODevice *vdev;
MemoryRegion bar;
@@ -44,6 +49,7 @@ typedef struct {
VirtIOSCSIConf scsi;
bool ioeventfd_disabled;
bool ioeventfd_started;
+ VirtIOIRQFD *vector_irqfd;
} VirtIOPCIProxy;
void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);