aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-pci.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-11-11 12:59:26 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-11-21 09:16:57 -0600
commit9dbcca5aa13cb9ab40788ac4c56bc227d94ca920 (patch)
tree25b0a1351d647660d438325f014e4d20983519de /hw/virtio-pci.c
parentb903a0f721f28283e5eaab00a3cb2ada96c2eae0 (diff)
downloadqemu-9dbcca5aa13cb9ab40788ac4c56bc227d94ca920.zip
qemu-9dbcca5aa13cb9ab40788ac4c56bc227d94ca920.tar.gz
qemu-9dbcca5aa13cb9ab40788ac4c56bc227d94ca920.tar.bz2
virtfs: enable MSI-X
This patch enables MSI-X for virtfs-9p-pci. It also adds a compat property to pc-0.13 which turns it of there to stay compatible to 0.13-stable. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-pci.c')
-rw-r--r--hw/virtio-pci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 729917d..3610d7e 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -684,12 +684,14 @@ static int virtio_9p_init_pci(PCIDevice *pci_dev)
VirtIODevice *vdev;
vdev = virtio_9p_init(&pci_dev->qdev, &proxy->fsconf);
+ vdev->nvectors = proxy->nvectors;
virtio_init_pci(proxy, vdev,
PCI_VENDOR_ID_REDHAT_QUMRANET,
0x1009,
0x2,
0x00);
-
+ /* make the actual value visible */
+ proxy->nvectors = vdev->nvectors;
return 0;
}
#endif
@@ -758,6 +760,7 @@ static PCIDeviceInfo virtio_info[] = {
.qdev.size = sizeof(VirtIOPCIProxy),
.init = virtio_9p_init_pci,
.qdev.props = (Property[]) {
+ DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features),
DEFINE_PROP_STRING("mount_tag", VirtIOPCIProxy, fsconf.tag),
DEFINE_PROP_STRING("fsdev", VirtIOPCIProxy, fsconf.fsdev_id),