Re: [PATCH 03/37] iommu/sva: Manage process address spaces

2018-02-28 Thread Lu Baolu
Hi Jean, On 02/13/2018 02:33 AM, Jean-Philippe Brucker wrote: > Introduce boilerplate code for allocating IOMMU mm structures and binding > them to devices. Four operations are added to IOMMU drivers: > > * mm_alloc(): to create an io_mm structure and perform architecture- > specific operations

Re: Question on IOMMU indentity mapping for intel-iommu

2018-02-28 Thread Alexander Duyck
On Wed, Feb 28, 2018 at 7:15 PM, Tian, Kevin wrote: >> From: David Woodhouse >> Sent: Tuesday, February 27, 2018 3:48 PM >> >> On Mon, 2018-02-26 at 15:01 -0800, Alexander Duyck wrote: >> > I am interested in adding a new memory mapping option that >> > establishes >> > one

RE: Question on IOMMU indentity mapping for intel-iommu

2018-02-28 Thread Tian, Kevin
> From: David Woodhouse > Sent: Tuesday, February 27, 2018 3:48 PM > > On Mon, 2018-02-26 at 15:01 -0800, Alexander Duyck wrote: > > I am interested in adding a new memory mapping option that > > establishes > > one identity-mapped region for all DMA_TO_DEVICE mappings and > creates > > a new

RE: [PATCH 02/37] iommu/sva: Bind process address spaces to devices

2018-02-28 Thread Liu, Yi L
Hi Jean, > From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Thursday, February 15, 2018 8:41 PM > Subject: Re: [PATCH 02/37] iommu/sva: Bind process address spaces to devices > > On 13/02/18 23:34, Tian, Kevin wrote: > >> From: Jean-Philippe Brucker > >> Sent: Tuesday,

Re: [PATCH v5 08/13] iommu/rockchip: Control clocks needed to access the IOMMU

2018-02-28 Thread JeffyChen
Hi Robin, Thanks for your reply. On 02/28/2018 11:06 PM, Robin Murphy wrote: On 28/02/18 13:00, JeffyChen wrote: Hi Robin, Thanks for your reply. On 02/28/2018 12:59 AM, Robin Murphy wrote: the rockchip IOMMU is part of the master block in hardware, so it needs to control the master's

Re: [PATCH 02/37] iommu/sva: Bind process address spaces to devices

2018-02-28 Thread Sinan Kaya
On 2/12/2018 1:33 PM, Jean-Philippe Brucker wrote: > +int iommu_sva_unbind_group(struct iommu_group *group, int pasid) > +{ > + struct group_device *device; > + > + mutex_lock(>mutex); > + list_for_each_entry(device, >devices, list) > + iommu_sva_unbind_device(device->dev,

[GIT PULL] dma-mapping fixe for Linux 4.16

2018-02-28 Thread Christoph Hellwig
The following changes since commit a638af00b27266c09ab7ac69141e6f4ac6c00eff: Merge tag 'usb-4.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb (2018-02-22 12:13:01 -0800) are available in the git repository at: git://git.infradead.org/users/hch/dma-mapping.git

Re: [PATCH 37/37] vfio: Add support for Shared Virtual Addressing

2018-02-28 Thread Jean-Philippe Brucker
On 28/02/18 01:26, Sinan Kaya wrote: [...] >> +static int vfio_iommu_sva_init(struct device *dev, void *data) >> +{ > > data is not getting used. That's the pointer passed to "iommu_group_for_each_dev", NULL at the moment. Next version of this patch will keep some state in data to ensure one

Re: [PATCH 16/37] iommu: Add generic PASID table library

2018-02-28 Thread Jean-Philippe Brucker
On 27/02/18 18:51, Jacob Pan wrote: [...] >> +struct iommu_pasid_table_ops * >> +iommu_alloc_pasid_ops(enum iommu_pasid_table_fmt fmt, >> + struct iommu_pasid_table_cfg *cfg, void >> *cookie) +{ > I guess you don't need to pass in cookie here. The cookie is stored in the table

Re: [PATCH 01/37] iommu: Introduce Shared Virtual Addressing API

2018-02-28 Thread Jean-Philippe Brucker
On 27/02/18 06:21, Tian, Kevin wrote: [...] >> Technically nothing prevents it, but now the resv problem discussed on >> patch 2/37 stands out. For example on x86 you'd probably need to carve >> the >> IOAPIC MSI range out of the process address space. On Arm you'd need to >> create a write-only

Re: [PATCH 1/1] iommu/vt-d: Fix a potential memory leak

2018-02-28 Thread Jacob Pan
On Sat, 24 Feb 2018 13:42:27 +0800 Lu Baolu wrote: > A memory block was allocated in intel_svm_bind_mm() but never freed > in a failure path. This patch fixes this by free it to avoid memory > leakage. > looks good to me. Thanks, > Cc: Ashok Raj

Re: [PATCH v5 08/13] iommu/rockchip: Control clocks needed to access the IOMMU

2018-02-28 Thread Robin Murphy
On 28/02/18 13:00, JeffyChen wrote: Hi Robin, Thanks for your reply. On 02/28/2018 12:59 AM, Robin Murphy wrote: the rockchip IOMMU is part of the master block in hardware, so it needs to control the master's power domain and some of the master's clocks when access it's registers. and the

Re: [PATCH v5 08/13] iommu/rockchip: Control clocks needed to access the IOMMU

2018-02-28 Thread JeffyChen
Hi Robin, Thanks for your reply. On 02/28/2018 12:59 AM, Robin Murphy wrote: the rockchip IOMMU is part of the master block in hardware, so it needs to control the master's power domain and some of the master's clocks when access it's registers. and the number of clocks needed here, might be