he generic code.
This patch replaces void* drvdata with a unsigned int flags parameter
and adjusts callers accordingly.
Link: https://lore.kernel.org/linux-iommu/YFhiMLR35WWMW%2FHu@myrica/
Suggested-by: Jean-Philippe Brucker
Signed-off-by: Jacob Pan
---
drivers/dma/idxd/cdev.c
in iommu_sva_alloc_pasid()
- keep generic supervisor flag separated from vt-d's SRE
- move flag declaration out of CONFIG_IOMMU_API
Jacob Pan (2):
iommu/sva: Tighten SVA bind API with explicit flags
iommu/sva: Remove mm parameter from SVA bind API
drivers/dma/idxd/cdev.c
/YFhiMLR35WWMW%2FHu@myrica/
Signed-off-by: Jacob Pan
---
drivers/dma/idxd/cdev.c | 2 +-
drivers/dma/idxd/init.c | 2 +-
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 9 +
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 3 +--
drivers
Hi Alex,
On Fri, 16 Apr 2021 09:45:47 -0600, Alex Williamson
wrote:
> On Fri, 16 Apr 2021 06:12:58 -0700
> Jacob Pan wrote:
>
> > Hi Jason,
> >
> > On Thu, 15 Apr 2021 20:07:32 -0300, Jason Gunthorpe
> > wrote:
> > > On Thu, Apr 15,
Hi Jason,
On Thu, 15 Apr 2021 20:07:32 -0300, Jason Gunthorpe wrote:
> On Thu, Apr 15, 2021 at 03:11:19PM +0200, Auger Eric wrote:
> > Hi Jason,
> >
> > On 4/1/21 6:03 PM, Jason Gunthorpe wrote:
> > > On Thu, Apr 01, 2021 at 02:08:17PM +, Liu, Yi L wrote:
> > >
> > >> DMA page faults
Hi Christoph,
On Thu, 15 Apr 2021 07:44:59 +0100, Christoph Hellwig
wrote:
> > *
> > * Returns 0 on success and < 0 on error.
> > @@ -28,6 +28,9 @@ int iommu_sva_alloc_pasid(struct mm_struct *mm,
> > ioasid_t min, ioasid_t max) int ret = 0;
> > ioasid_t pasid;
> >
> > + if (mm !=
Hi Christoph,
Thanks for the review.
On Thu, 15 Apr 2021 07:40:33 +0100, Christoph Hellwig
wrote:
> On Wed, Apr 14, 2021 at 08:27:56AM -0700, Jacob Pan wrote:
> > static int idxd_enable_system_pasid(struct idxd_device *idxd)
> > {
> > - int flags;
>
/YFhiMLR35WWMW%2FHu@myrica/
Signed-off-by: Jacob Pan
---
drivers/dma/idxd/cdev.c | 2 +-
drivers/dma/idxd/init.c | 2 +-
drivers/iommu/iommu-sva-lib.c | 11 +++
drivers/iommu/iommu.c | 20 +---
drivers/misc/uacce/uacce.c| 2 +-
include/linux/iommu.h
he generic code.
This patch replaces void* drvdata with a unsigned int flags parameter
and adjusts callers accordingly.
Link: https://lore.kernel.org/linux-iommu/YFhiMLR35WWMW%2FHu@myrica/
Suggested-by: Jean-Philippe Brucker
Signed-off-by: Jacob Pan
---
drivers/dma/idxd/cdev.c
appreciate
if someone could help with the testing on ARM.
Thanks,
Jacob
ChangeLog:
V2
- retained mm argument in iommu_sva_alloc_pasid()
- keep generic supervisor flag separated from vt-d's SRE
- move flag declaration out of CONFIG_IOMMU_API
Jacob Pan (2):
iommu/sva: Tighten
Hi Jean,
On Fri, 9 Apr 2021 11:03:05 -0700, Jacob Pan
wrote:
> > problems:
> >
> > * We don't have a use-case for binding the mm of a remote process (and
> > it's supposedly difficult for device drivers to do it securely). So
> > OK, we remove the mm argum
Hi Baolu,
Thanks for the view.
On Fri, 9 Apr 2021 20:24:22 +0800, Lu Baolu
wrote:
> Hi Jacob,
>
> On 2021/4/9 1:08, Jacob Pan wrote:
> > The void* drvdata parameter isn't really used in iommu_sva_bind_device()
> > API, the current IDXD code "borrows" the
Hi Jean-Philippe,
On Fri, 9 Apr 2021 12:22:21 +0200, Jean-Philippe Brucker
wrote:
> On Thu, Apr 08, 2021 at 10:08:55AM -0700, Jacob Pan wrote:
> > The void* drvdata parameter isn't really used in iommu_sva_bind_device()
> > API,
>
> Right, it used to be a cookie passed
Hi Lu,
On Fri, 9 Apr 2021 20:45:22 +0800, Lu Baolu
wrote:
> > -int iommu_sva_alloc_pasid(struct mm_struct *mm, ioasid_t min, ioasid_t
> > max) +int iommu_sva_alloc_pasid(ioasid_t min, ioasid_t max)
> > {
> > int ret = 0;
> > ioasid_t pasid;
> > + struct mm_struct *mm;
> >
> >
Hi Jean-Philippe,
On Fri, 9 Apr 2021 12:11:47 +0200, Jean-Philippe Brucker
wrote:
> On Thu, Apr 08, 2021 at 10:08:56AM -0700, Jacob Pan wrote:
> > diff --git a/drivers/iommu/iommu-sva-lib.c
> > b/drivers/iommu/iommu-sva-lib.c index bd41405..bd99f6b 100644
> > --- a/drivers/
/YFhiMLR35WWMW%2FHu@myrica/
Signed-off-by: Jacob Pan
---
drivers/dma/idxd/cdev.c | 2 +-
drivers/dma/idxd/init.c | 2 +-
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 6 ++---
drivers/iommu/iommu-sva-lib.c | 30
he generic code.
This patch replaces void* drvdata with a unsigned int flags parameter
and adjusts callers accordingly.
Link: https://lore.kernel.org/linux-iommu/YFhiMLR35WWMW%2FHu@myrica/
Suggested-by: Jean-Philippe Brucker
Signed-off-by: Jacob Pan
---
drivers/dma/idxd/cdev.c
Hi Jason,
On Wed, 31 Mar 2021 21:37:05 -0300, Jason Gunthorpe wrote:
> On Wed, Mar 31, 2021 at 04:46:21PM -0700, Jacob Pan wrote:
> > Hi Jason,
> >
> > On Wed, 31 Mar 2021 09:38:01 -0300, Jason Gunthorpe
> > wrote:
> > > > > Get rid of the ioasid se
Hi Jason,
On Wed, 31 Mar 2021 09:38:01 -0300, Jason Gunthorpe wrote:
> > > Get rid of the ioasid set.
> > >
> > > Each driver has its own list of allowed ioasids.
> [...]
>
> The /dev/ioasid FD replaces this security check. By becoming FD
> centric you don't need additional kernel
Hi Jason,
On Wed, 31 Mar 2021 15:33:24 -0300, Jason Gunthorpe wrote:
> On Wed, Mar 31, 2021 at 11:20:30AM -0700, Jacob Pan wrote:
> > Hi Jason,
> >
> > On Wed, 31 Mar 2021 14:31:48 -0300, Jason Gunthorpe
> > wrote:
> > > > > We should tr
Hi Jason,
On Wed, 31 Mar 2021 14:31:48 -0300, Jason Gunthorpe wrote:
> > > We should try to avoid hidden behind the scenes kernel
> > > interconnections between subsystems.
> > >
> > Can we? in case of exception. Since all these IOCTLs are coming from the
> > unreliable user space, we must
Hi Jason,
On Wed, 31 Mar 2021 09:28:05 -0300, Jason Gunthorpe wrote:
> On Tue, Mar 30, 2021 at 05:10:41PM -0700, Jacob Pan wrote:
> [...]
> [...]
> [...]
> > This requires the mdev driver to obtain a list of allowed
> > PASIDs(possibly during PASID bind time)
Hi Jason,
On Tue, 30 Mar 2021 10:43:13 -0300, Jason Gunthorpe wrote:
> > If two mdevs from the same PF dev are assigned to two VMs, the PASID
> > table will be shared. IOASID set ensures one VM cannot program another
> > VM's PASIDs. I assume 'secure context' is per VM when it comes to host
> >
Hi Guenter,
On Mon, 22 Mar 2021 10:53:38 -0700, Guenter Roeck
wrote:
> On Tue, Mar 02, 2021 at 02:13:57AM -0800, Jacob Pan wrote:
> > Write protect bit, when set, inhibits supervisor writes to the read-only
> > pages. In supervisor shared virtual addressing (SVA), wh
Hi Jason,
On Mon, 29 Mar 2021 13:31:47 -0300, Jason Gunthorpe wrote:
> On Wed, Mar 24, 2021 at 12:05:28PM -0700, Jacob Pan wrote:
>
> > > IMHO a use created PASID is either bound to a mm (current) at creation
> > > time, or it will never be bound to a mm and its page t
Hi Jason,
On Thu, 25 Mar 2021 14:16:45 -0300, Jason Gunthorpe wrote:
> On Thu, Mar 25, 2021 at 10:02:36AM -0700, Jacob Pan wrote:
> > Hi Jean-Philippe,
> >
> > On Thu, 25 Mar 2021 11:21:40 +0100, Jean-Philippe Brucker
> > wrote:
> >
> > > On Wed, M
Hi Jean-Philippe,
On Thu, 25 Mar 2021 11:21:40 +0100, Jean-Philippe Brucker
wrote:
> On Wed, Mar 24, 2021 at 03:12:30PM -0700, Jacob Pan wrote:
> > Hi Jason,
> >
> > On Wed, 24 Mar 2021 14:03:38 -0300, Jason Gunthorpe
> > wrote:
> > > On Wed, Mar 24, 2021
Hi Jason,
On Wed, 24 Mar 2021 14:03:38 -0300, Jason Gunthorpe wrote:
> On Wed, Mar 24, 2021 at 10:02:46AM -0700, Jacob Pan wrote:
> > > Also wondering about device driver allocating auxiliary domains for
> > > their private use, to do iommu_map/unmap on private PASIDs (a cl
Hi Jason,
On Mon, 22 Mar 2021 09:03:00 -0300, Jason Gunthorpe wrote:
> On Fri, Mar 19, 2021 at 11:22:21AM -0700, Jacob Pan wrote:
> > Hi Jason,
> >
> > On Fri, 19 Mar 2021 10:54:32 -0300, Jason Gunthorpe
> > wrote:
> > > On Fri, Mar 19, 2021 at 02:
Hi Jean-Philippe,
On Mon, 22 Mar 2021 10:24:00 +0100, Jean-Philippe Brucker
wrote:
> On Fri, Mar 19, 2021 at 11:22:21AM -0700, Jacob Pan wrote:
> > Hi Jason,
> >
> > On Fri, 19 Mar 2021 10:54:32 -0300, Jason Gunthorpe
> > wrote:
> > > On Fri, Mar 19, 202
Hi Vipin,
On Mon, 22 Mar 2021 11:54:39 -0700, Vipin Sharma wrote:
> On Fri, Mar 19, 2021 at 02:28:01PM -0700, Jacob Pan wrote:
> > On Thu, 4 Mar 2021 15:19:45 -0800, Vipin Sharma
> > wrote:
> > > +#ifndef _MISC_CGROUP_H_
> > > +#define _MISC_CGROUP_H_
Hi Vipin,
On Thu, 4 Mar 2021 15:19:45 -0800, Vipin Sharma wrote:
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * Miscellaneous cgroup controller.
> + *
> + * Copyright 2020 Google LLC
> + * Author: Vipin Sharma
> + */
> +#ifndef _MISC_CGROUP_H_
> +#define _MISC_CGROUP_H_
> +
nit: should
Hi Jason,
On Fri, 19 Mar 2021 10:54:32 -0300, Jason Gunthorpe wrote:
> On Fri, Mar 19, 2021 at 02:41:32PM +0100, Jean-Philippe Brucker wrote:
> > On Fri, Mar 19, 2021 at 09:46:45AM -0300, Jason Gunthorpe wrote:
> > > On Fri, Mar 19, 2021 at 10:58:41AM +0100, Jean-Philippe Brucker wrote:
> > >
Hi Jean-Philippe,
On Fri, 19 Mar 2021 10:58:41 +0100, Jean-Philippe Brucker
wrote:
> > Slightly off the title. As we are moving to use cgroup to limit PASID
> > allocations, it would be much simpler if we enforce on the current
> > task.
>
> Yes I think we should do that. Is there a problem
Hi Jean,
Slightly off the title. As we are moving to use cgroup to limit PASID
allocations, it would be much simpler if we enforce on the current task.
However, iommu_sva_alloc_pasid() takes an mm_struct pointer as argument
which implies it can be something other the the current task mm. So far
Hi Tejun,
On Mon, 15 Mar 2021 22:22:12 -0400, Tejun Heo wrote:
> On Mon, Mar 15, 2021 at 06:30:30PM -0700, Jacob Pan wrote:
> > I don't know if this is required. I thought utilities such as cgclassify
> > need to be supported.
> > " cgclassify - move runnin
Hi Tejun,
On Mon, 15 Mar 2021 19:54:36 -0400, Tejun Heo wrote:
> Hello,
>
> On Mon, Mar 15, 2021 at 04:40:12PM -0700, Jacob Pan wrote:
> > 2. then we want to move/migrate Process1 to cg_B. so we need uncharge
> > 10 of cg_A, charge 10 of cg_B
>
> So, what I don'
Hi Tejun,
On Mon, 15 Mar 2021 18:19:35 -0400, Tejun Heo wrote:
> Hello,
>
> On Mon, Mar 15, 2021 at 03:11:55PM -0700, Jacob Pan wrote:
> > > Migration itself doesn't have restrictions but all resources are
> > > distributed on the same hierarchy, so the controllers a
Hi Tejun,
On Sat, 13 Mar 2021 13:05:36 -0500, Tejun Heo wrote:
> Hello,
>
> On Sat, Mar 13, 2021 at 08:57:01AM -0800, Jacob Pan wrote:
> > Isn't PIDs controller doing the charge/uncharge? I was under the
> > impression that each resource can be independently charg
Hi Tejun,
On Sat, 13 Mar 2021 05:20:39 -0500, Tejun Heo wrote:
> On Fri, Mar 12, 2021 at 02:59:04PM -0800, Jacob Pan wrote:
> > Our primary goal is to limit the amount of IOASIDs that VMs can
> > allocate. If a VM is migrated to a different cgroup, I think we need to
>
Hi Vipin,
On Fri, 12 Mar 2021 13:15:14 -0800, Vipin Sharma wrote:
> On Fri, Mar 12, 2021 at 12:58:21PM -0800, Jacob Pan wrote:
> > Hi Vipin & Tejun,
> >
> > Sorry for the late reply, I sent from a different email address than I
> > intended. Please see my commen
Hi Vipin & Tejun,
Sorry for the late reply, I sent from a different email address than I
intended. Please see my comments inline.
On Thu, 4 Mar 2021 03:51:16 -0500, Tejun Heo wrote:
> Hello,
>
> On Wed, Mar 03, 2021 at 10:22:03PM -0800, Vipin Sharma wrote:
> > > I am trying to see if IOASIDs
Hi Jason,
Thanks for the review.
On Wed, 10 Mar 2021 15:23:01 -0400, Jason Gunthorpe wrote:
> On Sat, Feb 27, 2021 at 02:01:26PM -0800, Jacob Pan wrote:
>
> > +/* IOCTLs for IOASID file descriptor (/dev/ioasid) */
> > +
> > +/**
> > +
Hi Jean-Philippe,
On Fri, 5 Mar 2021 09:30:49 +0100, Jean-Philippe Brucker
wrote:
> On Thu, Mar 04, 2021 at 09:46:03AM -0800, Jacob Pan wrote:
> > Hi Jean-Philippe,
> >
> > On Thu, 4 Mar 2021 10:49:37 +0100, Jean-Philippe Brucker
> > wrote:
> >
> &g
Hi Jason,
On Thu, 4 Mar 2021 15:02:53 -0400, Jason Gunthorpe wrote:
> On Thu, Mar 04, 2021 at 11:01:44AM -0800, Jacob Pan wrote:
>
> > > For something like qemu I'd expect to put the qemu process in a cgroup
> > > with 1 PASID. Who cares what qemu us
Hi Jason,
On Thu, 4 Mar 2021 13:54:02 -0400, Jason Gunthorpe wrote:
> On Thu, Mar 04, 2021 at 09:46:03AM -0800, Jacob Pan wrote:
>
> > Right, I was assuming have three use cases of IOASIDs:
> > 1. host supervisor SVA (not a concern, just one init_mm to bind)
> > 2. h
Hi Jean-Philippe,
On Thu, 4 Mar 2021 10:49:37 +0100, Jean-Philippe Brucker
wrote:
> On Wed, Mar 03, 2021 at 04:02:05PM -0800, Jacob Pan wrote:
> > Hi Jacob,
> >
> > On Wed, 3 Mar 2021 13:17:26 -0800, Jacob Pan
> > wrote:
> >
> > > Hi Tejun,
>
Hi Vipin,
On Tue, 2 Mar 2021 00:17:05 -0800, Vipin Sharma wrote:
> +Migration and Ownership
> +~~~
> +
> +A miscellaneous scalar resource is charged to the cgroup in which it is
> used +first, and stays charged to that cgroup until that resource is
> freed. Migrating +a
Hi Jacob,
On Wed, 3 Mar 2021 13:17:26 -0800, Jacob Pan
wrote:
> Hi Tejun,
>
> On Wed, 3 Mar 2021 10:44:28 -0500, Tejun Heo wrote:
>
> > On Sat, Feb 27, 2021 at 02:01:23PM -0800, Jacob Pan wrote:
> > > IOASIDs are used to associate DMA requests with v
Hi Tejun,
On Wed, 3 Mar 2021 10:44:28 -0500, Tejun Heo wrote:
> On Sat, Feb 27, 2021 at 02:01:23PM -0800, Jacob Pan wrote:
> > IOASIDs are used to associate DMA requests with virtual address spaces.
> > They are a system-wide limited resource made available to the userspace
&
Eric Auger
> Cc: Alex Williamson
> Cc: Kevin Tian
> Cc: Jacob Pan
> Cc: Liu Yi L
> Cc: Lorenzo Pieralisi
> Cc: Shameerali Kolothum Thodi
> ---
> drivers/iommu/virtio-iommu.c | 95
> 1 file changed, 95 insertions(+)
>
&
is set.
Signed-off-by: Sanjay Kumar
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/pasid.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c
index 0cceaabc3ce6..0b7e0e726ade 100644
--- a/drivers/iommu/intel
Hi Baolu et al,
This is a collection of SVA-related fixes.
ChangeLog:
v2:
- For guest SVA, call pasid_set_wpe directly w/o checking host CR0.wp
(Review comments by Kevin T.)
- Added fixes tag
Thanks,
Jacob
Jacob Pan (4):
iommu/vt-d: Enable write protect
set FAULT_FLAG_REMOTE
to avoid faults when both SVM and PKEY are used.
References: commit 1b2ee1266ea6 ("mm/core: Do not enforce PKEY permissions on
remote mm access")
Reviewed-by: Raj Ashok
Acked-by: Lu Baolu
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/svm.c | 9 ++---
1 fi
responses.
Fixes: 1c4f88b7f1f92 ("iommu/vt-d: Shared virtual address in scalable
mode")
Acked-by: Lu Baolu
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/svm.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/i
of the supervisor PASID entry will be set to match CPU CR0.WP bit.
Signed-off-by: Sanjay Kumar
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/pasid.c | 3 +++
include/uapi/linux/iommu.h | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu
Hi Fenghua,
On Thu, 25 Feb 2021 22:17:11 +, Fenghua Yu wrote:
> Hi, Jean,
>
> On Wed, Feb 24, 2021 at 11:19:27AM +0100, Jean-Philippe Brucker wrote:
> > Hi Fenghua,
> >
> > [Trimmed the Cc list]
> >
> > On Mon, Jul 13, 2020 at 04:48:03PM -0700, Fenghua Yu wrote:
> > > When a new mm is
Signed-off-by: Jacob Pan
---
Documentation/admin-guide/cgroup-v1/index.rst | 1 +
.../admin-guide/cgroup-v1/ioasids.rst | 110 ++
2 files changed, 111 insertions(+)
create mode 100644 Documentation/admin-guide/cgroup-v1/ioasids.rst
diff --git a/Documentation/admin
From: Liu Yi L
I/O Address Space IDs (IOASIDs) is used to tag DMA requests to target
multiple DMA address spaces for physical devices. Its PCI terminology
is called PASID (Process Address Space ID). Platforms with PASID support
can provide PASID granularity DMA isolation, which is very useful
Once IOASIDs cgroup is active, we must consult the limitation set up
by the cgroups during allocation. Freeing IOASIDs also need to return
the quota back to the cgroup.
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
to the documentation:
Documentation/admin-guide/cgroup-v1/ioasids.rst
Signed-off-by: Jacob Pan
---
include/linux/cgroup_subsys.h | 4 +
include/linux/ioasid.h| 17 ++
init/Kconfig | 7 +
kernel/cgroup/Makefile| 1 +
kernel/cgroup/ioasids.c | 345
Now that IOASID core keeps track of the IOASID to mm_struct ownership in
the forms of ioasid_set with IOASID_SET_TYPE_MM token type, there is no
need to keep the same mapping in VT-d driver specific data. Native SVM
usage is not affected by the change.
Signed-off-by: Jacob Pan
---
drivers/iommu
registers IOASID notification handler such that IOMMU driver
can perform PASID teardown upon receiving an unexpected IOASID free
event.
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/iommu.c | 2 +
drivers/iommu/intel/svm.c | 109 +++-
include/linux/intel-iommu.h
among users to tear down their contexts.
Not all work can be handled in the atomic notifier handler. This patch
introduces a shared, ordered workqueue for all IOASID users who wish to
perform work asynchronously upon notification.
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 25
to the ioasid_set allocated with the
mm_struct pointer as a token.
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 37 +
drivers/iommu/iommu.c | 16 ++--
include/linux/ioasid.h | 6 ++
3 files changed, 57 insertions(+), 2
-by: Liu Yi L
Signed-off-by: Wu Hao
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 142 +
include/linux/ioasid.h | 18 ++
2 files changed, 160 insertions(+)
diff --git a/drivers/iommu/ioasid.c b/drivers/iommu/ioasid.c
index 56577e745c4b
/ioasid.rst.
Signed-off-by: Liu Yi L
Signed-off-by: Wu Hao
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 111 +++--
include/linux/ioasid.h | 54
2 files changed, 161 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/ioasid.c b
() and ioasid_put() decrements
reference counts. Unlike ioasid_put(), the ioasid_free() function also
transition the IOASID to the free pending state where further
ioasid_get() is prohibited. This paves the way for FREE event
notifications that will be introduced next.
Signed-off-by: Jacob Pan
is usually
established when a guest page table is bound to a host PASID.
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 104 +
include/linux/ioasid.h | 18 +++
2 files changed, 122 insertions(+)
diff --git a/drivers/iommu/ioasid.c b/drivers
APIs are introduced that wire up these new data.
Existing users of IOASID APIs are converted where a host IOASID set is
allocated for bare-metal usages. Including VT-d driver and
iommu-sva-lib.
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
.../iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
on each IOASID.
This patch adds an API to iterate all the IOASIDs within the set.
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 84 ++
include/linux/ioasid.h | 20 ++
2 files changed, 104 insertions(+)
diff --git a/drivers/iommu/ioasid.c b
Rename ioasid_set_data() to ioasid_attach_data() to avoid confusion with
struct ioasid_set. ioasid_set is a group of IOASIDs that share a common
token.
Reviewed-by: Jean-Philippe Brucker
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/svm.c | 6 +++---
drivers/iommu/ioasid.c| 6
) enabled platforms are the primary users of IOASID. Examples of
how SIOV components interact with the IOASID APIs are provided.
Cc: Jonathan Corbet
Cc: linux-...@vger.kernel.org
Cc: Randy Dunlap
Signed-off-by: Liu Yi L
Signed-off-by: Wu Hao
Signed-off-by: Jacob Pan
---
Documentation/driver-api
driver to perform teardown outside atomic context
Jacob Pan (17):
docs: Document IO Address Space ID (IOASID) APIs
iommu/ioasid: Rename ioasid_set_data()
iommu/ioasid: Add a separate function for detach data
iommu/ioasid: Support setting system-wide capacity
iommu/ioasid: Redefine IOASID
added to support runtime capacity reservation,
potentially by cgroups.
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/iommu.c | 5 +++
drivers/iommu/ioasid.c | 70 +
include/linux/ioasid.h | 18 ++
3 files changed, 93 insertions(+)
diff
-by: Jacob Pan
---
drivers/iommu/intel/svm.c | 4 +--
drivers/iommu/ioasid.c| 54 +++
include/linux/ioasid.h| 5 +++-
3 files changed, 50 insertions(+), 13 deletions(-)
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
index 0053df9edffc
Hi Kevin,
On Sat, 20 Feb 2021 02:38:02 +, "Tian, Kevin"
wrote:
> > From: Jacob Pan
> > Sent: Saturday, February 20, 2021 1:09 AM
> >
> > Hi Kevin,
> >
> > On Fri, 19 Feb 2021 06:19:04 +, "Tian, Kevin"
> > wrote:
> >
Hi Lu,
On Sat, 20 Feb 2021 09:56:26 +0800, Lu Baolu
wrote:
> Hi Jacob and Sanjay,
>
> On 2/19/21 5:31 AM, Jacob Pan wrote:
> > Write protect bit, when set, inhibits supervisor writes to the read-only
> > pages. In supervisor shared virtual addressing (SVA), where page
Hi Kevin,
On Fri, 19 Feb 2021 06:19:04 +, "Tian, Kevin"
wrote:
> > From: Jacob Pan
> > Sent: Friday, February 19, 2021 5:31 AM
> >
> > Write protect bit, when set, inhibits supervisor writes to the read-only
> > pages. In guest supervisor shared vir
set FAULT_FLAG_REMOTE
to avoid faults when both SVM and PKEY are used.
References: commit 1b2ee1266ea6 ("mm/core: Do not enforce PKEY permissions on
remote mm access")
Reviewed-by: Raj Ashok
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/svm.c | 9 ++---
1 file changed, 6 insertions(+)
responses.
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/svm.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
index 23a1e4f58c54..ff7ae7cc17d5 100644
--- a/drivers/iommu/intel/svm.c
+++ b/drivers/iommu/intel
is set.
Signed-off-by: Sanjay Kumar
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/pasid.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c
index 0cceaabc3ce6..0b7e0e726ade 100644
--- a/drivers/iommu/intel
Hi Baolu et al,
This is a collection of SVA-related fixes.
Thanks,
Jacob
Jacob Pan (4):
iommu/vt-d: Enable write protect for supervisor SVM
iommu/vt-d: Enable write protect propagation from guest
iommu/vt-d: Reject unsupported page request modes
iommu/vt-d: Calculate and set flags
of the supervisor PASID entry will be set to match CPU CR0.WP bit.
Signed-off-by: Sanjay Kumar
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/pasid.c | 5 +
include/uapi/linux/iommu.h | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/pasid.c b/drivers
igned-off-by: Jean-Philippe Brucker
> Signed-off-by: Liu, Yi L
> Signed-off-by: Ashok Raj
> Signed-off-by: Jacob Pan
> Signed-off-by: Eric Auger
>
> ---
>
> v12 -> v13:
> - Fix config check
>
> v11 -> v12:
> - add argsz, name the union
> ---
>
Hi Jean-Philippe,
On Fri, 30 Oct 2020 11:18:27 +0100, Jean-Philippe Brucker
wrote:
> On Mon, Oct 26, 2020 at 02:05:06PM -0700, Jacob Pan wrote:
> > > This looks good to me, with small comments below.
> > >
> > Can I add your Reviewed-by tag after addressing th
Hi Jean-Philippe,
Thanks a lot for the review. Comments inline.
On Tue, 20 Oct 2020 15:58:09 +0200, Jean-Philippe Brucker
wrote:
> On Mon, Sep 28, 2020 at 02:38:28PM -0700, Jacob Pan wrote:
> > IOASID is used to identify address spaces that can be targeted by device
> > DMA.
Hi Jean-Philippe,
On Mon, 19 Oct 2020 16:08:24 +0200, Jean-Philippe Brucker
wrote:
> On Sat, Oct 17, 2020 at 04:25:25AM -0700, Raj, Ashok wrote:
> > > For devices that *don't* use a stop marker, the PCIe spec says
> > > (10.4.1.2):
> > >
> > > To stop [using a PASID] without using a Stop
Hi,
Any comments on this? I know we have some opens w.r.t. PASID management
UAPI, but I think having this common kernel API features should be
justified.
Thanks!
Jacob
On Mon, 28 Sep 2020 14:38:27 -0700, Jacob Pan
wrote:
> IOASID was introduced in v5.5 as a generic kernel allocator serv
-by: Liu Yi L
Signed-off-by: Wu Hao
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 117 +
include/linux/ioasid.h | 15 +++
2 files changed, 132 insertions(+)
diff --git a/drivers/iommu/ioasid.c b/drivers/iommu/ioasid.c
index
-wide IOASID pool if the new quota is
smaller than the existing one.
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 47 +++
include/linux/ioasid.h | 6 ++
2 files changed, 53 insertions(+)
diff --git a/drivers/iommu/ioasid.c b/drivers/iommu
on each IOASID.
This patch adds an API to iterate all the IOASIDs within the set.
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 17 +
include/linux/ioasid.h | 9 +
2 files changed, 26 insertions(+)
diff --git a/drivers/iommu/ioasid.c b/drivers/iommu/ioasid.c
index
/ioasid.rst.
Signed-off-by: Liu Yi L
Signed-off-by: Wu Hao
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 141 +
include/linux/ioasid.h | 57 +++-
2 files changed, 197 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu
IOASID core maintains the guest-host mapping in the form of SPID and
IOASID. This patch assigns the guest PASID (if valid) as SPID while
binding guest page table with a host PASID. This mapping will be used
for lookup and notifications.
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/svm.c | 2
Now that IOASID core keeps track of the IOASID to mm_struct ownership in
the forms of ioasid_set with IOASID_SET_TYPE_MM token type, there is no
need to keep the same mapping in VT-d driver specific data. Native SVM
usage is not affected by the change.
Signed-off-by: Jacob Pan
---
drivers/iommu
is cleared.
Signed-off-by: Jacob Pan
---
drivers/iommu/ioasid.c | 117 +
include/linux/ioasid.h | 24 ++
2 files changed, 141 insertions(+)
diff --git a/drivers/iommu/ioasid.c b/drivers/iommu/ioasid.c
index 9628e78b2ab4..828cc44b1b1c 100644
APIs are introduced that wire up these new data.
Existing users of IOASID APIs are converted where a host IOASID set is
allocated for bare-metal usage.
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/iommu.c | 26 +++--
drivers/iommu/intel/pasid.h | 1 +
drivers/iommu
registers IOASID notification handler such that IOMMU driver
can perform PASID teardown upon receiving an unexpected IOASID free
event.
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/svm.c | 94 -
include/linux/intel-iommu.h | 2 +
2 files changed, 94
Rename ioasid_set_data() to ioasid_attach_data() to avoid confusion with
struct ioasid_set. ioasid_set is a group of IOASIDs that share a common
token.
Reviewed-by: Jean-Philippe Brucker
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/svm.c | 6 +++---
drivers/iommu/ioasid.c| 6
-off-by: Jacob Pan
---
drivers/iommu/intel/iommu.c | 5 +
drivers/iommu/ioasid.c | 20
include/linux/ioasid.h | 11 +++
3 files changed, 36 insertions(+)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 18ed3b3c70d7
1 - 100 of 1596 matches
Mail list logo