qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH] virtio-blk: add msi support.
Date: Wed, 12 Aug 2009 12:47:24 +0200	[thread overview]
Message-ID: <1250074044-24667-1-git-send-email-kraxel@redhat.com> (raw)


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

             reply	other threads:[~2009-08-12 10:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-12 10:47 Gerd Hoffmann [this message]
2009-08-12 21:57 ` [Qemu-devel] [PATCH] virtio-blk: add msi support Christoph Hellwig
2009-09-07 17:57 ` Mark McLoughlin
2009-09-08  6:39   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1250074044-24667-1-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).