qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V3 04/14] virtio-ccw: introduce ccw specific que


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH V3 04/14] virtio-ccw: introduce ccw specific queue limit
Date: Fri, 6 Mar 2015 13:13:47 +0100

On Thu,  5 Mar 2015 13:48:41 +0800
Jason Wang <address@hidden> wrote:

> Instead of depending on marco, using a bus specific limit.
> 
> Cc: Alexander Graf <address@hidden>
> Cc: Cornelia Huck <address@hidden>
> Cc: Christian Borntraeger <address@hidden>
> Cc: Richard Henderson <address@hidden>
> Signed-off-by: Jason Wang <address@hidden>
> ---
>  hw/s390x/s390-virtio-ccw.c   |  7 +++++--
>  hw/s390x/virtio-ccw.c        | 13 +++++++------
>  include/hw/s390x/s390_flic.h |  2 +-
>  include/hw/virtio/virtio.h   |  1 +
>  4 files changed, 14 insertions(+), 9 deletions(-)
> 

> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
> index 4874622..98a1a90 100644
> --- a/hw/s390x/virtio-ccw.c
> +++ b/hw/s390x/virtio-ccw.c

> @@ -1026,7 +1027,7 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t 
> vector)
Unfortunately just snipped off in this diff, but the code says

if (vector >= 128) {
>          return;
>      }

This is originating from (64 bits for queues + 64 bits for secondary
indicators) - only the first bit of secondary indicators is currently
used (for configuration changes). I'd suggest to change that to
queue_max + 64 and add a comment /* queue indicators + secondary
indicators */ or so.

> 
> -    if (vector < VIRTIO_PCI_QUEUE_MAX) {
> +    if (vector < virtio_get_queue_max(virtio_bus_get_device(&dev->bus))) {
>          if (!dev->indicators) {
>              return;
>          }




reply via email to

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