msi support for virtfs
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(-)
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
@@ -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
PATCH 2/2 virtfs: enable MSI-X
In reply to Gerd HoffmannThis 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
@@ -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
@@ -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
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
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
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
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,
GerdGerd Hoffmann (2):
pc: add 0.13 pc machine type
virtfs: enable MSI-Xhw/pc_piix.c | 18 +++++++++++++++++- hw/virtio-pci.c | 5 ++++- 2 files changed, 21 insertions(+), 2 deletions(-)
Anthony Liguori
AppliedQuoted 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,
GerdGerd Hoffmann (2):
pc: add 0.13 pc machine type
virtfs: enable MSI-Xhw/pc_piix.c | 18 +++++++++++++++++- hw/virtio-pci.c | 5 ++++- 2 files changed, 21 insertions(+), 2 deletions(-)