Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4231699pxu; Mon, 12 Oct 2020 13:05:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/MLg/tWGc1h22ab27GZVgEOtApj71M0nfw4//nfGVglYy2kZpbC2MLoX21wdTHfMaGNvu X-Received: by 2002:a05:6402:945:: with SMTP id h5mr16433930edz.6.1602533113374; Mon, 12 Oct 2020 13:05:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602533113; cv=none; d=google.com; s=arc-20160816; b=o2ArJ+teJZxn1Bs7qZk9RpeaARhEnSa4GqAUJ+U5AQw+/rHofONfXo75KyjCgo61AD o+65CKSBJ656gNx8bTHSAYt/mn+M+hE6zyGqvNhzGNApfmIXJxVDldudHskuEZKRidrT UHkkcP/J4k4K9hVWoJWjJMI6JD861+25R0lQ0fj6I6gG7vIrALTlYfdk0s1t1NDKb+7E uipkX+UFSZfvZ/cpnV1eNvxZmz7iwTscxomC2gqnWpdN0IJwBAP5ixPOJx4MNMrC0jCt 3jeMoEK6rAzFGtIRaoFo+lGt9JvJgUjuDuL5AuWCvxm++OaIUrpq/VX/gQttHrTEhMHs 2daA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Kg9ecYgsKq8hj5s7dMs7IKjshYentJJrrOYixBkDd+g=; b=X47vCGy1l6dhPY2HptRGtTMyj7MyzElBHYduTOI1Z+KH9b3Bj1CFyztJ1Zprn1qlaz Q03PYcVjgX8bZaBOWSOi71kprir7B/XV2alR0t92sF9ldUxGAgTMeNFvZ0n8wnV74Vf5 /+0WFXH40p3+dLvZqFQlwhXbVtpkUADPIpYkyuJt6tS9B7RURXwesyZQVAI6MMmg4xfL DH4gmFCTDm01uPa1crLa11d/m1T4REsnDUG6vwEk3RQnxzxTa39lmyGta1Mjvg8QbvLF dGHL4fK0/q5vBaKlh/M1He3Uk423iFKjWkGj3FoeYtxm1J18I2qNzGOunUOi0hAaD5M6 YGIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=q2D7izcF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si12739561ejx.127.2020.10.12.13.04.49; Mon, 12 Oct 2020 13:05:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=q2D7izcF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726732AbgJLIRm (ORCPT + 99 others); Mon, 12 Oct 2020 04:17:42 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:19011 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbgJLIRm (ORCPT ); Mon, 12 Oct 2020 04:17:42 -0400 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Mon, 12 Oct 2020 01:16:43 -0700 Received: from mtl-vdi-166.wap.labs.mlnx (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 12 Oct 2020 08:17:29 +0000 Date: Mon, 12 Oct 2020 11:17:25 +0300 From: Eli Cohen To: Jason Wang CC: , , , , , , , , , , , , , , Subject: Re: [RFC PATCH 10/24] vdpa: introduce config operations for associating ASID to a virtqueue group Message-ID: <20201012081725.GB42327@mtl-vdi-166.wap.labs.mlnx> References: <20200924032125.18619-1-jasowang@redhat.com> <20200924032125.18619-11-jasowang@redhat.com> <20201001132927.GC32363@mtl-vdi-166.wap.labs.mlnx> <70af3ff0-74ed-e519-56f5-d61e6a48767f@redhat.com> <20201012065931.GA42327@mtl-vdi-166.wap.labs.mlnx> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (bf161cf53efb) (2018-04-13) X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1602490603; bh=Kg9ecYgsKq8hj5s7dMs7IKjshYentJJrrOYixBkDd+g=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To:User-Agent: X-Originating-IP:X-ClientProxiedBy; b=q2D7izcFRuCz8XdUQF8ATaarITInVRF7zWozqgfHXXGVRHcT/oRcJVQl4k7Z0KLwY DIOYlsCOHiEsnMM9z+CoLIbgdlFG2EU1kXqItA/5xetkRrfQqELTWtld0zm1O+yjHv ycVB8C/mFGz3+hJe56udPw86gqBx4J4KLPBiTS5sUUJbZa6FiV1vfN2vXxJLofRDk7 peUKbW0d4p3dB0DT2jJ9E6loyvejEAxy+XWWB+LNP7nzR7z/IkzcI8o5Emr48i/XJw tgxraQMDzAXV+F+lA6HmawnE4vTKA71DheAf73aDdOgKbdekd3p37xworK7+lvy9K3 r4dXPDjS3/A2A== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 12, 2020 at 03:45:10PM +0800, Jason Wang wrote: > > > > > So in theory we can have several asid's (for different virtqueues), each > > one should be followed by a specific set_map call. If this is so, how do > > I know if I met all the conditions run my driver? Maybe we need another > > callback to let the driver know it should not expect more set_maps(). > > > This should work similarly as in the past. Two parts of the work is expected > to be done by the driver: > > 1) store the mapping somewhere (e.g hardware) during set_map() > 2) associating mapping with a specific virtqueue > > The only difference is that more than one mapping is used now. ok, so like today, I will always get DRIVER_OK after I got all the set_maps(), right? > > For the issue of more set_maps(), driver should be always ready for the new > set_maps() call instead of not expecting new set_maps() since guest memory > topology could be changed due to several reasons. > > Qemu or vhost-vDPA will try their best to avoid the frequency of set_maps() > for better performance (e.g through batched IOTLB updating). E.g there > should be at most one set_map() during one time of guest booting. > > > > >