Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp238226ybb; Fri, 3 Apr 2020 01:37:19 -0700 (PDT) X-Google-Smtp-Source: APiQypIbRm2ujoFTyGLnWR6MwjcEg1S4lnoi/f3K8KZ6ZIXHSYEVQQ7P7tU1VX8YgW5sAYM8MHv5 X-Received: by 2002:aca:5317:: with SMTP id h23mr2245297oib.33.1585903039502; Fri, 03 Apr 2020 01:37:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585903039; cv=none; d=google.com; s=arc-20160816; b=fJexfVb5W2eGrP5EyPdpug3+D8PqlDphGCcb+8/2bQ22R8KH3tVYR676v50Ii+gag7 +7WVRVaQETeqUcCExzhtX/zskjbKThtYtZcwemo9qv5TcGhqIZTm4Mk8fsVz+iIfQPVM hOGvl0J2+TntZw7fQe67BATssjdsa4wEO8hUdt8EFVjRQ/atHHALVfddrzJ+U8rU/U19 m5bg0EUKzaPHIjgZlkGzgjHKjnUN649cMzJuQpizYpZC14E3riBIXBeBbB8/gCo4nSl9 jmFpFYapkBdun72qLHyQeAws0b8xp04vo3RsJqojdvMMN4iGFKkIcXW75nCA2sa3DYAO UYfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=gSDnBtalBGHCeLhjHixwG2yB0Zm9Uo7yHmAg2UgLWeU=; b=tNXrUwPtEbvsmAwfY1r99Afw1XilXw0ej96BdPW3E6Q3AvGCyB0kC1zTFdtmcL+P/f ywFOLn3hmB9SOSRQPChaEE7fde0zUl7YwLRUjzYKAH/bFFY7SMbpwmvU230WSEzQSBW4 +bBxn4VbZF0nGPJDtqgKuAkI0oVsJBGyiSP3P1o7q70NpX1TxOdJMeb652K3LNlUHLVx OL0phRIOhQfUmHFvuIb3nVgzU45KvTfygUffEV2S0Pbqefl/tlZtazGM6D4TR3gl7QQQ VjsJd7ITm13cUJSqBa6oBZ76a6MmJzNmd2i/RPl0zlpzGeIGPCdhJQr7LrzN5kH3uJ2q Kp5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t1GnrrkQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p204si3507608oib.241.2020.04.03.01.37.06; Fri, 03 Apr 2020 01:37:19 -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; dkim=pass header.i=@linaro.org header.s=google header.b=t1GnrrkQ; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390447AbgDCIfC (ORCPT + 99 others); Fri, 3 Apr 2020 04:35:02 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:44869 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727144AbgDCIfC (ORCPT ); Fri, 3 Apr 2020 04:35:02 -0400 Received: by mail-wr1-f66.google.com with SMTP id m17so7421607wrw.11 for ; Fri, 03 Apr 2020 01:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=gSDnBtalBGHCeLhjHixwG2yB0Zm9Uo7yHmAg2UgLWeU=; b=t1GnrrkQzojg5Ujx4Cx6gRfTF9IbKcMgckidZWrVxH8SZ3YPcQuVNqwXz9IWys1ocf nP0Sz58PeL/xyaexdo3oj5Xq17DXktK9Mr6F1pi2PG4PpETrWOhxupj3XMNEohVCevRI Zp0apcsoNnq2F3VYkJ318tjg0SZZN6xWy1Uj5Wh9Wqo5v/PQJhxiejM7ZwalDMNJtuAm 0yyXZPNqtRkAWhfOqoLIbeHsBGeSsvljtVT72J9o3BpItjmn9JDroP/om91tC2QEj5JB ow+FeIgaKGa5ajlJIWJtSD/y31uh8MQVhb961019Lf/9or27Z/oHAP0ZDm0A2bynuxMC QeaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gSDnBtalBGHCeLhjHixwG2yB0Zm9Uo7yHmAg2UgLWeU=; b=hby9brpr7n/K7JrSC2Gf+4SGaalXmnYmIjd9+G4tgUHLyIVMcHtOaz8QKyuC2JpS3Y CR1fsr3fZ9AQA4Us4F/aYVR8RlacZcYrmExnMTUIczeOTIGWXV/p35lxGyTXfFNrRhkT qIVOnJOpagYp3RP4XZKD1YgU/Pz6WENB2TfCWiSJyd1ANYPD/hVBa0mVCek0nAr4cHJg 1Z3uL9uZE6jQfztiyLDIQYG5UIiTi+2XX2by90dA1eHSrnZXnFz8ZBl99BWydjrvFkdg JjFNFcxsf0Ugm4Rbhp9RFbi7Y8z0smyokcqOYOshU9KUOeSxMtowQA+qvtfSwbBKo/2T csNA== X-Gm-Message-State: AGi0PuYA4sZgeYtmGzLkA7Z2ZjFrHjZ98LXDAgDW+Cv+7dqA9Km+UW2x 8Q3EMUSsyt3rO5K+7HQpnna50w== X-Received: by 2002:adf:b6a9:: with SMTP id j41mr5268509wre.70.1585902900172; Fri, 03 Apr 2020 01:35:00 -0700 (PDT) Received: from myrica ([2001:171b:226b:54a0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id m11sm10720712wmf.9.2020.04.03.01.34.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 01:34:59 -0700 (PDT) Date: Fri, 3 Apr 2020 10:34:52 +0200 From: Jean-Philippe Brucker To: Yi L Liu 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 Message-ID: <20200403083407.GB1269501@myrica> References: <1584880325-10561-1-git-send-email-yi.l.liu@intel.com> <1584880325-10561-7-git-send-email-yi.l.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, Jean