Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36947359rwd; Tue, 11 Jul 2023 07:38:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlE6QKCyIX4H7GAPSnQP0vHWJHOW/RVQKN/ZB0ILi5eNti4Qp6+mqw+V235sG1BQYjE+7eF+ X-Received: by 2002:a05:6512:3b20:b0:4fb:8a0a:31f2 with SMTP id f32-20020a0565123b2000b004fb8a0a31f2mr15207001lfv.69.1689086327995; Tue, 11 Jul 2023 07:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689086327; cv=none; d=google.com; s=arc-20160816; b=NEkmRA1tSNmra3ZdybJgMdMWCl7B2zYS/UKAXQ3duxlzGsaVJ5+NhjDt3pe87aWeTh 4HfqT1PfHB3V7b+ds+7Y9s8qBz3RdqBFDDI5bXRMVYVyODt5N9ULkPMUP+CNj9uQgw+2 Akbu2WRNB7wTyva7rKCHuAQG7o7SXBxdufu4kmalZvTxsxAM2svm4rCufMnJ4VcX3ZmN pEsMe3MTteJg3TjZTGhZjZBjEzRQQUu9qOoDjV/wPIHmaCkkH/xozonSELsMLH0l3HNg F7aN32evax4NVYbOSeNwsjUaCmnE3vwZXRppBX8k5clVfP8kVUgmtOgW6T/wj19zmJzM 4D/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=NY9zvWPkMIRBdIzQwvp51bTldJwjnkTeVv0DGYO1saU=; fh=YHL4zdKCUe9vNfD1QpdkYlOdLe3uyoF0aQpRAsexF9k=; b=JFhs7FuISI2KhEvvrGjGNtO36EmAtideWqWQo3+Xc/hd7phek/RgdJvLoeDUhwQAaz tBgFqJftL7IDDhdjZ8WFcb0XMY0XGTT76qhzY7Kw7e9yvtZ7trzJJe+KNoeq7K8ufaMx 8wMcnndXICLDT0Ii6PLtMsPB0NlQrHADop1QExEPYxohexHKv0mt5WJUUWpkNinQXRDz RtP8MY4tRwdXZtpkfzFJG/WLhfYXbqKqCpS9XqPOTfE7LnBH1e8yQVEgqOr53lTU/aYi SqFNSR3Vs+ehOsyw7ZorAD30hsW5o/Wkry6CECKs//E6C8JiwlFnQJBq/Ucag4RwR13e DCng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WpQi7eVG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a056402516800b0051e0d7a3fc9si2160023ede.37.2023.07.11.07.38.23; Tue, 11 Jul 2023 07:38:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WpQi7eVG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232948AbjGKOV6 (ORCPT + 99 others); Tue, 11 Jul 2023 10:21:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232756AbjGKOVo (ORCPT ); Tue, 11 Jul 2023 10:21:44 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D7EB1988 for ; Tue, 11 Jul 2023 07:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689085225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NY9zvWPkMIRBdIzQwvp51bTldJwjnkTeVv0DGYO1saU=; b=WpQi7eVGRaA8/Qsb3Hc8suoooFGLtYBtFTuJ/xaY69xEXdXq7AcX0brMbdxaUgmroc5Q1J beNnx+cp1r4Pk7G74cDMWxA+UJd1O6PCtNyrhVW1umXQy4nGy/i6hg8TsfLSrqUUkUoJ/W 60T+H5rEu496W+uLDbjKB3nPpbz3x3k= 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-190-owKJyGXMPSOsyC8L1C253A-1; Tue, 11 Jul 2023 10:20:22 -0400 X-MC-Unique: owKJyGXMPSOsyC8L1C253A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 52C1B28040B2; Tue, 11 Jul 2023 14:16:56 +0000 (UTC) Received: from [10.39.208.24] (unknown [10.39.208.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6434B40C2070; Tue, 11 Jul 2023 14:16:54 +0000 (UTC) Message-ID: <3a8073d5-dab4-ed13-2c53-84ed5093bacb@redhat.com> Date: Tue, 11 Jul 2023 16:16:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: Cindy Lu , jasowang@redhat.com, mst@redhat.com, xieyongji@bytedance.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org References: <20230628065919.54042-1-lulu@redhat.com> <20230628065919.54042-2-lulu@redhat.com> From: Maxime Coquelin Subject: Re: [RFC 1/4] vduse: Add the struct to save the vq reconnect info In-Reply-To: <20230628065919.54042-2-lulu@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Cindy, On 6/28/23 08:59, Cindy Lu wrote: > From: Your Name > > this struct is to save the reconnect info struct, in this > struct saved the page info that alloc to save the > reconnect info > > Signed-off-by: Cindy Lu > --- > drivers/vdpa/vdpa_user/vduse_dev.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c > index 26b7e29cb900..f845dc46b1db 100644 > --- a/drivers/vdpa/vdpa_user/vduse_dev.c > +++ b/drivers/vdpa/vdpa_user/vduse_dev.c > @@ -72,6 +72,12 @@ struct vduse_umem { > struct page **pages; > struct mm_struct *mm; > }; > +struct vdpa_reconnect_info { > + u32 index; > + phys_addr_t addr; > + unsigned long vaddr; > + phys_addr_t size; > +}; > > struct vduse_dev { > struct vduse_vdpa *vdev; > @@ -106,6 +112,7 @@ struct vduse_dev { > u32 vq_align; > struct vduse_umem *umem; > struct mutex mem_lock; > + struct vdpa_reconnect_info reconnect_info[64]; Why 64? Shouldn't it be part of struct vduse_virtqueue instead? > }; > > struct vduse_dev_msg {