diff options
author | Marc MarĂ <marc.mari.barcelo@gmail.com> | 2014-09-01 12:07:59 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-09-08 11:12:43 +0100 |
commit | 58368113989403775496b3422f22094713703157 (patch) | |
tree | 164f623592f825c8ee09c1b106f8e475560ef013 /tests/libqos/virtio-pci.h | |
parent | e11199554c568822c3ede3e3b4820ac3a146b1d9 (diff) | |
download | qemu-58368113989403775496b3422f22094713703157.zip qemu-58368113989403775496b3422f22094713703157.tar.gz qemu-58368113989403775496b3422f22094713703157.tar.bz2 |
libqos: Added MSI-X support
Added MSI-X support for qtest PCI.
Added MSI-X support for virtio-pci.
Added MSI-X test case in virtio-blk-test.
Signed-off-by: Marc MarĂ <marc.mari.barcelo@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/libqos/virtio-pci.h')
-rw-r--r-- | tests/libqos/virtio-pci.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/libqos/virtio-pci.h b/tests/libqos/virtio-pci.h index 40bd12d..883f7ff 100644 --- a/tests/libqos/virtio-pci.h +++ b/tests/libqos/virtio-pci.h @@ -28,12 +28,24 @@ #define QVIRTIO_PCI_ALIGN 4096 +#define QVIRTIO_MSI_NO_VECTOR 0xFFFF + typedef struct QVirtioPCIDevice { QVirtioDevice vdev; QPCIDevice *pdev; void *addr; + uint16_t config_msix_entry; + uint64_t config_msix_addr; + uint32_t config_msix_data; } QVirtioPCIDevice; +typedef struct QVirtQueuePCI { + QVirtQueue vq; + uint16_t msix_entry; + uint64_t msix_addr; + uint32_t msix_data; +} QVirtQueuePCI; + extern const QVirtioBus qvirtio_pci; void qvirtio_pci_foreach(QPCIBus *bus, uint16_t device_type, @@ -41,4 +53,9 @@ void qvirtio_pci_foreach(QPCIBus *bus, uint16_t device_type, QVirtioPCIDevice *qvirtio_pci_device_find(QPCIBus *bus, uint16_t device_type); void qvirtio_pci_device_enable(QVirtioPCIDevice *d); void qvirtio_pci_device_disable(QVirtioPCIDevice *d); + +void qvirtio_pci_set_msix_configuration_vector(QVirtioPCIDevice *d, + QGuestAllocator *alloc, uint16_t entry); +void qvirtqueue_pci_msix_setup(QVirtioPCIDevice *d, QVirtQueuePCI *vqpci, + QGuestAllocator *alloc, uint16_t entry); #endif |