From: "Tian, Kevin" Subject: RE: [RFC PATCH 2/7] iommu: Add share domain interface in iommu for spimdev Date: Thu, 2 Aug 2018 04:39:37 +0000 Message-ID: References: <20180801102221.5308-1-nek.in.cn@gmail.com> <20180801102221.5308-3-nek.in.cn@gmail.com> <20180802041547.GM160746@Turing-Arch-b> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Kenneth Lee , Herbert Xu , "kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Jonathan Corbet , Greg Kroah-Hartman , "linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "Kumar, Sanjay K" , Hao Fang , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linuxarm-hv44wF8Li93QT0dZR+AlfA@public.gmane.org" , Alex Williamson , Thomas Gleixner , "linux-crypto-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Philippe Ombredanne , Zaibo Xu , "David S . Miller" , "linux-accelerators-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org" To: Kenneth Lee Return-path: In-Reply-To: <20180802041547.GM160746@Turing-Arch-b> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: linux-crypto.vger.kernel.org > From: Kenneth Lee > Sent: Thursday, August 2, 2018 12:16 PM > > On Thu, Aug 02, 2018 at 03:17:03AM +0000, Tian, Kevin wrote: > > > From: Kenneth Lee > > > Sent: Wednesday, August 1, 2018 6:22 PM > > > > > > From: Kenneth Lee > > > > > > This patch add sharing interface for a iommu_group. The new interface: > > > > > > iommu_group_share_domain() > > > iommu_group_unshare_domain() > > > > > > can be used by some virtual iommu_group (such as iommu_group for > > > spimdev) > > > to share their parent's iommu_group. > > > > > > When the domain of the group is shared, it cannot be changed before > > > unshared. In the future, notification can be added if update is required. > > > > Is it necessary or just asking VFIO to use parent domain directly? > > > Even we add to VFIO, the iommu still need to be changed. We can move > the type1 > part to VFIO if we have agreement in RFC stage. We have similar consideration in IOMMU aware mdev series. Now we are inclined to avoid faked entity within IOMMU layer - leave to caller to figure out right physical entity for any IOMMU ops. That might be leveraged here too after we get a new version. Thanks Kevin