From nobody Mon Feb 9 20:11:13 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1671628920; cv=none; d=zohomail.com; s=zohoarc; b=Ndj0qmWq40cOraWoZNYOsJxcQAS7Fd9A+kOo3EkcBYJ0X+HA+bq5ZNZAfsQ9kRIGywTDxDrpyKnE3xY3hFFnOxJSFFJuoMM7/Znfq81dMhyw7TUzwOK7zzL4Aa8JqwWxLs4/gWrCPeQWkVOVdM9fgaU6weMhvcwkOhwsHZi5Lsk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1671628920; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jrop8WBQ1pXXhoyeV49pfT1fm4W1BHZBWr999uexy2o=; b=jsYbYuMmSlejOVW+Lvp0HGEPS3Jl+rUQvrIRVuKWZ3uEHA36GrBUxSVXOzH2HYyzoJk8hubgLrCSnBo6tiW7D6BduwDvhqj+ncJqL4TrKksVenzh9BQfB2pkcgRXXxSKI2TI8FVH5obOHFNbiRLJGryQbPmBK51putnKVTjo2Wo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1671628920875825.3626238246565; Wed, 21 Dec 2022 05:22:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7ynd-0006F1-8A; Wed, 21 Dec 2022 08:06:21 -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 1p7ynH-0005x4-Ls for qemu-devel@nongnu.org; Wed, 21 Dec 2022 08:06:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7yn7-0004K9-Kn for qemu-devel@nongnu.org; Wed, 21 Dec 2022 08:05:51 -0500 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-304-K1G5bsL1Po2p1i-UX8UbXA-1; Wed, 21 Dec 2022 08:05:42 -0500 Received: by mail-wr1-f71.google.com with SMTP id n12-20020adfc60c000000b0026647ef69f4so1052479wrg.10 for ; Wed, 21 Dec 2022 05:05:42 -0800 (PST) Received: from redhat.com ([2.52.8.61]) by smtp.gmail.com with ESMTPSA id n36-20020a05600c3ba400b003b49bd61b19sm2540236wms.15.2022.12.21.05.05.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Dec 2022 05:05:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671627944; 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=jrop8WBQ1pXXhoyeV49pfT1fm4W1BHZBWr999uexy2o=; b=b/4YYsnf9NXoLyYBfZ/BW/kUTxVEKYNOYHIgaHBe7dWBHKJcaOg+46PMAnS1kurolnOxrB SE8u9F2RFiNOupuNvqW/tjcRN9Sxn0jHL3ipv4W1tnIFuFNqclaVbbO1d18/Pi2EYzo4FV hIHUTacYj3heBcgXjjgRv7eTSEMeQwA= X-MC-Unique: K1G5bsL1Po2p1i-UX8UbXA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jrop8WBQ1pXXhoyeV49pfT1fm4W1BHZBWr999uexy2o=; b=vSQFO6/EvLOWhzW2tYHY4OvKPnOJsAmahBZKTO5URiLKbFrWZngVEYxEVMF2nbkifv CQhqd5l4bg8owrgwLs8SvPwEAbH5qRnR4K5k+FEEBDTYs7lnIZ7/1RxCQ28TfSKa3d8l jQE8bTroS5d8ZCtt2dxBaooAGtcPvf8OYz8ek8xVte1KgNIAFmCOOlumw2nRRnLLHwOY tCT3Mxn25ehjgSXqgpO4Ciz5/Lu0laGa7Q32HvV/WeAOKj3EhYUpQ0amhqdVAL+2Cl5Q 9Q9Sy6Thc7DRnQPKg0PBNJ/lVe/mRngJ/nFm0Q5vgmYms/3WH5omGtAvn6XNsRHzTTcX IxbQ== X-Gm-Message-State: AFqh2kqT7nTN5I5ScJpHTxMrbuf/GNeZciwkh2z1D808l7K+MozS24k0 P4+b8GfZgq8A0ZvbcLu154ihoFXot5C4cDR6KF+G1QIruvjSFWR+408S+ZZuPYujCgnEfvk26vc gdhoADAkDXFN4OaobPNM8hhFxQuIKR2h/a7umh4M4qriLnCXX7BkYceFDFVf9 X-Received: by 2002:a05:600c:1604:b0:3d5:b222:20a with SMTP id m4-20020a05600c160400b003d5b222020amr1291177wmn.32.1671627940989; Wed, 21 Dec 2022 05:05:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXsK4MpYoFIYzHSdyHBm5isfxCeuqhuSsedAwnHjdRIFvfdoHvaIjKgGfvPu0Uv/Jz3TeKiJ7A== X-Received: by 2002:a05:600c:1604:b0:3d5:b222:20a with SMTP id m4-20020a05600c160400b003d5b222020amr1291157wmn.32.1671627940704; Wed, 21 Dec 2022 05:05:40 -0800 (PST) Date: Wed, 21 Dec 2022 08:05:38 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Eugenio =?utf-8?B?UMOpcmV6?= , Jason Wang Subject: [PULL 21/41] vdpa: store x-svq parameter in VhostVDPAState Message-ID: <20221221130339.1234592-22-mst@redhat.com> References: <20221221130339.1234592-1-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20221221130339.1234592-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.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, SPF_HELO_NONE=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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1671628922536100005 From: Eugenio P=C3=A9rez CVQ can be shadowed two ways: - Device has x-svq=3Don parameter (current way) - The device can isolate CVQ in its own vq group QEMU needs to check for the second condition dynamically, because CVQ index is not known before the driver ack the features. Since this is dynamic, the CVQ isolation could vary with different conditions, making it possible to go from "not isolated group" to "isolated". Saving the cmdline parameter in an extra field so we never disable CVQ SVQ in case the device was started with x-svq cmdline. Signed-off-by: Eugenio P=C3=A9rez Acked-by: Jason Wang Message-Id: <20221215113144.322011-11-eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- net/vhost-vdpa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index a592ee07ec..bff72717d0 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -38,6 +38,8 @@ typedef struct VhostVDPAState { void *cvq_cmd_out_buffer; virtio_net_ctrl_ack *status; =20 + /* The device always have SVQ enabled */ + bool always_svq; bool started; } VhostVDPAState; =20 @@ -568,6 +570,7 @@ static NetClientState *net_vhost_vdpa_init(NetClientSta= te *peer, =20 s->vhost_vdpa.device_fd =3D vdpa_device_fd; s->vhost_vdpa.index =3D queue_pair_index; + s->always_svq =3D svq; s->vhost_vdpa.shadow_vqs_enabled =3D svq; s->vhost_vdpa.iova_range =3D iova_range; s->vhost_vdpa.iova_tree =3D iova_tree; --=20 MST