From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F1E93E87842 for ; Tue, 3 Feb 2026 16:23:27 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vnJAl-0004Ma-OY; Tue, 03 Feb 2026 11:22:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vnJAj-0004Lb-UC for qemu-devel@nongnu.org; Tue, 03 Feb 2026 11:22:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vnJAi-0008J2-67 for qemu-devel@nongnu.org; Tue, 03 Feb 2026 11:22:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770135753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DAMrTRvKkncemIehLRAdN+PzjanyKU+JKO014ihsYJw=; b=MxnSolU4/ZiyW3DjTYkNUt/f14R3En/DkDO3TEVd1nehOmuJPDZWxwfBZXJGQ8GCwp9ko7 D6KkvwU+IWSVvlAuPlvc5C7YoWzZgEyOj1jHtqyndhZcSHQcoq5n8wsFJwoX1aXBCo+NRW 1jJrETyDdWivAbyA6Z+dFxFp9+JyzgU= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-201-q7dqPilLP7ukh841StsMtg-1; Tue, 03 Feb 2026 11:22:31 -0500 X-MC-Unique: q7dqPilLP7ukh841StsMtg-1 X-Mimecast-MFC-AGG-ID: q7dqPilLP7ukh841StsMtg_1770135751 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4806cd00e02so30688485e9.0 for ; Tue, 03 Feb 2026 08:22:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1770135750; x=1770740550; darn=nongnu.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=DAMrTRvKkncemIehLRAdN+PzjanyKU+JKO014ihsYJw=; b=I7xbcIu87nWkgVsEOBFcL4irsHiWflgKDqhNksGDO4u9f1vO62tQIJIif9EDi9HS9d kfZAwzfX1uVvm6kx/9bPkW3aHPmGD/X6IHgTh+6AlaaCrF19dxB04gTo8+W53De3zvxq Y06TJDgRgAjNaj7DvtuTXgfWOlW5xIqdINDmbZ66pj1P2wlvqoIDSgh0Dll1eNMVpy0P YsMRW6mAwUWMuPvjJZLb4X2AwN+/u9Qlq0HMNbtlPbUteZgqjudYsPft4EcLWxXhmc70 robtnuF0tImGy6VQMZKryARZTcsnV+KpY/4xQnhpDZreC4I2NyEBkj4/b8wgD0h3Sejh P9MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770135750; x=1770740550; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DAMrTRvKkncemIehLRAdN+PzjanyKU+JKO014ihsYJw=; b=ae7sLGWj/SKcM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b0:47a:94fc:d057 with SMTP id 5b1f17b1804b1-4830e923ff0mr2924205e9.2.1770135750373; Tue, 03 Feb 2026 08:22:30 -0800 (PST) X-Received: by 2002:a05:600c:3552:b0:47a:94fc:d057 with SMTP id 5b1f17b1804b1-4830e923ff0mr2923805e9.2.1770135749853; Tue, 03 Feb 2026 08:22:29 -0800 (PST) Received: from redhat.com (IGLD-80-230-34-155.inter.net.il. [80.230.34.155]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4830515381esm76643915e9.11.2026.02.03.08.22.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Feb 2026 08:22:29 -0800 (PST) Date: Tue, 3 Feb 2026 11:22:27 -0500 From: "Michael S. Tsirkin" To: Eugenio Perez Martin Cc: Wafer Xie , 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 Message-ID: <20260203112213-mutt-send-email-mst@kernel.org> References: <20251029125001.15086-1-wafer@jaguarmicro.com> <20260203084017-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Tue, Feb 03, 2026 at 02:56:19PM +0100, Eugenio Perez Martin wrote: > On Tue, Feb 3, 2026 at 2:40 PM Michael S. Tsirkin wrote: > > > > 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 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 > > > > --- > > > > 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? > > > > Wafer posted it some time ago, but I realize now it was posted with a > different subject: > > https://mail.gnu.org/archive/html/qemu-devel/2025-11/msg02947.html Oh right that one is tagged. Thanks!