On Fri, Mar 20, 2015 at 6:20 PM, Cornelia Huck
<cornelia.h...@de.ibm.com> wrote:
On Wed, 18 Mar 2015 17:34:59 +0800
Jason Wang <jasow...@redhat.com> wrote:
Typo in subject: s/virito/virtio/
Will correct this.
This patch introduces a bus specific queue limitation. It will be
useful for increasing the limit for one of the bus without
disturbing
other buses.
Cc: Michael S. Tsirkin <m...@redhat.com>
Cc: Alexander Graf <ag...@suse.de>
Cc: Richard Henderson <r...@twiddle.net>
Cc: Cornelia Huck <cornelia.h...@de.ibm.com>
Cc: Christian Borntraeger <borntrae...@de.ibm.com>
Cc: Paolo Bonzini <pbonz...@redhat.com>
Signed-off-by: Jason Wang <jasow...@redhat.com>
---
hw/char/virtio-serial-bus.c | 2 +-
hw/net/virtio-net.c | 4 ++--
hw/s390x/s390-virtio-bus.c | 1 +
hw/s390x/virtio-ccw.c | 1 +
hw/scsi/virtio-scsi.c | 4 ++--
hw/virtio/virtio-mmio.c | 1 +
hw/virtio/virtio-pci.c | 1 +
hw/virtio/virtio.c | 40
+++++++++++++++++++++++++---------------
include/hw/virtio/virtio-bus.h | 1 +
include/hw/virtio/virtio.h | 1 +
10 files changed, 36 insertions(+), 20 deletions(-)
diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index 047c963..2b41e32 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -715,6 +715,7 @@ static void
virtio_s390_bus_class_init(ObjectClass *klass, void *data)
bus_class->max_dev = 1;
k->notify = virtio_s390_notify;
k->get_features = virtio_s390_get_features;
+ k->queue_max = VIRTIO_PCI_QUEUE_MAX;
I'm wondering whether we should initialize queue_max to smth like
VIRTIO_QUEUE_MAX_DEFAULT (== 64) in virtio-bus.c instead and have the
individual classes override that value once they want to use a
different value?
May work now, but consider in the future, each transport will finally
have their own limitation, so VIRTIO_QUEUE_MAX_DEFAULT will finally be
removed some day.
But I'm fine with this patch as it stands as well.
Thanks, so I will keep this patch as is.
}