On Tue, 14 Apr 2020 10:13:04 -0700
Jacob Pan wrote:
> > > > In any of the proposed solutions, the
> > > > IOMMU driver is ultimately responsible for validating the user
> > > > data, so do we want vfio performing the copy_from_user() to an
> > &g
ta.
If argsz <= minsz, kernel can support the attach_table but must process
the data based on flags or config.
Does it make sense to you?
On Tue, 14 Apr 2020 17:05:55 +0200
Eric Auger wrote:
> From: Jacob Pan
>
> In virtualization use case, when a guest is assigned
> a PCI host dev
On Tue, 14 Apr 2020 10:13:58 -0600
Alex Williamson wrote:
> On Mon, 13 Apr 2020 22:05:15 -0700
> Jacob Pan wrote:
>
> > Hi Alex,
> > Thanks a lot for the feedback, my comments inline.
> >
> > On Mon, 13 Apr 2020 16:21:29 -0600
> > Alex Williamson wrote:
On Tue, 14 Apr 2020 01:11:07 -0700
Christoph Hellwig wrote:
> On Mon, Apr 13, 2020 at 01:41:57PM -0700, Jacob Pan wrote:
> > Hi All,
> >
> > Just a gentle reminder, any feedback on the options I listed below?
> > New ideas will be even better.
> >
> > Chr
Hi Alex,
Thanks a lot for the feedback, my comments inline.
On Mon, 13 Apr 2020 16:21:29 -0600
Alex Williamson wrote:
> On Mon, 13 Apr 2020 13:41:57 -0700
> Jacob Pan wrote:
>
> > Hi All,
> >
> > Just a gentle reminder, any feedback on the options I listed below?
Hi Jean,
Sorry for the delay, I have to do some research based on your feedback.
I also plan to document this in the next version.
On Tue, 7 Apr 2020 13:01:46 +0200
Jean-Philippe Brucker wrote:
> On Mon, Apr 06, 2020 at 08:33:53AM -0700, Jacob Pan wrote:
> > Hi Jean,
> >
&g
another use of
the version, it makes checking easy when a vIOMMU is launched.
Thanks,
Jacob
On Thu, 2 Apr 2020 11:36:04 -0700
Jacob Pan wrote:
> On Wed, 1 Apr 2020 05:32:21 +
> "Tian, Kevin" wrote:
>
> > > From: Jacob Pan
> > > Sent: Tuesday, March
On Thu, 9 Apr 2020 10:50:34 +0200
Auger Eric wrote:
> Hi Jacob,
>
> On 4/3/20 8:42 PM, 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 pat
Hi Eric,
Missed a few things in the last reply.
On Thu, 9 Apr 2020 09:41:32 +0200
Auger Eric wrote:
> > + intel_pasid_tear_down_entry(iommu, dev,
> > svm->pasid);
> intel_svm_unbind_mm() calls intel_flush_svm_range_dev(svm, sdev, 0,
> -1, 0); Don't we need to flush the (DEV-
Hi Eric,
On Thu, 9 Apr 2020 09:41:32 +0200
Auger Eric wrote:
> Hi Jacob,
>
> On 4/3/20 8:42 PM, 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 P
On Thu, 9 Apr 2020 16:50:58 +0200
Jean-Philippe Brucker wrote:
> > So unbind is coming anyway, the difference in handling in mmu
> > release notifier is whether we silently drop DMA fault vs.
> > reporting fault?
>
> What I meant is, between mmu release notifier and unbind(), we can't
> print
On Wed, 1 Apr 2020 16:00:06 +0200
Jean-Philippe Brucker wrote:
> On Wed, Mar 25, 2020 at 10:55:29AM -0700, Jacob Pan wrote:
> > IOASID users fit into the publisher-subscriber pattern, a system
> > wide blocking notifier chain can be used to inform subscribers of
> > st
On Thu, 9 Apr 2020 09:08:21 -0300
Jason Gunthorpe wrote:
> On Wed, Apr 08, 2020 at 04:48:02PM -0700, Jacob Pan wrote:
> > > Yes, this is the proper way, when the DMA is stopped and no use
> > > of the PASID remains then you can drop the mmu notifier and
> > > relea
On Thu, 9 Apr 2020 16:50:58 +0200
Jean-Philippe Brucker wrote:
> On Thu, Apr 09, 2020 at 07:14:24AM -0700, Jacob Pan wrote:
> > On Thu, 9 Apr 2020 08:39:05 +0200
> > Jean-Philippe Brucker wrote:
> >
> > > On Wed, Apr 08, 2020 at 04:48:02PM -0700, Jacob Pan wrote
On Thu, 9 Apr 2020 11:25:19 -0300
Jason Gunthorpe wrote:
> On Thu, Apr 09, 2020 at 07:14:24AM -0700, Jacob Pan wrote:
> > > When the process is killed, mm release can happen before fds are
> > > released. If you look at do_exit() in kernel/exit.c:
> > >
>
On Thu, 9 Apr 2020 08:39:05 +0200
Jean-Philippe Brucker wrote:
> On Wed, Apr 08, 2020 at 04:48:02PM -0700, Jacob Pan wrote:
> > On Wed, 8 Apr 2020 19:32:18 -0300
> > Jason Gunthorpe wrote:
> >
> > > On Wed, Apr 08, 2020 at 02:35:52PM -0700, Jacob Pan wrote:
On Wed, 8 Apr 2020 19:32:18 -0300
Jason Gunthorpe wrote:
> On Wed, Apr 08, 2020 at 02:35:52PM -0700, Jacob Pan wrote:
> > > On Wed, Apr 08, 2020 at 11:35:52AM -0700, Jacob Pan wrote:
> > > > Hi Jean,
> > > >
> > > > On Wed, 8 Apr 2020 16:
Hi Jason,
Thanks for the explanation, more comments/questions inline.
On Wed, 8 Apr 2020 16:02:26 -0300
Jason Gunthorpe wrote:
> On Wed, Apr 08, 2020 at 11:35:52AM -0700, Jacob Pan wrote:
> > Hi Jean,
> >
> > On Wed, 8 Apr 2020 16:04:25 +0200
> > J
iommu: Remove iommu_sva_ops::mm_exit()
>
> include/linux/iommu.h | 30 ---
> include/linux/uacce.h | 34 ++--
> drivers/iommu/iommu.c | 11 ---
> drivers/misc/uacce/uacce.c | 171
> +------
On Wed, 8 Apr 2020 15:07:22 +0200
Joerg Roedel wrote:
> On Fri, Apr 03, 2020 at 11:42:06AM -0700, Jacob Pan wrote:
> > Memory type related flags can be grouped together for one simple
> > check.
> >
> > ---
> > v9 renamed from EMT to MTS since these
On Sat, 28 Mar 2020 06:40:58 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Saturday, March 28, 2020 1:42 AM
> >
> > On Fri, 27 Mar 2020 09:54:11 +
> > "Tian, Kevin" wrote:
> >
> > > > From: Jacob Pan
> &
On Wed, 1 Apr 2020 15:47:45 +0200
Jean-Philippe Brucker wrote:
> On Wed, Mar 25, 2020 at 10:55:24AM -0700, Jacob Pan wrote:
> > IOASID set defines a group of IDs that share the same token. The
> > ioasid_set concept helps to do permission checking among users as
> >
Hi Jean,
On Wed, 1 Apr 2020 15:53:16 +0200
Jean-Philippe Brucker wrote:
> On Wed, Mar 25, 2020 at 10:55:26AM -0700, Jacob Pan wrote:
> > Bare metal SVA allocates IOASIDs for native process addresses. This
> > should be separated from VM allocated IOASIDs thus under
file.
Improved flow in MTS handling suggested by Eric.
---
Signed-off-by: Jacob Pan
Signed-off-by: Liu, Yi L
---
drivers/iommu/intel-iommu.c | 25 -
drivers/iommu/intel-pasid.c | 246 +++-
drivers/iommu/intel-pasid.h | 12 +++
include/linux/intel
When Shared Virtual Memory is exposed to a guest via vIOMMU, scalable
IOTLB invalidation may be passed down from outside IOMMU subsystems.
This patch adds invalidation functions that can be used for additional
translation cache types.
Signed-off-by: Jacob Pan
---
v9 -> v10:
Fix off by 1
4 & 5 from v10.
---
Signed-off-by: Jacob Pan
Signed-off-by: Lu Baolu
---
drivers/iommu/intel-pasid.c | 34 --
1 file changed, 24 insertions(+), 10 deletions(-)
diff --git a/drivers/iommu/intel-pasid.c b/drivers/iommu/intel-pasid.c
index 22b30f10b396..66c
- Integrated with Eric Auger's new v7 series for common APIs
(https://github.com/eauger/linux/tree/v5.1-rc3-2stage-v7)
- Addressed review comments from Andy Shevchenko and Alex Williamson
on
IOASID custom allocator.
- Support multiple custom IOASID allocators (vIOMMUs)
Virtual command registers are used in the guest only, to prevent
vmexit cost, we cache the capability and store it during initialization.
Signed-off-by: Jacob Pan
Reviewed-by: Eric Auger
Reviewed-by: Lu Baolu
---
v7 Reviewed by Eric & Baolu
---
Signed-off-by: Jacob Pan
---
drivers/i
Move domain helper to header to be used by SVA code.
Signed-off-by: Jacob Pan
Reviewed-by: Eric Auger
Reviewed-by: Kevin Tian
---
drivers/iommu/intel-iommu.c | 6 --
include/linux/intel-iommu.h | 6 ++
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/intel
review fixed in v10
---
Signed-off-by: Jacob Pan
Signed-off-by: Ashok Raj
Signed-off-by: Liu, Yi L
---
drivers/iommu/intel-iommu.c | 158
1 file changed, 158 insertions(+)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index
s the enlightened PASID allocation/free interfaces
via the virtual command interface.
Cc: Ashok Raj
Cc: Jacob Pan
Signed-off-by: Liu Yi L
Signed-off-by: Lu Baolu
Signed-off-by: Jacob Pan
Reviewed-by: Eric Auger
Reviewed-by: Kevin Tian
---
drivers/iommu/intel-pasid.c
Memory type related flags can be grouped together for one simple check.
---
v9 renamed from EMT to MTS since these are memory type support flags.
---
Reviewed-by: Eric Auger
Signed-off-by: Jacob Pan
---
include/uapi/linux/iommu.h | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff
PASID namespace is system-
wide.
Signed-off-by: Lu Baolu
Signed-off-by: Liu, Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/intel-iommu.c | 84 +
include/linux/intel-iommu.h | 2 ++
2 files changed, 86 insertions(+)
diff --git a/drivers/iommu/intel
empty. Use rate limited error message since
the bind gpasid call comes from user space.
---
Signed-off-by: Jacob Pan
Signed-off-by: Liu, Yi L
---
drivers/iommu/intel-iommu.c | 4 +
drivers/iommu/intel-svm.c | 206
include/linux/intel-iommu.h
gt; IOMMU
> > cache
> > > correctness.
> > >
> > > With this patch, vSVA (Virtual Shared Virtual Addressing) can be
> > > used safely as the host IOMMU iotlb correctness are ensured.
> > >
> > > Cc: Kevin Tian
> > >
On Thu, 2 Apr 2020 02:18:45 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Wednesday, April 1, 2020 11:48 PM
> >
> > On Sat, 28 Mar 2020 10:22:41 +
> > "Tian, Kevin" wrote:
> >
> > > > From: Jacob Pan
>
On Wed, 1 Apr 2020 05:32:21 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Tuesday, March 31, 2020 11:55 PM
> >
> > On Tue, 31 Mar 2020 06:06:38 +
> > "Tian, Kevin" wrote:
> >
> > > > From: Jacob Pan
>
On Thu, 2 Apr 2020 14:26:33 +0200
Jean-Philippe Brucker wrote:
> On Wed, Apr 01, 2020 at 04:38:42PM -0700, Jacob Pan wrote:
> > On Wed, 1 Apr 2020 16:03:01 +0200
> > Jean-Philippe Brucker wrote:
> >
> > > Hi Jacob,
> > >
> > > On Wed, M
On Wed, 1 Apr 2020 09:32:37 +0200
Auger Eric wrote:
> > I didn’t read through all comments. Here is a concern with this 2-D
> > table, the iommu cache type is defined as below. I suppose there is
> > a problem here. If I'm using IOMMU_CACHE_INV_TYPE_PASID, it will
> > beyond the 2-D table.
> >
>
On Wed, 1 Apr 2020 16:03:01 +0200
Jean-Philippe Brucker wrote:
> Hi Jacob,
>
> On Wed, Mar 25, 2020 at 10:55:21AM -0700, Jacob Pan wrote:
> > IOASID was introduced in v5.5 as a generic kernel allocator service
> > for both PCIe Process Address Space ID (PASID) and ARM SMM
Hi Jean,
On Wed, 1 Apr 2020 15:45:52 +0200
Jean-Philippe Brucker wrote:
> On Wed, Mar 25, 2020 at 10:55:22AM -0700, Jacob Pan wrote:
> > IOASID is a limited system-wide resource that can be allocated at
> > runtime. This limitation can be enumerated during boot. For
>
On Wed, 1 Apr 2020 15:55:25 +0200
Jean-Philippe Brucker wrote:
> On Wed, Mar 25, 2020 at 10:55:27AM -0700, Jacob Pan wrote:
> > The current ioasid_alloc function takes a token/ioasid_set then
> > record it on the IOASID being allocated. There is no alloc/free on
> > the ioas
On Sun, 29 Mar 2020 13:35:15 +0200
Auger Eric wrote:
> Hi Jacob,
>
> On 3/21/20 12:27 AM, Jacob Pan wrote:
> > Nested translation mode is supported in VT-d 3.0 Spec.CH 3.8.
> > With PASID granular translation type set to 0x11b, translation
> > result from the first
On Tue, 31 Mar 2020 03:43:39 +
"Tian, Kevin" wrote:
> > > > struct intel_svm_dev {
> > > > @@ -698,9 +700,13 @@ struct intel_svm_dev {
> > > > struct intel_svm {
> > > > struct mmu_notifier notifier;
> > > > struct mm_struct *mm;
> > > > +
> > > > struct intel_iommu
On Wed, 1 Apr 2020 09:32:37 +0200
Auger Eric wrote:
> >> devtlb
> >> descriptor, that is why Eric suggests {0, 0, 1}.
> >
> > I think it should be {0, 0, 1} :-) addr field and S field are must,
> > pasid field depends on G bit.
>
> On my side, I understood from the spec that addr/S are alwa
On Wed, 1 Apr 2020 06:57:42 +
"Liu, Yi L" wrote:
> > From: Tian, Kevin
> > Sent: Wednesday, April 1, 2020 2:24 PM
> > To: Jacob Pan
> > Subject: RE: [PATCH V10 08/11] iommu/vt-d: Add svm/sva invalidate
> > function
> > > From: Jacob
On Sat, 28 Mar 2020 10:22:41 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Saturday, March 21, 2020 7:28 AM
> >
> > When VT-d driver runs in the guest, PASID allocation must be
> > performed via virtual command interface. This patch regis
On Sat, 28 Mar 2020 10:08:52 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Saturday, March 21, 2020 7:28 AM
> >
> > From: Lu Baolu
> >
> > Enabling IOMMU in a guest requires communication with the host
> > driver for certa
On Sat, 28 Mar 2020 10:04:38 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Saturday, March 21, 2020 7:28 AM
> >
> > Virtual command registers are used in the guest only, to prevent
> > vmexit cost, we cache the capability and store it during
On Sun, 29 Mar 2020 18:05:47 +0200
Auger Eric wrote:
> Hi Jacob,
>
> On 3/21/20 12:27 AM, 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.
On Tue, 31 Mar 2020 03:34:22 +
"Tian, Kevin" wrote:
> > From: Auger Eric
> > Sent: Monday, March 30, 2020 12:05 AM
> >
> > On 3/28/20 11:01 AM, Tian, Kevin wrote:
> > >> From: Jacob Pan
> > >> Sent: Saturday, March 21, 2020
On Tue, 31 Mar 2020 02:49:21 +
"Tian, Kevin" wrote:
> > From: Auger Eric
> > Sent: Sunday, March 29, 2020 11:34 PM
> >
> > Hi,
> >
> > On 3/28/20 11:01 AM, Tian, Kevin wrote:
> > >> From: Jacob Pan
> > >> Sent: Satu
On Sat, 28 Mar 2020 10:01:42 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Saturday, March 21, 2020 7:28 AM
> >
> > When Shared Virtual Address (SVA) is enabled for a guest OS via
> > vIOMMU, we need to provide invalidation support at IOMMU A
On Mon, 30 Mar 2020 16:28:34 -0700
Jacob Pan wrote:
> On Fri, 27 Mar 2020 15:46:23 +0100
> Auger Eric wrote:
>
> > Hi Jacob,
> >
> > On 3/21/20 12:27 AM, Jacob Pan wrote:
> > > When Shared Virtual Memory is exposed to a guest via vIOMMU,
> > > s
ignore this, sorry about the confusion.
On Tue, 31 Mar 2020 11:28:17 +0200
Auger Eric wrote:
> Hi Jacob,
>
> On 3/31/20 1:25 AM, Jacob Pan wrote:
> > PASID cache type and shift of granularity bits are missing in
> > the current code.
> >
> > Fixes: 6f7db75e1c46 (&
On Tue, 31 Mar 2020 06:06:38 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Tuesday, March 31, 2020 12:08 AM
> >
> > On Mon, 30 Mar 2020 05:40:40 +
> > "Tian, Kevin" wrote:
> >
> > > > From: Jacob Pan
>
On Sat, 28 Mar 2020 06:43:37 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Saturday, March 28, 2020 2:37 AM
> >
> > On Fri, 27 Mar 2020 10:03:26 +
> > "Tian, Kevin" wrote:
> >
> > > > From: Jacob Pan
&
On Fri, 27 Mar 2020 15:46:23 +0100
Auger Eric wrote:
> Hi Jacob,
>
> On 3/21/20 12:27 AM, Jacob Pan wrote:
> > When Shared Virtual Memory is exposed to a guest via vIOMMU,
> > scalable IOTLB invalidation may be passed down from outside IOMMU
> > subsystems. T
PASID cache type and shift of granularity bits are missing in
the current code.
Fixes: 6f7db75e1c46 ("iommu/vt-d: Add second level page table
interface")
Cc: Eric Auger
Signed-off-by: Jacob Pan
---
drivers/iommu/intel-pasid.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
On Sun, 29 Mar 2020 15:40:22 +0200
Auger Eric wrote:
> Hi,
>
> On 3/21/20 12:27 AM, 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
On Sat, 28 Mar 2020 08:02:01 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Saturday, March 21, 2020 7:28 AM
> >
> > When supporting guest SVA with emulated IOMMU, the guest PASID
> > table is shadowed in VMM. Updates to guest vIOMMU PASID ta
On Sun, 29 Mar 2020 16:03:36 +0800
Lu Baolu wrote:
> On 2020/3/27 20:21, Tian, Kevin wrote:
> >> From: Jacob Pan
> >> Sent: Saturday, March 21, 2020 7:28 AM
> >>
> >> Nested translation mode is supported in VT-d 3.0 Spec.CH 3.8.
> >
> >
On Sun, 29 Mar 2020 15:20:55 +0800
Lu Baolu wrote:
> On 2020/3/27 19:53, Tian, Kevin wrote:
> >> From: Jacob Pan
> >> Sent: Saturday, March 21, 2020 7:28 AM
> >>
> >> Signed-off-by: Jacob Pan
> >
> > could you elaborate in which scenario t
On Mon, 30 Mar 2020 05:40:40 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Saturday, March 28, 2020 7:54 AM
> >
> > On Fri, 27 Mar 2020 00:47:02 -0700
> > Christoph Hellwig wrote:
> >
> > > On Fri, Mar 27, 2020 at 02:49:55AM
On Fri, 27 Mar 2020 00:47:02 -0700
Christoph Hellwig wrote:
> On Fri, Mar 27, 2020 at 02:49:55AM +, Tian, Kevin wrote:
> > If those API calls are inter-dependent for composing a feature
> > (e.g. SVA), shouldn't we need a way to check them together before
> > exposing the feature to the guest
On Fri, 27 Mar 2020 10:22:57 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Thursday, March 26, 2020 1:56 AM
> >
> > In bare metal SVA, IOMMU driver ensures that IOASID free call
> > always comes after IOASID unbind operation.
> >
>
On Fri, 27 Mar 2020 10:09:04 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Thursday, March 26, 2020 1:56 AM
> >
> > IOASID set is allocated with an initial quota, at runtime there may
> > be needs to balance IOASID resources among differ
On Fri, 27 Mar 2020 10:03:26 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Thursday, March 26, 2020 1:55 AM
> >
> > IOASID users fit into the publisher-subscriber pattern, a system
> > wide blocking notifier chain can be used to inform su
On Fri, 27 Mar 2020 09:54:11 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Thursday, March 26, 2020 1:55 AM
> >
> > The current ioasid_alloc function takes a token/ioasid_set then
> > record it on the IOASID being allocated. Ther
On Fri, 27 Mar 2020 09:41:55 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Thursday, March 26, 2020 1:55 AM
> >
> > Bare metal SVA allocates IOASIDs for native process addresses. This
> > should be separated from VM allocated IOASIDs thus
On Fri, 27 Mar 2020 08:38:44 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Thursday, March 26, 2020 1:55 AM
> >
> > IOASID set defines a group of IDs that share the same token. The
> > ioasid_set concept helps to do permission checkin
On Fri, 27 Mar 2020 08:07:20 +
"Tian, Kevin" wrote:
> > From: Jacob Pan
> > Sent: Thursday, March 26, 2020 1:55 AM
> >
> > IOASID is a limited system-wide resource that can be allocated at
> > runtime. This limitation can be enumerated during boot
Hi Baolu,
On Thu, 26 Mar 2020 10:12:36 +0800
Lu Baolu wrote:
> On 2020/3/26 1:55, Jacob Pan wrote:
> > IOASID set defines a group of IDs that share the same token. The
> > ioasid_set concept helps to do permission checking among users as
> > in the current code.
> >
Hi Christoph,
Thanks for the review. Please see my comments inline.
On Thu, 26 Mar 2020 02:23:16 -0700
Christoph Hellwig wrote:
> On Wed, Mar 25, 2020 at 04:17:05PM -0700, Jacob Pan wrote:
> > Having a single UAPI version to govern the user-kernel data
> > structures makes comp
extension rules that disallows adding new members at the end
of each UAPI data structures. Only padding bytes and union can be extended.
Clarified size look up array extension rules with examples.
Thanks,
Jacob
Jacob Pan (3):
iommu/uapi: Define uapi version and capabilities
iommu/uapi
lookup with
version and type as input arguments.
---
v2: Clarify size lookup array extension rules, backfill -EINVAL
if new version introduce new union members.
---
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/iommu.c | 72
Reuse UAPI version for each UAPI data structure.
This is to avoid supporting multiple version combinations, simplify
support model as we bump up the versions.
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/intel-iommu.c | 3 ++-
drivers/iommu/intel-svm.c | 2 +-
drivers
between user and kernel.
---
v2: Rewrite extension rules to disallow adding new members. Use padding
and union extensions only.
---
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
Link: https://lkml.org/lkml/2020/2/3/1126
---
include/uapi/linux/iommu.h | 53
processes.
Signed-off-by: Jacob Pan
---
drivers/iommu/intel-iommu.c | 8 +++-
drivers/iommu/ioasid.c | 9 +
include/linux/ioasid.h | 9 +
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index
driver gets notified when IOASID is freed by VFIO or core mm code
such that PASID context can be cleaned up.
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 61 ++
include/linux/ioasid.h | 40
IOASID set refers to a group of IOASIDs that shares the same token.
ioasid_set_data() function is used to attach a private data to an IOASID,
rename it to ioasid_attach_data() avoid being confused with the group/set
concept.
Signed-off-by: Jacob Pan
---
drivers/iommu/intel-svm.c | 11
register as defined in the VT-d spec.
This patch adds a helper to set the system capacity, it expected to be
set during boot prior to any allocation request.
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 15 +++
include/linux/ioasid.h | 5 -
2 files changed, 19 insertions
IOASID set is allocated with an initial quota, at runtime there may be
needs to balance IOASID resources among different VMs/sets.
This patch adds a new API to adjust per set quota.
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 44
include
operations.
This patch converts allocator lock from spinlock to mutex in preparation
for IOASID notifier.
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 45 +++--
1 file changed, 23 insertions(+), 22 deletions(-)
diff --git a/drivers/iommu/ioasid.c b
Assign system-wide PASID capacity with enumerated max value.
Currently, all Intel SVM capable devices should support full 20 bits of
PASID value.
Signed-off-by: Jacob Pan
---
drivers/iommu/intel-iommu.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/iommu/intel-iommu.c b
then be enforced.
This patch converts existing API to the new ioasid_set model.
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/intel-iommu.c | 10 +++---
drivers/iommu/intel-svm.c | 10 +++---
drivers/iommu/ioasid.c | 78
send notification on an IOASID with one of the commands (FREE,
BIND/UNBIND, etc.), use:
- int ioasid_notify(ioasid_t id, enum ioasid_notify_val cmd);
This work is a result of collaboration with many people:
Liu, Yi L
Wu Hao
Ashok Raj
Kevin Tian
Thanks,
Jacob
Jacob Pan (10):
iommu/i
.
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 147 +
include/linux/ioasid.h | 13 +
2 files changed, 160 insertions(+)
diff --git a/drivers/iommu/ioasid.c b/drivers/iommu/ioasid.c
index 4026e52855b9..27ee57f7079b
such that VT-d driver
can take action to clean up PASID context and data.
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/intel-svm.c | 68 -
include/linux/intel-iommu.h | 1 +
2 files changed, 68 insertions(+), 1 deletion(-)
diff
On Fri, 20 Mar 2020 10:29:55 +0100
Jean-Philippe Brucker wrote:
> Hi Jacob,
>
> I think this step is really useful and the patch looks good overall,
> thanks for doing this. Some commments inline
>
> On Mon, Feb 24, 2020 at 03:26:37PM -0800, Jacob Pan wrote:
> > This
On Sat, 21 Mar 2020 09:32:45 +0800
Lu Baolu wrote:
> On 2020/3/21 0:20, Jacob Pan wrote:
> > On Fri, 20 Mar 2020 21:45:26 +0800
> > Lu Baolu wrote:
> >
> >> On 2020/3/20 12:32, Jacob Pan wrote:
> >>> IOTLB flush already included in the PASID te
On Sun, 22 Mar 2020 09:29:32 +0800
Lu Baolu wrote:
> On 2020/3/21 7:27, Jacob Pan wrote:
> > Memory type related flags can be grouped together for one simple
> > check.
> >
> > ---
> > v9 renamed from EMT to MTS since these are memory type support
> > f
ments from Andy Shevchenko and Alex Williamson
on
IOASID custom allocator.
- Support multiple custom IOASID allocators (vIOMMUs) and dynamic
registration.
Jacob Pan (10):
iommu/vt-d: Move domain helper to header
iommu/uapi: Define a mask for bind data
iommu/v
physical translation and
SL performs guest physical to host physical translation.
This patch adds a helper function for setting up nested translation
where second level comes from a domain and first level comes from
a guest PGD.
Signed-off-by: Jacob Pan
Signed-off-by: Liu, Yi L
---
drivers
| | |SL for GPA-HPA, default domain|
| | '--'
'-'
Where:
- FL = First level/stage one page tables
- SL = Second level/stage two page tables
Signed-off-by: Jacob Pan
Signed-off-by: Liu, Yi L
---
When Shared Virtual Memory is exposed to a guest via vIOMMU, scalable
IOTLB invalidation may be passed down from outside IOMMU subsystems.
This patch adds invalidation functions that can be used for additional
translation cache types.
Signed-off-by: Jacob Pan
---
v9 -> v10:
Fix off by 1
s the enlightened PASID allocation/free interfaces
via the virtual command interface.
Cc: Ashok Raj
Cc: Jacob Pan
Cc: Kevin Tian
Signed-off-by: Liu Yi L
Signed-off-by: Lu Baolu
Signed-off-by: Jacob Pan
Reviewed-by: Eric Auger
---
drivers/iommu/intel-pasid.c
device handle,
host IOMMU driver can replace certain fields before submit to the
invalidation queue.
---
v7 review fixed in v10
---
Signed-off-by: Jacob Pan
Signed-off-by: Ashok Raj
Signed-off-by: Liu, Yi L
---
drivers/iommu/intel-iommu.c | 182
1
PASID namespace is system-
wide.
Signed-off-by: Lu Baolu
Signed-off-by: Liu, Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/intel-iommu.c | 84 +
include/linux/intel-iommu.h | 2 ++
2 files changed, 86 insertions(+)
diff --git a/drivers/iommu/intel
Signed-off-by: Jacob Pan
---
drivers/iommu/intel-pasid.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/drivers/iommu/intel-pasid.c b/drivers/iommu/intel-pasid.c
index 22b30f10b396..191508c7c03e 100644
--- a/drivers/iommu/intel-pasid.c
+++ b/drivers/iommu/intel
501 - 600 of 1270 matches
Mail list logo