Skip to contentSkip to conversation

msi support for virtfs

PATCH Applied Gerd Hoffmann 4 participants 8 messages Nov 11, 2010 – Nov 21, 2010

lore
Share & tools
lore
#0 lore raw

cover msi support for virtfs

Hi,

This tiny patch series adds msi support for virtfs. It's two patches only because we need a compat property to stay compatible with -stable and we don't have a pc-0.14 machine type yet, so this is added first.

please apply,
Gerd

Gerd Hoffmann (2):
pc: add 0.13 pc machine type
virtfs: enable MSI-X

 hw/pc_piix.c    |   18 +++++++++++++++++-
 hw/virtio-pci.c |    5 ++++-
 2 files changed, 21 insertions(+), 2 deletions(-)
#1 lore raw

PATCH 1/2 pc: add 0.13 pc machine type

---
 hw/pc_piix.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
hw/pc_piix.c +9 -1
index e82bfd1..af01cfb 100644
@@ -213,7 +213,7 @@ static void pc_init_isa(ram_addr_t ram_size,
 }
 
 static QEMUMachine pc_machine = {
-    .name = "pc-0.13",
+    .name = "pc-0.14",
     .alias = "pc",
     .desc = "Standard PC",
     .init = pc_init_pci,
@@ -221,6 +221,13 @@ static QEMUMachine pc_machine = {
     .is_default = 1,
 };
 
+static QEMUMachine pc_machine_v0_13 = {
+    .name = "pc-0.13",
+    .desc = "Standard PC",
+    .init = pc_init_pci,
+    .max_cpus = 255,
+};
+
 static QEMUMachine pc_machine_v0_12 = {
     .name = "pc-0.12",
     .desc = "Standard PC",
@@ -386,6 +393,7 @@ static QEMUMachine pc_machine_rhel600 = {
 static void pc_machine_init(void)
 {
     qemu_register_machine(&pc_machine);
+    qemu_register_machine(&pc_machine_v0_13);
     qemu_register_machine(&pc_machine_v0_12);
     qemu_register_machine(&pc_machine_v0_11);
     qemu_register_machine(&pc_machine_v0_10);
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 virtfs: enable MSI-X

In reply to Gerd Hoffmann

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.

---
 hw/pc_piix.c    |    8 ++++++++
 hw/virtio-pci.c |    5 ++++-
 2 files changed, 12 insertions(+), 1 deletions(-)
hw/pc_piix.c +8 -0
index af01cfb..e9752db 100644
@@ -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 = {
hw/virtio-pci.c +4 -1
index 729917d..3610d7e 100644
@@ -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),
Signature · 1 line
1.7.1
#3 lore raw
In reply to Gerd Hoffmann
Quoted 6 lines · Gerd Hoffmann

Hi,

This tiny patch series adds msi support for virtfs. It's two patches only because we need a compat property to stay compatible with -stable and we don't have a pc-0.14 machine type yet, so this is added first.

Sorry for being dump. But what does the above change help to achieve.

-aneesh

#4 lore raw
In reply to Gerd Hoffmann
Quoted 6 lines · Gerd Hoffmann

Hi,

This tiny patch series adds msi support for virtfs. It's two patches only because we need a compat property to stay compatible with -stable and we don't have a pc-0.14 machine type yet, so this is added first.

Sorry for being dumb. But what does the above change help to achieve.

-aneesh

#5 lore raw
Quoted 9 lines · Aneesh Kumar K. V
Quoted 6 lines · Gerd Hoffmann
   Hi,

This tiny patch series adds msi support for virtfs. It's two patches only because we need a compat property to stay compatible with -stable and we don't have a pc-0.14 machine type yet, so this is added first.

Sorry for being dumb. But what does the above change help to achieve.

msi support makes the IRQ handling more efficient (no IRQ sharing, no need to ack the IRQ to the ioapic). Look at /proc/interupts with and without the patch ...

The compat property is for migration compatibility: qemu 0.14 should be able to migrate to 0.13 with -M pc-0.13. To archive that we have to disable new stuff which affects the savevm format (msi support does).

HTH
Gerd

Acked-by on the v1 series
#6 lore raw
In reply to Gerd Hoffmann
Quoted 5 lines · Gerd Hoffmann

Hi,

This tiny patch series adds msi support for virtfs. It's two patches only because we need a compat property to stay compatible with -stable and we don't have a pc-0.14 machine type yet, so this is added first.

Scared me ... you really mean msix.

Quoted 11 lines

please apply,
Gerd

Gerd Hoffmann (2):
pc: add 0.13 pc machine type
virtfs: enable MSI-X

 hw/pc_piix.c    |   18 +++++++++++++++++-
 hw/virtio-pci.c |    5 ++++-
 2 files changed, 21 insertions(+), 2 deletions(-)
#7 lore raw
In reply to Gerd Hoffmann
Quoted 6 lines · Gerd Hoffmann
   Hi,

This tiny patch series adds msi support for virtfs. It's two patches only because we need a compat property to stay compatible with -stable and we don't have a pc-0.14 machine type yet, so this is added first.

Applied all. Thanks.

Regards,

Anthony Liguori

Quoted 14 lines

please apply,
Gerd

Gerd Hoffmann (2):
pc: add 0.13 pc machine type
virtfs: enable MSI-X

  hw/pc_piix.c    |   18 +++++++++++++++++-
  hw/virtio-pci.c |    5 ++++-
  2 files changed, 21 insertions(+), 2 deletions(-)