All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: Denis Plotnikov <dplotnikov@virtuozzo.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com
Subject: Re: [PATCH v1] virtio-mmio: update queue size on guest write
Date: Tue, 24 Dec 2019 16:02:18 +0100	[thread overview]
Message-ID: <20191224150218.mv3ysfgfooe5samh@steredhat> (raw)
In-Reply-To: <20191224081446.17003-1-dplotnikov@virtuozzo.com>

On Tue, Dec 24, 2019 at 11:14:46AM +0300, Denis Plotnikov wrote:
> Some guests read back queue size after writing it.
> Always update the on size write otherwise they might be confused.
> 
> Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
> ---
>  hw/virtio/virtio-mmio.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

When I reviewed the Michael's patch for pci transport, I planned to do
the same but I postponed for several reason.

Thanks for doing that!

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

> 
> diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
> index 94d934c44b..1e40a74869 100644
> --- a/hw/virtio/virtio-mmio.c
> +++ b/hw/virtio/virtio-mmio.c
> @@ -295,8 +295,9 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value,
>          break;
>      case VIRTIO_MMIO_QUEUE_NUM:
>          trace_virtio_mmio_queue_write(value, VIRTQUEUE_MAX_SIZE);
> +        virtio_queue_set_num(vdev, vdev->queue_sel, value);
> +
>          if (proxy->legacy) {
> -            virtio_queue_set_num(vdev, vdev->queue_sel, value);
>              virtio_queue_update_rings(vdev, vdev->queue_sel);
>          } else {
>              proxy->vqs[vdev->queue_sel].num = value;
> -- 
> 2.17.0
> 
> 



      reply	other threads:[~2019-12-24 15:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-24  8:14 [PATCH v1] virtio-mmio: update queue size on guest write Denis Plotnikov
2019-12-24 15:02 ` Stefano Garzarella [this message]

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=20191224150218.mv3ysfgfooe5samh@steredhat \
    --to=sgarzare@redhat.com \
    --cc=dplotnikov@virtuozzo.com \
    --cc=mst@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.