qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] virtio: rename VIRTIO_PCI_QUEUE_MAX to VIRT


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH 1/5] virtio: rename VIRTIO_PCI_QUEUE_MAX to VIRTIO_QUEUE_MAX
Date: Mon, 09 Feb 2015 06:06:51 +0008



On Fri, Feb 6, 2015 at 7:54 PM, Cornelia Huck <address@hidden> wrote:
On Fri,  6 Feb 2015 15:54:09 +0800
Jason Wang <address@hidden> wrote:

VIRTIO_PCI_QUEUE_MAX was not specific to pci, so rename it to VIRTIO_QUEUE_MAX. Cc: Amit Shah <address@hidden>
 Cc: Anthony Liguori <address@hidden>
 Cc: Michael S. Tsirkin <address@hidden>
 Cc: Alexander Graf <address@hidden>
 Cc: Richard Henderson <address@hidden>
 Cc: Cornelia Huck <address@hidden>
 Cc: Christian Borntraeger <address@hidden>
 Cc: Paolo Bonzini <address@hidden>
 Signed-off-by: Jason Wang <address@hidden>
 ---
  hw/char/virtio-serial-bus.c  |  2 +-
  hw/s390x/s390-virtio-bus.c   |  4 ++--
  hw/s390x/s390-virtio-ccw.c   |  2 +-
  hw/s390x/virtio-ccw.c        | 10 +++++-----
  hw/scsi/virtio-scsi.c        |  4 ++--
  hw/virtio/virtio-mmio.c      |  4 ++--
  hw/virtio/virtio-pci.c       | 10 +++++-----
  hw/virtio/virtio.c           | 26 +++++++++++++-------------
  include/hw/s390x/s390_flic.h |  2 +-
  include/hw/virtio/virtio.h   |  2 +-
  10 files changed, 33 insertions(+), 33 deletions(-)

While I certainly agree with the patch on its own, I read through your
complete patch series as well and I have some additional comments.

Your patch series bumps up the maximum number of virtqueues for all
transports, but I think we need to consider carefully what this means
for each transport.

For virtio-ccw, for example, we'll run into trouble when the guest uses
classic queue indicators: These are limited to 64 per device (as I
assumed 64 virtqueues per device initially and they fit quite nicely
into a 64 bit integer). If the guest uses adapter interrupts with
two-stage indicators, we should probably be fine. The guest will
hopefully care about that, but we need to describe failure modes for
this in the spec.

For s390-virtio, I frankly have no idea what large numbers of queues
will do :) Maybe we just run out of space for devices much earlier.

I see the issue, thanks. So looks like we need a transport specific limitation for this.


You seem to need some changes for this to work for virtio-pci as well,
don't you?

PCI allows at most 2048 MSI-X entires, and also allow one entry to be shared by several virtqueues which looks fine for even thousands of virtqueues. If there's a architecture limitation (e.g x86 only allow 240 interrupt vectors for MSI-X), the rest work was in the driver. If not, probably no much work needs to be done for PCI.

Thanks




reply via email to

[Prev in Thread] Current Thread [Next in Thread]