Re: [PATCH 08/18] iommu: Introduce cache_invalidate API

2019-04-11 Thread Andriy Shevchenko
On Wed, Apr 10, 2019 at 02:21:31PM -0700, Jacob Pan wrote: > On Tue, 9 Apr 2019 20:37:55 +0300 > Andriy Shevchenko wrote: > > On Tue, Apr 09, 2019 at 09:43:28AM -0700, Jacob Pan wrote: > > > On Tue, 9 Apr 2019 13:07:18 +0300 > > > Andriy Shevchenko wrote: > &g

Re: [PATCH 08/18] iommu: Introduce cache_invalidate API

2019-04-09 Thread Andriy Shevchenko
On Tue, Apr 09, 2019 at 09:43:28AM -0700, Jacob Pan wrote: > On Tue, 9 Apr 2019 13:07:18 +0300 > Andriy Shevchenko wrote: > > On Mon, Apr 08, 2019 at 04:59:23PM -0700, Jacob Pan wrote: > > > +int iommu_cache_invalidate(struct iommu_domain *domain, str

Re: [PATCH 01/18] drivers core: Add I/O ASID allocator

2019-04-09 Thread Andriy Shevchenko
On Tue, Apr 09, 2019 at 07:53:08AM -0700, Paul E. McKenney wrote: > On Tue, Apr 09, 2019 at 01:30:30PM +0300, Andriy Shevchenko wrote: > > On Tue, Apr 09, 2019 at 03:04:36AM -0700, Christoph Hellwig wrote: > > > On Tue, Apr 09, 2019 at 01:00:49PM +0300, Andriy Shevchenko wrote:

Re: [PATCH 18/18] iommu/vt-d: Add svm/sva invalidate function

2019-04-09 Thread Andriy Shevchenko
On Mon, Apr 08, 2019 at 04:59:33PM -0700, Jacob Pan wrote: > When Shared Virtual Address (SVA) is enabled for a guest OS via > vIOMMU, we need to provide invalidation support at IOMMU API and driver > level. This patch adds Intel VT-d specific function to implement > iommu passdown invalidate API f

Re: [PATCH 15/18] iommu/vt-d: Add bind guest PASID support

2019-04-09 Thread Andriy Shevchenko
On Mon, Apr 08, 2019 at 04:59:30PM -0700, Jacob Pan wrote: > When supporting guest SVA with emulated IOMMU, the guest PASID > table is shadowed in VMM. Updates to guest vIOMMU PASID table > will result in PASID cache flush which will be passed down to > the host as bind guest PASID calls. > > For

Re: [PATCH 16/18] iommu: add max num of cache and granu types

2019-04-09 Thread Andriy Shevchenko
On Mon, Apr 08, 2019 at 04:59:31PM -0700, Jacob Pan wrote: Commit message? > Signed-off-by: Jacob Pan > --- > include/uapi/linux/iommu.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/uapi/linux/iommu.h b/include/uapi/linux/iommu.h > index 9344cbb..59569d6 100644 > --- a/in

Re: [PATCH 01/18] drivers core: Add I/O ASID allocator

2019-04-09 Thread Andriy Shevchenko
On Tue, Apr 09, 2019 at 03:04:36AM -0700, Christoph Hellwig wrote: > On Tue, Apr 09, 2019 at 01:00:49PM +0300, Andriy Shevchenko wrote: > > I think it makes sense to add a helper macro to rcupdate.h > > (and we have several cases in kernel that can utilize it) > > > >

Re: [PATCH 09/18] iommu/vt-d: Enlightened PASID allocation

2019-04-09 Thread Andriy Shevchenko
On Mon, Apr 08, 2019 at 04:59:24PM -0700, Jacob Pan wrote: > From: Lu Baolu > > If Intel IOMMU runs in caching mode, a.k.a. virtual IOMMU, the > IOMMU driver should rely on the emulation software to allocate > and free PASID IDs. The Intel vt-d spec revision 3.0 defines a > register set to suppor

Re: [PATCH 08/18] iommu: Introduce cache_invalidate API

2019-04-09 Thread Andriy Shevchenko
On Mon, Apr 08, 2019 at 04:59:23PM -0700, Jacob Pan wrote: > From: "Liu, Yi L" > > In any virtualization use case, when the first translation stage > is "owned" by the guest OS, the host IOMMU driver has no knowledge > of caching structure updates unless the guest invalidation activities > are tr

Re: [PATCH 05/18] iommu: introduce device fault data

2019-04-09 Thread Andriy Shevchenko
On Mon, Apr 08, 2019 at 04:59:20PM -0700, Jacob Pan wrote: > Device faults detected by IOMMU can be reported outside the IOMMU > subsystem for further processing. This patch introduces > a generic device fault data structure. > > The fault can be either an unrecoverable fault or a page request, >

Re: [PATCH 01/18] drivers core: Add I/O ASID allocator

2019-04-09 Thread Andriy Shevchenko
On Mon, Apr 08, 2019 at 04:59:16PM -0700, Jacob Pan wrote: > From: Jean-Philippe Brucker > > Some devices might support multiple DMA address spaces, in particular > those that have the PCI PASID feature. PASID (Process Address Space ID) > allows to share process address spaces with devices (SVA),

Re: [PATCH 00/18] Shared virtual address IOMMU and VT-d support

2019-04-09 Thread Andriy Shevchenko
On Mon, Apr 08, 2019 at 04:59:15PM -0700, Jacob Pan wrote: > Shared virtual address (SVA), a.k.a, Shared virtual memory (SVM) on Intel > platforms allow address space sharing between device DMA and applications. > SVA can reduce programming complexity and enhance security. > This series is intended