qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Zheyu Ma <zheyuma97@gmail.com>,
	thuth@redhat.com, lvivier@redhat.com, pbonzini@redhat.com
Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
	"Marc Marí" <marc.mari.barcelo@gmail.com>
Subject: Re: [PATCH] libqos/virtio.c: Correct 'flags' reading in qvirtqueue_kick
Date: Wed, 20 Mar 2024 17:55:37 +0100	[thread overview]
Message-ID: <8209b18b-ac78-48aa-8189-4d0afdc8e7c2@linaro.org> (raw)
In-Reply-To: <20240320090442.267525-1-zheyuma97@gmail.com>

Cc'ing Marc & Stefan for commit 1053587c3f ("libqos: Added EVENT_IDX 
support").

On 20/3/24 10:04, Zheyu Ma wrote:
> In qvirtqueue_kick(), the 'flags' were previously being incorrectly read from
> vq->avail instead of the correct vq->used location. This update ensures 'flags'
> are read from the correct location as per the virtio standard.
> 
> Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
> ---
>   tests/qtest/libqos/virtio.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qtest/libqos/virtio.c b/tests/qtest/libqos/virtio.c
> index 82a6e122bf..a21b6eee9c 100644
> --- a/tests/qtest/libqos/virtio.c
> +++ b/tests/qtest/libqos/virtio.c
> @@ -394,7 +394,7 @@ void qvirtqueue_kick(QTestState *qts, QVirtioDevice *d, QVirtQueue *vq,
>       qvirtio_writew(d, qts, vq->avail + 2, idx + 1);
>   
>       /* Must read after idx is updated */
> -    flags = qvirtio_readw(d, qts, vq->avail);
> +    flags = qvirtio_readw(d, qts, vq->used);
>       avail_event = qvirtio_readw(d, qts, vq->used + 4 +
>                                   sizeof(struct vring_used_elem) * vq->size);
>   

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



  reply	other threads:[~2024-03-20 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-20  9:04 [PATCH] libqos/virtio.c: Correct 'flags' reading in qvirtqueue_kick Zheyu Ma
2024-03-20 16:55 ` Philippe Mathieu-Daudé [this message]
2024-03-20 17:40 ` Stefan Hajnoczi

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=8209b18b-ac78-48aa-8189-4d0afdc8e7c2@linaro.org \
    --to=philmd@linaro.org \
    --cc=lvivier@redhat.com \
    --cc=marc.mari.barcelo@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    --cc=zheyuma97@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).