From: "Michael S. Tsirkin" <mst@redhat.com>
To: Eugenio Perez Martin <eperezma@redhat.com>
Cc: Wafer Xie <wafer@jaguarmicro.com>,
qemu-devel@nongnu.org, jasowang@redhat.com,
angus.chen@jaguarmicro.com
Subject: Re: [PATCH] vdpa: fix cannot get vring base when stopping a vhost-vdpa device with multiple queues
Date: Tue, 3 Feb 2026 08:40:41 -0500 [thread overview]
Message-ID: <20260203084017-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAJaqyWf+YxQAxM3e0H2Er=dYSbGHhadJQ5n=Lj_b4Ufa4z=HYg@mail.gmail.com>
On Thu, Nov 06, 2025 at 09:04:46AM +0100, Eugenio Perez Martin wrote:
> On Wed, Oct 29, 2025 at 1:50 PM Wafer Xie <wafer@jaguarmicro.com> wrote:
> >
> > When stopping a vhost-vdpa device, only the first queue pair is marked as suspended,
> > while the remaining queues are not updated to the suspended state.
> > As a result, when stopping a multi-queue vhost-vdpa device,
> > the following error message will be printed.
> >
> > qemu-system-x86_64:vhost VQ 2 ring restore failed: -1: Operation not permitted (1)
> >
> > qemu-system-x86_64:vhost VQ 3 ring restore failed: -1: Operation not permitted (1)
> >
> > Fixes: b6662cb7 ("vdpa: add vhost_vdpa->suspended parameter")
> >
> > Signed-off-by: Wafer Xie <wafer@jaguarmicro.com>
> > ---
> > hw/virtio/vhost-vdpa.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c
> > index 7061b6e1a3..2d5e6aca74 100644
> > --- a/hw/virtio/vhost-vdpa.c
> > +++ b/hw/virtio/vhost-vdpa.c
> > @@ -1481,7 +1481,7 @@ static int vhost_vdpa_get_vring_base(struct vhost_dev *dev,
> > return 0;
> > }
> >
> > - if (!v->suspended) {
> > + if (!v->suspended && vhost_vdpa_first_dev(dev)) {
>
> I'm sorry I missed this fix!
>
> Good catch, thank you very much! But the right fix is to move
> v->suspended to v->shared, and then all the vhost_vdpa devices cannot
> have different suspended states.
>
> Apart from that, please include the tag
>
> Fixes: 0bb302a9960a ("vdpa: add vhost_vdpa_suspend")
>
> In the patch description.
>
> Thanks!
Eugenio do you want to post the fix?
> > /*
> > * Cannot trust in value returned by device, let vhost recover used
> > * idx from guest.
> > --
> > 2.34.1
> >
next prev parent reply other threads:[~2026-02-03 13:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 12:50 [PATCH] vdpa: fix cannot get vring base when stopping a vhost-vdpa device with multiple queues Wafer Xie
2025-11-06 6:41 ` Jason Wang
2025-11-06 8:04 ` Eugenio Perez Martin
2026-02-03 13:40 ` Michael S. Tsirkin [this message]
2026-02-03 13:56 ` Eugenio Perez Martin
2026-02-03 16:22 ` Michael S. Tsirkin
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=20260203084017-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=angus.chen@jaguarmicro.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=wafer@jaguarmicro.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 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.