* [Qemu-devel] [PATCH] virtio-blk: add msi support.
@ 2009-08-12 10:47 Gerd Hoffmann
2009-08-12 21:57 ` Christoph Hellwig
2009-09-07 17:57 ` Mark McLoughlin
0 siblings, 2 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2009-08-12 10:47 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/pc.c | 4 ++++
hw/virtio-pci.c | 8 ++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index cc6e7e8..cccb865 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1487,6 +1487,10 @@ static QEMUMachine pc_machine_v0_10 = {
.driver = "virtio-net-pci",
.property = "vectors",
.value = stringify(0),
+ },{
+ .driver = "virtio-blk-pci",
+ .property = "vectors",
+ .value = stringify(0),
},
{ /* end of list */ }
},
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 8b57dfc..e95700a 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -437,10 +437,13 @@ static void virtio_blk_init_pci(PCIDevice *pci_dev)
fprintf(stderr, "drive property not set\n");
}
vdev = virtio_blk_init(&pci_dev->qdev, proxy->dinfo);
+ vdev->nvectors = proxy->nvectors;
virtio_init_pci(proxy, vdev,
PCI_VENDOR_ID_REDHAT_QUMRANET,
PCI_DEVICE_ID_VIRTIO_BLOCK,
proxy->class_code, 0x00);
+ /* make the actual value visible */
+ proxy->nvectors = vdev->nvectors;
}
static void virtio_console_init_pci(PCIDevice *pci_dev)
@@ -504,6 +507,7 @@ static PCIDeviceInfo virtio_info[] = {
.qdev.props = (Property[]) {
DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0),
DEFINE_PROP_DRIVE("drive", VirtIOPCIProxy, dinfo),
+ DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
DEFINE_PROP_END_OF_LIST(),
},
},{
@@ -511,8 +515,8 @@ static PCIDeviceInfo virtio_info[] = {
.qdev.size = sizeof(VirtIOPCIProxy),
.init = virtio_net_init_pci,
.qdev.props = (Property[]) {
- DEFINE_PROP_HEX32("vectors", VirtIOPCIProxy, nvectors,
- NIC_NVECTORS_UNSPECIFIED),
+ DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors,
+ NIC_NVECTORS_UNSPECIFIED),
DEFINE_PROP_END_OF_LIST(),
},
},{
--
1.6.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio-blk: add msi support.
2009-08-12 10:47 [Qemu-devel] [PATCH] virtio-blk: add msi support Gerd Hoffmann
@ 2009-08-12 21:57 ` Christoph Hellwig
2009-09-07 17:57 ` Mark McLoughlin
1 sibling, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2009-08-12 21:57 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
Ah nice, I was just about to start doing this. It's worth mentioning
that this gives an about 5% speedup for workloads with small I/O sizes.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio-blk: add msi support.
2009-08-12 10:47 [Qemu-devel] [PATCH] virtio-blk: add msi support Gerd Hoffmann
2009-08-12 21:57 ` Christoph Hellwig
@ 2009-09-07 17:57 ` Mark McLoughlin
2009-09-08 6:39 ` Gerd Hoffmann
1 sibling, 1 reply; 4+ messages in thread
From: Mark McLoughlin @ 2009-09-07 17:57 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Wed, 2009-08-12 at 12:47 +0200, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/pc.c | 4 ++++
> hw/virtio-pci.c | 8 ++++++--
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/hw/pc.c b/hw/pc.c
> index cc6e7e8..cccb865 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -1487,6 +1487,10 @@ static QEMUMachine pc_machine_v0_10 = {
> .driver = "virtio-net-pci",
> .property = "vectors",
> .value = stringify(0),
> + },{
> + .driver = "virtio-blk-pci",
> + .property = "vectors",
> + .value = stringify(0),
This means that MSI is enabled for virtio-blk with the pc-0.11 machine
type.
Shouldn't we add a pc-0.12 machine type and disable MSI for pc-0.11?
Cheers,
Mark.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio-blk: add msi support.
2009-09-07 17:57 ` Mark McLoughlin
@ 2009-09-08 6:39 ` Gerd Hoffmann
0 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2009-09-08 6:39 UTC (permalink / raw)
To: Mark McLoughlin; +Cc: qemu-devel
On 09/07/09 19:57, Mark McLoughlin wrote:
> On Wed, 2009-08-12 at 12:47 +0200, Gerd Hoffmann wrote:
>> Signed-off-by: Gerd Hoffmann<kraxel@redhat.com>
>> ---
>> hw/pc.c | 4 ++++
>> hw/virtio-pci.c | 8 ++++++--
>> 2 files changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/pc.c b/hw/pc.c
>> index cc6e7e8..cccb865 100644
>> --- a/hw/pc.c
>> +++ b/hw/pc.c
>> @@ -1487,6 +1487,10 @@ static QEMUMachine pc_machine_v0_10 = {
>> .driver = "virtio-net-pci",
>> .property = "vectors",
>> .value = stringify(0),
>> + },{
>> + .driver = "virtio-blk-pci",
>> + .property = "vectors",
>> + .value = stringify(0),
>
> This means that MSI is enabled for virtio-blk with the pc-0.11 machine
> type.
>
> Shouldn't we add a pc-0.12 machine type and disable MSI for pc-0.11?
Either that or apply the virtio-blk msi patch to the stable-0.11 branch.
cheers,
Gerd
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-08 6:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-12 10:47 [Qemu-devel] [PATCH] virtio-blk: add msi support Gerd Hoffmann
2009-08-12 21:57 ` Christoph Hellwig
2009-09-07 17:57 ` Mark McLoughlin
2009-09-08 6:39 ` Gerd Hoffmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.