From nobody Mon Feb 9 11:29:30 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=1673544314; cv=none; d=zohomail.com; s=zohoarc; b=PvsMjYrGX9QB6gO7la/y/QVTDJ+QP6f6rzoraz8YNSK5CSNbXxrcS4Lk8WWVe089yg3jtPYifxw2ethb1DS2nr7hIg1MJ8K9CiIWlTekJsVDgnRh/XDyK6l8T2W+SjOL1sxqWq6aB6Ov5D/O0Yb4ywMEfXumFrRnVaB4LqG26B4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673544314; 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=WtglQDGt1tKSyIon9wCh+pG9fJLpZeGeDD6u2deNBw0=; b=fdaDHn7DKVUUSEEah8WrO4Ovc95e1580HuLYE6bTnAYnkTexkARH9pTnwBZ9KCgphu73aDovvFRF05BXK/0BkH2/HDEC+qvfko6WS2FXb9eYiqVLRMyNzh2Cls/Zo+pVI23+REJtlUGYTZlm7+UwVUOv6+77ORQxk/7fdnrrYCI= 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 1673544314840543.9437314899398; Thu, 12 Jan 2023 09:25:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pG1Jz-0006Z9-6J; Thu, 12 Jan 2023 12:24:59 -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 1pG1Jx-0006Xn-W1 for qemu-devel@nongnu.org; Thu, 12 Jan 2023 12:24:58 -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 1pG1Jw-0008F5-3c for qemu-devel@nongnu.org; Thu, 12 Jan 2023 12:24:57 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-507-Dh34RW00OsixZYPfxSxMeA-1; Thu, 12 Jan 2023 12:24:52 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 81404382C971; Thu, 12 Jan 2023 17:24:50 +0000 (UTC) Received: from eperezma.remote.csb (unknown [10.39.192.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5EC2D4078903; Thu, 12 Jan 2023 17:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673544295; 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=WtglQDGt1tKSyIon9wCh+pG9fJLpZeGeDD6u2deNBw0=; b=WrZZ9R7nlMwWYqUeG6MG9Z8eWiRUyqCv6ZOxeZngPF4lfXYsU5VpGB8CissuKR9UWlUj0y Ify4eS5mHa/CqfE2XPks2xDOeRHxrjn/lYCflbH5ldCx/lMfTTsYo9Ao5+RrZOoqXJmUNi B2aywGX9CaN0EGB4qmsooNTPCKBVbt4= X-MC-Unique: Dh34RW00OsixZYPfxSxMeA-1 From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: qemu-devel@nongnu.org Cc: si-wei.liu@oracle.com, Liuxiangdong , Zhu Lingshan , "Gonglei (Arei)" , alvaro.karsz@solid-run.com, Shannon Nelson , Laurent Vivier , Harpreet Singh Anand , Gautam Dawar , Stefano Garzarella , Cornelia Huck , Cindy Lu , Eli Cohen , Paolo Bonzini , "Michael S. Tsirkin" , Jason Wang , Stefan Hajnoczi , Parav Pandit Subject: [RFC v2 03/13] vdpa: copy cvq shadow_data from data vqs, not from x-svq Date: Thu, 12 Jan 2023 18:24:24 +0100 Message-Id: <20230112172434.760850-4-eperezma@redhat.com> In-Reply-To: <20230112172434.760850-1-eperezma@redhat.com> References: <20230112172434.760850-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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.129.124; envelope-from=eperezma@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: 1673544315388100003 This allows to passthrough or shadow the data depending on migration state in next patches. Signed-off-by: Eugenio P=C3=A9rez --- net/vhost-vdpa.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 75cca497c8..631424d9c4 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -412,7 +412,6 @@ static int vhost_vdpa_net_cvq_start(NetClientState *nc) s =3D DO_UPCAST(VhostVDPAState, nc, nc); v =3D &s->vhost_vdpa; =20 - v->shadow_data =3D s->always_svq; v->shadow_vqs_enabled =3D s->always_svq; s->vhost_vdpa.address_space_id =3D VHOST_VDPA_GUEST_PA_ASID; =20 @@ -482,6 +481,12 @@ out: v->iova_range.last); } =20 + /* + * Memory listener is registered against CVQ vhost device, but differe= nt + * ASID may enable individually SVQ. Let's copy data vqs value here. + */ + v->shadow_data =3D s0->vhost_vdpa.shadow_data; + r =3D vhost_vdpa_cvq_map_buf(&s->vhost_vdpa, s->cvq_cmd_out_buffer, vhost_vdpa_net_cvq_cmd_page_len(), false); if (unlikely(r < 0)) { --=20 2.31.1