aboutsummaryrefslogtreecommitdiffstats
path: root/hw/virtio-pci.c
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2009-06-17 11:38:28 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-22 10:10:50 -0500
commitefeea6d048756bc42ad39f0acce6bede4b74177a (patch)
tree667e4307b915ca1f6f4711f4a7f6d057e61201a9 /hw/virtio-pci.c
parent5774cf98ca7da4161ee4265a2db0d92ffff005f3 (diff)
virtio: add support for indirect ring entries
Support a new feature flag for indirect ring entries. These are ring entries which point to a table of buffer descriptors. The idea here is to increase the ring capacity by allowing a larger effective ring size whereby the ring size dictates the number of requests that may be outstanding, rather than the size of those requests. This should be most effective in the case of block I/O where we can potentially benefit by concurrently dispatching a large number of large requests. Even in the simple case of single segment block requests, this results in a threefold increase in ring capacity. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-pci.c')
-rw-r--r--hw/virtio-pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 24fe837be..df4503651 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -136,7 +136,9 @@ static uint32_t virtio_ioport_read(void *opaque, uint32_t addr)
switch (addr) {
case VIRTIO_PCI_HOST_FEATURES:
ret = vdev->get_features(vdev);
- ret |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY) | (1 << VIRTIO_F_BAD_FEATURE);
+ ret |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY);
+ ret |= (1 << VIRTIO_RING_F_INDIRECT_DESC);
+ ret |= (1 << VIRTIO_F_BAD_FEATURE);
break;
case VIRTIO_PCI_GUEST_FEATURES:
ret = vdev->features;