[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2] virtfs: enable MSI-X
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 2/2] virtfs: enable MSI-X |
Date: |
Thu, 11 Nov 2010 12:59:26 +0100 |
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 <address@hidden>
---
hw/pc_piix.c | 8 ++++++++
hw/virtio-pci.c | 5 ++++-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index af01cfb..e9752db 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -226,6 +226,14 @@ static QEMUMachine pc_machine_v0_13 = {
.desc = "Standard PC",
.init = pc_init_pci,
.max_cpus = 255,
+ .compat_props = (GlobalProperty[]) {
+ {
+ .driver = "virtio-9p-pci",
+ .property = "vectors",
+ .value = stringify(0),
+ },
+ { /* end of list */ }
+ },
};
static QEMUMachine pc_machine_v0_12 = {
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),
--
1.7.1
- [Qemu-devel] [PATCH 0/2] msi support for virtfs, Gerd Hoffmann, 2010/11/11
- [Qemu-devel] [PATCH 1/2] pc: add 0.13 pc machine type, Gerd Hoffmann, 2010/11/11
- [Qemu-devel] [PATCH 2/2] virtfs: enable MSI-X,
Gerd Hoffmann <=
- Re: [Qemu-devel] [PATCH 0/2] msi support for virtfs, Aneesh Kumar K. V, 2010/11/11
- Re: [Qemu-devel] [PATCH 0/2] msi support for virtfs, Aneesh Kumar K. V, 2010/11/11
- [Qemu-devel] Re: [PATCH 0/2] msi support for virtfs, Michael S. Tsirkin, 2010/11/16
- Re: [Qemu-devel] [PATCH 0/2] msi support for virtfs, Anthony Liguori, 2010/11/21