Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4236706ybb; Tue, 7 Apr 2020 03:34:17 -0700 (PDT) X-Google-Smtp-Source: APiQypK0YdZJXwLMftm5FQi0IvNYTCVvTaAcl1F4IaanqjmGOsyVjc6/uAaQDzle3whIq464n1nu X-Received: by 2002:a54:4094:: with SMTP id i20mr1061259oii.141.1586255657565; Tue, 07 Apr 2020 03:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586255657; cv=none; d=google.com; s=arc-20160816; b=y1axDMdXs1OFLXm2WR+SSBBkCatNi1o2mU7PFRkOs/RtWnduQRiMoa8fQDN0+tE0dw xtGPYGqoE2YD+33o3TY9EzAIHoK1BgwSU+Lzm9ijfvlrXpAbOEqP2MARNcG+TdePB8Q3 JQr1qkIf6G/sLXwJTMybWzkLs4VxgbpiFCLzwGnP17Q+G1EwvNZiwQSf6W5LFq45Sva8 TQc7C8BUcR+n+izHuOO4edrgMk1wk5c+RA+rNBw4LLf4Fp0bawCfKzdviTLSYbLaUmoq QaU893qa6FhZOPwkQ+vdKu9Tbr7nrRm7opYQyi6YBl6S7XF/iTn3v2esaN6Qj2q8JXIE aqOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=zHLl2SOJIusIslJRQmFLMCkK7IPS9idUSM7Y6gfqrdY=; b=MWeWpp7N8E2aqkj2VOx6e7djSwTYyp9OAsFqSgcIAQvPlNYfHi7KOaEreZR1YjxajE 5RvQzLhHUCPa3HwSLzpKWIsSv7hQtFR323u75HQi3DPxTs1Kk2QlxM/V8pw9+QFZ+ysA a1FiqNpPMJittT1A/2dsl6XzJtPcDSMP7GlRqMFSJUJyi+PIsKkT6JjeIw/wGGGmCWNM hsEUgn2aMG2V1Rrfj9c0gCC/Z+A65K+nOErfVPMCQXnb346oBmxanlPn8wvTJtojeKI9 A9RavvNI4Tgsv8sDfqKXeQWU8M2jJKT0u3RREMM6qEJX/7KljHvtU8PtAeA1btMzb8AM 9dqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13si508617oij.140.2020.04.07.03.34.05; Tue, 07 Apr 2020 03:34:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728306AbgDGKda convert rfc822-to-8bit (ORCPT + 99 others); Tue, 7 Apr 2020 06:33:30 -0400 Received: from mga01.intel.com ([192.55.52.88]:13947 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbgDGKd3 (ORCPT ); Tue, 7 Apr 2020 06:33:29 -0400 IronPort-SDR: FPFM3prjgIG1IJDrOPG1N/h4i3Na8ugc+3Gdw15sfP7Cd23WgOWP+b3ndHprKZp3Dfm/FB/LH9 Qh665Az/REQA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2020 03:33:29 -0700 IronPort-SDR: XpZt+O2iUSCoEK9yUeNSh7sumO7vG9vjSw8ex36zPLiZlE9N5cc8i5pG7TOakd9BQpVM6bly1l me/a5kPTscGw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,353,1580803200"; d="scan'208";a="361496130" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 07 Apr 2020 03:33:29 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 7 Apr 2020 03:33:28 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 7 Apr 2020 03:33:28 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 7 Apr 2020 03:33:28 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.7]) with mapi id 14.03.0439.000; Tue, 7 Apr 2020 18:33:25 +0800 From: "Liu, Yi L" To: Jean-Philippe Brucker CC: "Tian, Kevin" , "alex.williamson@redhat.com" , "eric.auger@redhat.com" , "jacob.jun.pan@linux.intel.com" , "joro@8bytes.org" , "Raj, Ashok" , "Tian, Jun J" , "Sun, Yi Y" , "peterx@redhat.com" , "iommu@lists.linux-foundation.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Wu, Hao" Subject: RE: [PATCH v1 6/8] vfio/type1: Bind guest page tables to host Thread-Topic: [PATCH v1 6/8] vfio/type1: Bind guest page tables to host Thread-Index: AQHWAEUdkW8K+/kg/06c7098DvJyv6hgm8wAgANYlCCAAK00AIAA6IawgAEUvACABu4SMA== Date: Tue, 7 Apr 2020 10:33:25 +0000 Message-ID: References: <1584880325-10561-1-git-send-email-yi.l.liu@intel.com> <1584880325-10561-7-git-send-email-yi.l.liu@intel.com> <20200403083407.GB1269501@myrica> In-Reply-To: <20200403083407.GB1269501@myrica> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jean, > From: Jean-Philippe Brucker < jean-philippe@linaro.org > > Sent: Friday, April 3, 2020 4:35 PM > Subject: Re: [PATCH v1 6/8] vfio/type1: Bind guest page tables to host > > On Thu, Apr 02, 2020 at 08:05:29AM +0000, Liu, Yi L wrote: > > > > > > static long vfio_iommu_type1_ioctl(void *iommu_data, > > > > > > default: > > > > > > return -EINVAL; > > > > > > } > > > > > > + > > > > > > + } else if (cmd == VFIO_IOMMU_BIND) { > > > > > > > > > > BIND what? VFIO_IOMMU_BIND_PASID sounds clearer to me. > > > > > > > > Emm, it's up to the flags to indicate bind what. It was proposed to > > > > cover the three cases below: > > > > a) BIND/UNBIND_GPASID > > > > b) BIND/UNBIND_GPASID_TABLE > > > > c) BIND/UNBIND_PROCESS > > > > > > > > So it's called VFIO_IOMMU_BIND. > > > > > > but aren't they all about PASID related binding? > > > > yeah, I can rename it. :-) > > I don't know if anyone intends to implement it, but SMMUv2 supports > nesting translation without any PASID support. For that case the name > VFIO_IOMMU_BIND_GUEST_PGTBL without "PASID" anywhere makes more sense. > Ideally we'd also use a neutral name for the IOMMU API instead of > bind_gpasid(), but that's easier to change later. I agree VFIO_IOMMU_BIND is somehow not straight-forward. Especially, it may cause confusion when thinking about VFIO_SET_IOMMU. How about using VFIO_NESTING_IOMMU_BIND_STAGE1 to cover a) and b)? And has another VFIO_BIND_PROCESS in future for the SVA bind case. Regards, Yi Liu