Hi Jason,
> From: Jason Gunthorpe
> Sent: Wednesday, November 3, 2021 9:26 PM
>
> On Tue, Nov 02, 2021 at 09:53:29AM +0000, Liu, Yi L wrote:
>
> > > vfio_uninit_group_dev(&mdev_state->vdev);
> > > kfree(mdev_state->pages);
> > >
> From: Jason Gunthorpe
> Sent: Monday, November 1, 2021 8:50 PM
>
> On Fri, Oct 29, 2021 at 09:47:27AM +0000, Liu, Yi L wrote:
> > Hi Jason,
> >
> > > From: Jason Gunthorpe
> > > Sent: Monday, October 25, 2021 8:53 PM
> > >
> > &g
Hi Jason,
> From: Jason Gunthorpe
> Sent: Monday, October 25, 2021 8:53 PM
>
> On Mon, Oct 25, 2021 at 06:28:09AM +0000, Liu, Yi L wrote:
> >thanks for the guiding. will also refer to your vfio_group_cdev series.
> >
> >Need to double confirm here. Not qu
> From: Jason Gunthorpe mailto:j...@nvidia.com>>
> Sent: Tuesday, September 21, 2021 11:57 PM
>
> On Sun, Sep 19, 2021 at 02:38:30PM +0800, Liu Yi L wrote:
> > This patch introduces a new interface (/dev/vfio/devices/$DEVICE) for
> > userspace to directly ope
> From: David Gibson
> Sent: Wednesday, September 29, 2021 10:09 AM
>
> On Sun, Sep 19, 2021 at 02:38:30PM +0800, Liu Yi L wrote:
> > This patch introduces a new interface (/dev/vfio/devices/$DEVICE) for
> > userspace to directly open a vfio device w/o relying on contai
> From: Jason Gunthorpe
> Sent: Friday, October 15, 2021 7:18 PM
>
> On Fri, Oct 15, 2021 at 09:18:06AM +0000, Liu, Yi L wrote:
>
> > > Acquire from the xarray is
> > >rcu_lock()
> > >ioas = xa_load()
> > >if (ioas)
>
> From: Jason Gunthorpe
> Sent: Wednesday, September 22, 2021 1:15 AM
>
> On Sun, Sep 19, 2021 at 02:38:35PM +0800, Liu Yi L wrote:
>
> > +/*
> > + * A iommufd_device object represents the binding relationship
> > + * between iommufd and device. It is created
> From: Jason Gunthorpe
> Sent: Tuesday, September 21, 2021 11:42 PM
>
> On Sun, Sep 19, 2021 at 02:38:29PM +0800, Liu Yi L wrote:
> > /dev/iommu aims to provide a unified interface for managing I/O address
> > spaces for devices assigned to userspace. This patch adds t
> From: Jean-Philippe Brucker
> Sent: Wednesday, September 22, 2021 9:45 PM
>
> On Sun, Sep 19, 2021 at 02:38:39PM +0800, Liu Yi L wrote:
> > This patch adds IOASID allocation/free interface per iommufd. When
> > allocating an IOASID, userspace is expected to specify
> From: Jean-Philippe Brucker
> Sent: Wednesday, September 22, 2021 10:49 PM
>
> On Sun, Sep 19, 2021 at 02:38:45PM +0800, Liu Yi L wrote:
> > [HACK. will fix in v2]
> >
> > IOVA range is critical info for userspace to manage DMA for an I/O address
> > spac
> From: Jason Gunthorpe
> Sent: Wednesday, September 22, 2021 9:32 PM
>
> On Wed, Sep 22, 2021 at 12:51:38PM +0000, Liu, Yi L wrote:
> > > From: Jason Gunthorpe
> > > Sent: Wednesday, September 22, 2021 1:45 AM
> > >
> > [...]
> > > > dif
> From: Jason Gunthorpe
> Sent: Wednesday, September 22, 2021 1:45 AM
>
[...]
> > diff --git a/drivers/iommu/iommufd/iommufd.c
> b/drivers/iommu/iommufd/iommufd.c
> > index 641f199f2d41..4839f128b24a 100644
> > +++ b/drivers/iommu/iommufd/iommufd.c
> > @@ -24,6 +24,7 @@
> > struct iommufd_ctx {
> From: Jason Gunthorpe
> Sent: Tuesday, September 21, 2021 9:45 PM
>
> On Sun, Sep 19, 2021 at 02:38:28PM +0800, Liu Yi L wrote:
> > Linux now includes multiple device-passthrough frameworks (e.g. VFIO
> and
> > vDPA) to manage secure device access from the userspace.
> From: Liu, Yi L
> Sent: Sunday, September 19, 2021 2:38 PM
[...]
> [Series Overview]
>
> * Basic skeleton:
> 0001-iommu-iommufd-Add-dev-iommu-core.patch
>
> * VFIO PCI creates device-centric interface:
> 0002-vfio-Add-device-class-for-dev-vfio-devices.patch
Document the /dev/iommu framework for user.
Open:
Do we want to document /dev/iommu in Documentation/userspace-api/iommu.rst?
Existing iommu.rst is for the vSVA interfaces, honestly, may need to rewrite
this doc entirely.
Signed-off-by: Kevin Tian
Signed-off-by: Liu Yi L
---
Documentation
From: Lu Baolu
Expose per-device IOMMU attributes to the upper layers.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 35 +++
1 file changed, 35 insertions(+)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index dd22fc7d5176..
[HACK. will fix in v2]
This patch introduces vfio type1v2-equivalent interface to userspace. Due
to aforementioned hack, iommufd currently calls exported vfio symbols to
handle map/unmap requests from the user.
Signed-off-by: Liu Yi L
---
drivers/iommu/iommufd/iommufd.c | 104
introduce a cap chain
format in IOMMU_DEVICE_GET_INFO to carry the iova range info.
Signed-off-by: Liu Yi L
---
drivers/iommu/iommu.c | 2 ++
drivers/iommu/iommufd/iommufd.c | 41 +++-
drivers/vfio/vfio_iommu_type1.c | 47 ++---
include
other key aspects of the
new framework. Once we reach consensus, we'll follow it to do a clean
implementation 'in' next version.
Signed-off-by: Liu Yi L
---
drivers/vfio/vfio_iommu_type1.c | 199 +++-
include/linux/vfio.h| 13 +++
2 files chan
Signed-off-by: Liu Yi L
---
drivers/vfio/pci/vfio_pci.c | 82 +
drivers/vfio/pci/vfio_pci_private.h | 1 +
include/linux/iommufd.h | 1 +
include/uapi/linux/vfio.h | 26 +
4 files changed, 110 insertions(+)
diff --git a/drivers
ection for those patches, that logic will be moved
to this patch.
Signed-off-by: Liu Yi L
---
drivers/iommu/iommufd/iommufd.c | 226
include/linux/iommufd.h | 29
2 files changed, 255 insertions(+)
diff --git a/drivers/iommu/iommufd/iommufd.c b/dri
From: Lu Baolu
These two helpers could be used when 1) the iommu group is singleton,
or 2) the upper layer has put the iommu group into the secure state by
calling iommu_device_init_user_dma().
As we want the iommufd design to be a device-centric model, we want to
remove any group knowledge in i
As aforementioned, userspace should check extension for what formats
can be specified when allocating an IOASID. This patch adds such
interface for userspace. In this RFC, iommufd reports EXT_MAP_TYPE1V2
support and no no-snoop support yet.
Signed-off-by: Liu Yi L
---
drivers/iommu/iommufd
d ARM SSID (Sub-Stream
ID). We need find a way to resolve the naming conflict between the hardware
ID and software handle. One option is to rename the existing ioasid to be
pasid or ssid, given their full names still sound generic. Appreciate more
thoughts on this open!
Signed-off-by
registered at binding time is used to mark the
device which is being queried here.
Signed-off-by: Liu Yi L
---
drivers/iommu/iommufd/iommufd.c | 68 +
include/uapi/linux/iommu.h | 49
2 files changed, 117 insertions(+)
diff --git a/drivers
From: Lu Baolu
This exposes PAGE_SIZE and ADDR_WIDTH attributes. The iommufd could use
them to define the IOAS.
Signed-off-by: Lu Baolu
---
include/linux/iommu.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 943de6897f56..86d34e4ce0
f I/O address spaces attached by this device. However as a
starting point (matching current vfio), only one I/O address space is
supported per vfio device. It implies one device can only be attached
to one iommufd at this point.
Signed-off-by: Liu Yi L
---
drivers/vfio/pci/Kconfig
dev which requires pasid granular
DMA isolation;
- iommu_[un]bind_sw_mdev() for sw mdev which relies on software measures
instead of iommu to isolate DMA;
Signed-off-by: Liu Yi L
---
drivers/iommu/iommufd/iommufd.c | 160 +++-
include/linux/iommufd.h |
From: Lu Baolu
This extends iommu core to manage security context for passthrough
devices. Please bear a long explanation for how we reach this design
instead of managing it solely in iommufd like what vfio does today.
Devices which cannot be isolated from each other are organized into an
iommu
er/group
attaching process, before opening the device through the groupfd.
Signed-off-by: Liu Yi L
---
drivers/vfio/pci/vfio_pci.c | 25 +++--
drivers/vfio/pci/vfio_pci_private.h | 1 +
drivers/vfio/vfio.c | 3 ++-
include/linux/vfio.h
From: Lu Baolu
This provides an interface for upper layers to get the per-device iommu
attributes.
int iommu_device_get_info(struct device *dev,
enum iommu_devattr attr, void *data);
The first attribute (IOMMU_DEV_INFO_FORCE_SNOOP) is added. It tells if
the iom
, to
identify the sub-directory. Another tricky thing is that "pdev. vs. mdev"
and "pci vs. platform vs. ccw,..." are orthogonal categorizations. Need
more thoughts on whether both or just one category should be used to define
the sub-directorie
case a device is exposed in both legacy and new interfaces (see next
patch for how to decide it), this patch also ensures that when the device
is already opened via one interface then the other one must be blocked.
Signed-off-by: Liu Yi L
---
drivers/vfio/vfio.c | 228
here.
[1] https://lore.kernel.org/kvm/4c0eb470.1hmjondo00nivfm6%25p...@cisco.com/
Signed-off-by: Liu Yi L
---
drivers/iommu/Kconfig | 1 +
drivers/iommu/Makefile | 1 +
drivers/iommu/iommufd/Kconfig | 11
drivers/iommu/iommufd/Makefile | 2 +
drivers/iommu/iommufd
nd in:
https://github.com/luxis1999/dev-iommu/commits/dev-iommu-5.14-rfcv1
Thanks for your time!
Regards,
Yi Liu
---
Liu Yi L (15):
iommu/iommufd: Add /dev/iommu core
vfio: Add device class for /dev/vfio/devices
vfio: Add vfio_[un]register_device()
vfio/pci: Register device to /dev/vfio/dev
Use pasid_pte_is_present() for present bit check in
intel_pasid_tear_down_entry().
Cc: Lu Baolu
Signed-off-by: Liu Yi L
---
drivers/iommu/intel/pasid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/intel/pasid.c b/drivers/iommu/intel/pasid.c
index
is enough.
Fixes: 1c4f88b7f1f9 ("iommu/vt-d: Shared virtual address in scalable mode")
Cc: Lu Baolu
Signed-off-by: Kumar Sanjay K
Signed-off-by: Liu Yi L
Tested-by: Yi Sun
---
drivers/iommu/intel/pasid.c | 10 --
drivers/iommu/intel/pasid.h | 5 +
2 files changed, 13
The helper functions is not capable to modify the pasid entries which
are still in use. So should have a check against present bit.
Cc: Lu Baolu
Signed-off-by: Liu Yi L
---
drivers/iommu/intel/pasid.c | 16
1 file changed, 16 insertions(+)
diff --git a/drivers/iommu/intel
Hi,
This series includes two minor enhancements and one bug fix. Please have
a review.
Thanks,
Yi Liu
---
Liu Yi L (3):
iommu/vt-d: Using pasid_pte_is_present() helper function
iommu/vt-d: Add present bit check in pasid entry setup helper
functions
iommu/vt-d: Fix Unexpected page
Hi Alex,
On Wed, 16 Jun 2021 13:39:37 -0600, Alex Williamson wrote:
> On Wed, 16 Jun 2021 06:43:23 +
> "Tian, Kevin" wrote:
>
> > > From: Alex Williamson
> > > Sent: Wednesday, June 16, 2021 12:12 AM
> > >
> > > On Tue, 15 Jun 2021 02:31:39 +
> > > "Tian, Kevin" wrote:
> > >
> >
> From: Shenming Lu
> Sent: Friday, June 4, 2021 10:03 AM
>
> On 2021/6/4 2:19, Jacob Pan wrote:
> > Hi Shenming,
> >
> > On Wed, 2 Jun 2021 12:50:26 +0800, Shenming Lu
>
> > wrote:
> >
> >> On 2021/6/2 1:33, Jason Gunthorpe wrote:
> >>> On Tue, Jun 01, 2021 at 08:30:35PM +0800, Lu Baolu wrote:
On Tue, 1 Jun 2021 10:36:36 +0800, Jason Wang wrote:
> 在 2021/5/31 下午4:41, Liu Yi L 写道:
> >> I guess VFIO_ATTACH_IOASID will fail if the underlayer doesn't support
> >> hardware nesting. Or is there way to detect the capability before?
> > I think it could fail
On Fri, 28 May 2021 20:36:49 -0300, Jason Gunthorpe wrote:
> On Thu, May 27, 2021 at 07:58:12AM +, Tian, Kevin wrote:
>
> > 2.1. /dev/ioasid uAPI
> > +
> >
> > /*
> > * Check whether an uAPI extension is supported.
> > *
> > * This is for FD-level capabilities, such as
On Fri, 28 May 2021 10:24:56 +0800, Jason Wang wrote:
> 在 2021/5/27 下午3:58, Tian, Kevin 写道:
> > /dev/ioasid provides an unified interface for managing I/O page tables for
> > devices assigned to userspace. Device passthrough frameworks (VFIO, vDPA,
> > etc.) are expected to use this interface inst
Morning Jason,
On Fri, 14 May 2021 10:39:39 -0300, Jason Gunthorpe wrote:
> On Fri, May 14, 2021 at 01:17:23PM +, Tian, Kevin wrote:
> > > From: Jason Gunthorpe
> > > Sent: Thursday, May 13, 2021 8:01 PM
> > >
> > > On Thu, May 13, 2021 at 03:28:52AM +, Tian, Kevin wrote:
> > >
> > >
On Tue, 11 May 2021 09:10:03 +, Tian, Kevin wrote:
> > From: Jason Gunthorpe
> > Sent: Monday, May 10, 2021 8:37 PM
> >
> [...]
> > > gPASID!=hPASID has a problem when assigning a physical device which
> > > supports both shared work queue (ENQCMD with PASID in MSR)
> > > and dedicated wor
Hi Jason,
On Wed, 5 May 2021 19:21:20 -0300, Jason Gunthorpe wrote:
> On Wed, May 05, 2021 at 01:04:46PM -0700, Jacob Pan wrote:
> > Hi Jason,
> >
> > On Wed, 5 May 2021 15:00:23 -0300, Jason Gunthorpe wrote:
> >
> > > On Wed, May 05, 2021 at 10:22:59AM -0700, Jacob Pan wrote:
> > >
> > >
On Wed, 21 Apr 2021 13:33:12 -0600, Alex Williamson wrote:
> On Wed, 21 Apr 2021 14:52:03 -0300
> Jason Gunthorpe wrote:
>
> > On Wed, Apr 21, 2021 at 10:54:51AM -0600, Alex Williamson wrote:
> >
> > > That's essentially replacing vfio-core, where I think we're more
> >
> > I am only tal
Hi Alex,
> From: Alex Williamson
> Sent: Friday, April 16, 2021 11:46 PM
[...]
> > This is not a tactic or excuse for not working on the new /dev/ioasid
> > interface. In fact, I believe we can benefit from the lessons learned
> > while completing the existing. This will give confidence to the ne
Hi Jason,
> From: Jason Gunthorpe
> Sent: Thursday, April 1, 2021 7:54 PM
>
> On Thu, Apr 01, 2021 at 07:04:01AM +0000, Liu, Yi L wrote:
>
> > After reading your reply in https://lore.kernel.org/linux-
> iommu/20210331123801.gd1463...@nvidia.com/#t
> > So you
> From: Jason Gunthorpe
> Sent: Thursday, April 1, 2021 9:43 PM
>
> On Thu, Apr 01, 2021 at 01:38:46PM +0000, Liu, Yi L wrote:
> > > From: Jean-Philippe Brucker
> > > Sent: Thursday, April 1, 2021 8:05 PM
> > [...]
> > >
> > > Also
> From: Jason Gunthorpe
> Sent: Thursday, April 1, 2021 9:16 PM
>
> On Thu, Apr 01, 2021 at 01:10:48PM +0000, Liu, Yi L wrote:
> > > From: Jason Gunthorpe
> > > Sent: Thursday, April 1, 2021 7:47 PM
> > [...]
> > > I'm worried Intel views the
> From: Jean-Philippe Brucker
> Sent: Thursday, April 1, 2021 8:05 PM
[...]
>
> Also wondering about:
>
> * Querying IOMMU nesting capabilities before binding page tables (which
> page table formats are supported?). We were planning to have a VFIO cap,
> but I'm guessing we need to go back t
> From: Jason Gunthorpe
> Sent: Thursday, April 1, 2021 7:47 PM
[...]
> I'm worried Intel views the only use of PASID in a guest is with
> ENQCMD, but that is not consistent with the industry. We need to see
> normal nested PASID support with assigned PCI VFs.
I'm not quire flow here. Intel also
Hi Jason,
> From: Liu, Yi L
> Sent: Thursday, April 1, 2021 12:39 PM
>
> > From: Jason Gunthorpe
> > Sent: Wednesday, March 31, 2021 8:41 PM
> >
> > On Wed, Mar 31, 2021 at 07:38:36AM +, Liu, Yi L wrote:
> >
> > > The reason is /dev/i
> From: Jason Gunthorpe
> Sent: Wednesday, March 31, 2021 8:41 PM
>
> On Wed, Mar 31, 2021 at 07:38:36AM +0000, Liu, Yi L wrote:
>
> > The reason is /dev/ioasid FD is per-VM since the ioasid allocated to
> > the VM should be able to be shared by all assigned device
> From: Jason Gunthorpe
> Sent: Tuesday, March 30, 2021 9:43 PM
[..]
> No, the mdev device driver must enforce this directly. It is the one
> that programms the physical shared HW, it is the one that needs a list
> of PASID's it is allowed to program *for each mdev*
>
> ioasid_set doesn't seem to
> From: Jason Gunthorpe
> Sent: Tuesday, March 30, 2021 9:28 PM
>
> On Tue, Mar 30, 2021 at 04:14:58AM +, Tian, Kevin wrote:
>
> > One correction. The mdev should still construct the list of allowed PASID's
> as
> > you said (by listening to IOASID_BIND/UNBIND event), in addition to the
> io
Hi Jason,
> From: Jason Gunthorpe
> Sent: Tuesday, March 30, 2021 9:29 PM
>
> On Tue, Mar 30, 2021 at 01:37:05AM +, Tian, Kevin wrote:
[...]
> > Hi, Jason,
> >
> > Actually above is a major open while we are refactoring vSVA uAPI toward
> > this direction. We have two concerns about merging
ar 02, 2021 at 09:13:19AM -0800, Jacob Pan wrote:
> > > > Hi Jason,
> > > >
> > > > On Tue, 2 Mar 2021 08:56:28 -0400, Jason Gunthorpe
> > > > wrote:
> > > > > On Wed, Mar 03, 2021 at 04:35:39AM +0800, Liu Yi L wrote:
> > > >
Hi Jason,
> From: Jason Gunthorpe
> Sent: Tuesday, March 2, 2021 8:52 PM
>
> On Wed, Mar 03, 2021 at 04:35:38AM +0800, Liu Yi L wrote:
> > diff --git a/drivers/vfio/vfio_iommu_type1.c
> b/drivers/vfio/vfio_iommu_type1.c
> > index 4bb162c1d649..3a5c84d4f19b 10
Hi Eric,
> From: Auger Eric
> Sent: Friday, February 12, 2021 5:58 PM
>
> Hi Vivek, Yi,
>
> On 2/12/21 8:14 AM, Vivek Gautam wrote:
> > Hi Yi,
> >
> >
> > On Sat, Jan 23, 2021 at 2:29 PM Liu, Yi L wrote:
> >>
> >> Hi Eric,
> >
> From: Jacob Pan
> Sent: Sunday, February 28, 2021 6:01 AM
>
> I/O Address Space ID (IOASID) core code was introduced in v5.5 as a generic
> kernel allocator service for both PCIe Process Address Space ID (PASID) and
> ARM SMMU's Substream ID. IOASIDs are used to associate DMA requests
> with
> v
This patch reports nesting info when iommu_domain_get_attr() is called with
DOMAIN_ATTR_NESTING and one domain with nesting set.
Cc: Kevin Tian
CC: Jacob Pan
Cc: Alex Williamson
Cc: Eric Auger
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
Signed-off-by
l
Cc: Lu Baolu
Signed-off-by: Eric Auger
Signed-off-by: Liu Yi L
Reviewed-by: Stefan Hajnoczi
---
v7 -> v8:
*) remove SYSWIDE_PASID description, point to /dev/ioasid when mentioning
PASID allocation from host.
v6 -> v7:
*) tweak per Eric's comments.
v5 -> v6:
*) tweak per E
: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
Reviewed-by: Eric Auger
---
v7 -> v8:
*) refine the commit message and the subject.
v5 -> v6:
*) add review-by from Eric Auger.
v1 -> v2:
*) added in v2, but it was sent in a separate patchseries before
---
main requirement is to use the auxiliary domain associated with mdev.
Cc: Kevin Tian
CC: Jacob Pan
CC: Jun Tian
Cc: Alex Williamson
Cc: Eric Auger
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
Reviewed-by: Eric Auger
---
v5 -> v6:
*) add review-by f
@domain per the above reason.
Cc: Kevin Tian
CC: Jacob Pan
Cc: Alex Williamson
Cc: Eric Auger
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Yi Sun
Signed-off-by: Liu Yi L
---
v7 -> v8:
*) tweaked the commit message.
v6 -> v7:
*) correct the link for the deta
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
Signed-off-by: Eric Auger
Signed-off-by: Jacob Pan
---
v1 -> v2:
*) rename from "vfio/type1: Flush stage-1 IOMMU cache for nesting type"
*) rename vfio_cache_inv_fn() to vfio_dev_cache_
r
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Jean-Philippe Brucker
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
v7 -> v8:
*) adapt to /dev/ioasid
*) address comments from Alex on v7.
*) adapt to latest iommu_sva_unbind_gpasid() implementation.
*) remov
l
Cc: Lu Baolu
Signed-off-by: Liu Yi L
---
v7 -> v8:
*) tweak per Alex's comments against v7.
*) check "iommu->nesting_info->format == 0" in attach_group()
v6 -> v7:
*) using vfio_info_add_capability() for adding nesting cap per suggestion
from Eric.
v5 -> v6:
*
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
Reviewed-by: Eric Auger
---
v5 -> v6:
*) add review-by from Eric Auger.
v4 -> v5:
*) address comments from Eric Auger.
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 29 +++--
drivers/iommu/arm/arm-smmu/arm-smmu.c
-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
v7 -> v8:
*) add padding in struct iommu_nesting_info_vtd
*) describe future extension rules for struct iommu_nesting_info in iommu.rst.
*) remove SYSWIDE_PASID
v6 -> v7:
*) rephrase the
RFC v2:
https://lore.kernel.org/kvm/1571919983-3231-1-git-send-email-yi.l@intel.com/
- RFC v1 -> v2:
Dropped vfio: VFIO_IOMMU_ATTACH/DETACH_PASID_TABLE.
RFC v1:
https://lore.kernel.org/kvm/1562324772-3084-1-git-send-email-yi.l@intel.com/
---
Eric Auger
Hi Eric,
> From: Auger Eric
> Sent: Tuesday, January 19, 2021 6:03 PM
>
> Hi Yi, Vivek,
>
[...]
> > I see. I think there needs a change in the code there. Should also expect
> > a nesting_info returned instead of an int anymore. @Eric, how about your
> > opinion?
> >
> > domain = iommu_get_
Hi Vivek,
> From: Vivek Gautam
> Sent: Tuesday, January 12, 2021 7:06 PM
>
> Hi Yi,
>
>
> On Tue, Jan 12, 2021 at 2:51 PM Liu, Yi L wrote:
> >
> > Hi Vivek,
> >
> > > From: Vivek Gautam
> > > Sent: Tuesday, January 12, 2021 2:50 PM
Hi Vivek,
> From: Vivek Gautam
> Sent: Tuesday, January 12, 2021 2:50 PM
>
> Hi Yi,
>
>
> On Thu, Sep 10, 2020 at 4:13 PM Liu Yi L wrote:
> >
> > This patch is added as instead of returning a boolean for
> DOMAIN_ATTR_NESTING,
> > iommu_domain_get_
->
has_iotlb_device needs to be updated when attaching to subdevices.
Fixes: 67b8e02b5e761 ("iommu/vt-d: Aux-domain specific domain attach/detach")
Signed-off-by: Liu Yi L
Acked-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 53 +++--
1 fil
er cases. For example, flushing device_iotlb for a
domain which has sub-devices attached by auxiliary manner.
Fixes: 67b8e02b5e761 ("iommu/vt-d: Aux-domain specific domain attach/detach")
Co-developed-by: Xin Zeng
Signed-off-by: Xin Zeng
Signed-off-by: Liu Yi L
Acked-by: Lu Baolu
---
d
/vt-d: Shared virtual address in scalable mode")
Cc: Lu Baolu
Cc: Jacob Pan
Cc: Raj Ashok
Cc: David Woodhouse
Reported-by: Guo Kaijie
Reported-by: Xin Zeng
Signed-off-by: Guo Kaijie
Signed-off-by: Xin Zeng
Signed-off-by: Liu Yi L
Tested-by: Guo Kaijie
Cc: sta...@vger.kernel.org # v5.0
ename "iommu/vt-d: A fix to iommu_flush_dev_iotlb() for aux-domain" to be
"iommu/vt-d: Fix ineffective devTLB invalidation for subdevices"
- Refined the commit messages
v1:
https://lore.kernel.org/linux-iommu/2020122352.183523-1-yi.l@intel.com/
Regards,
Yi Liu
Liu Y
Hi Will,
> From: Will Deacon
> Sent: Wednesday, January 6, 2021 1:24 AM
>
> On Tue, Jan 05, 2021 at 05:50:22AM +0000, Liu, Yi L wrote:
> > > > +static void __iommu_flush_dev_iotlb(struct device_domain_info
> *info,
> > > > +
Hi Baolu,
> From: Lu Baolu
> Sent: Tuesday, December 29, 2020 4:38 PM
>
> Hi Yi,
>
> On 2020/12/29 11:25, Liu Yi L wrote:
> > In the existing code, loop all devices attached to a domain does not
> > include sub-devices attached via iommu_aux_attach_device().
>
Hi Baolu,
> From: Lu Baolu
> Sent: Tuesday, December 29, 2020 4:42 PM
>
> Hi Yi,
>
> On 2020/12/29 11:25, Liu Yi L wrote:
> > iommu_flush_dev_iotlb() is called to invalidate caches on device. It only
> > loops the devices which are full-attached to the domain
->
has_iotlb_device needs to be updated when attaching to subdevices.
Fixes: 67b8e02b5e761 ("iommu/vt-d: Aux-domain specific domain attach/detach")
Signed-off-by: Liu Yi L
---
drivers/iommu/intel/iommu.c | 53 ++---
1 file changed, 37 insertions(+), 16 delet
er cases. For example, flushing device_iotlb for a
domain which has sub-devices attached by auxiliary manner.
Co-developed-by: Xin Zeng
Signed-off-by: Xin Zeng
Signed-off-by: Liu Yi L
---
drivers/iommu/intel/iommu.c | 95 +++--
include/linux/intel-iommu.h | 16 ++
/vt-d: Shared virtual address in scalable mode")
Cc: Lu Baolu
Cc: Jacob Pan
Cc: Raj Ashok
Cc: David Woodhouse
Reported-by: Guo Kaijie
Reported-by: Xin Zeng
Signed-off-by: Guo Kaijie
Signed-off-by: Xin Zeng
Signed-off-by: Liu Yi L
---
drivers/iommu/intel/svm.c | 9 +
include/l
t;
- Rename "iommu/vt-d: A fix to iommu_flush_dev_iotlb() for aux-domain" to be
"iommu/vt-d: Fix ineffective devTLB invalidation for subdevices"
- Refined the commit messages
v1:
https://lore.kernel.org/linux-iommu/2020122352.183523-1-yi.l@intel.com/
Liu Yi L (3):
Hi Baolu,
Well received, all comments accepted. thanks.
Regards,
Yi Liu
> From: Lu Baolu
> Sent: Wednesday, December 23, 2020 6:10 PM
>
> Hi Yi,
>
> On 2020/12/23 14:27, Liu Yi L wrote:
> > iommu_flush_dev_iotlb() is called to invalidate caches on device. It only
>
->
has_iotlb_device needs to be updated when attaching to subdevices.
Fixes: 67b8e02b5e761 ("iommu/vt-d: Aux-domain specific domain attach/detach")
Signed-off-by: Liu Yi L
---
drivers/iommu/intel/iommu.c | 63 +++--
1 file changed, 47 insertions(+), 16 delet
er cases. For example, flushing device_iotlb for a
domain which has sub-devices attached by auxiliary manner.
Co-developed-by: Xin Zeng
Signed-off-by: Xin Zeng
Signed-off-by: Liu Yi L
---
drivers/iommu/intel/iommu.c | 95 +++--
include/linux/intel-iommu.h | 16 ++
/vt-d: Shared virtual address in scalable mode")
Cc: Lu Baolu
Cc: Jacob Pan
Cc: Raj Ashok
Cc: David Woodhouse
Reported-by: Guo Kaijie
Reported-by: Xin Zeng
Signed-off-by: Guo Kaijie
Signed-off-by: Xin Zeng
Signed-off-by: Liu Yi L
Tested-by: Guo Kaijie
---
drivers/iommu/intel/s
This patchset aims to fix a bug regards to native SVM usage, and
also several bugs around subdevice (attached to device via auxiliary
manner) tracking and ineffective device_tlb flush.
Liu Yi L (3):
iommu/vt-d: Move intel_iommu info from struct intel_svm to struct
intel_svm_dev
iommu/vt-d
Hi Jacob,
> From: Jacob Pan
> Sent: Wednesday, December 23, 2020 4:21 AM
>
> Hi Yi,
>
> On Sun, 20 Dec 2020 08:03:51 +0800, Liu Yi L wrote:
>
> > In existing code, if wanting to loop all devices attached to a domain,
> > current code can only loop the devices
> From: Jacob Pan
> Sent: Wednesday, December 23, 2020 2:17 AM
>
> Hi Yi,
>
> nit: The cover letter is 0/4, patches are 1/3 - 3/3. You also need to copy
> LKML.
>
> On Sun, 20 Dec 2020 08:03:49 +0800, Liu Yi L wrote:
>
> > Hi,
> >
> > This pa
/vt-d: Add basic SVM PASID support")
Cc: Lu Baolu
Cc: Jacob Pan
Cc: Raj Ashok
Cc: David Woodhouse
Reported-by: Guo Kaijie
Reported-by: Xin Zeng
Signed-off-by: Guo Kaijie
Signed-off-by: Xin Zeng
Signed-off-by: Liu Yi L
---
drivers/iommu/intel/svm.c | 9 +
include/linux/intel-i
Xin Zeng
Co-developed-by: Liu Yi L
Signed-off-by: Liu Yi L
Co-developed-by: Lu Baolu
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 92 -
include/linux/intel-iommu.h | 11 -
2 files changed, 90 insertions(+), 13 deletions(-)
diff --git a/driver
Hi,
This patchset aims to fix a bug regards to SVM usage on native, and
also several bugs around subdevice (attached to device via auxiliary
manner) tracking and ineffective device_tlb flush.
Regards,
Yi Liu
Liu Yi L (3):
iommu/vt-d: Move intel_iommu info from struct intel_svm to struct
->has_iotlb_device for both device/subdevice attach/detach and
ATS enabling/disabling.
Signed-off-by: Liu Yi L
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 90 +
1 file changed, 72 insertions(+), 18 deletions(-)
diff --git a/drivers/iommu/in
On Thurs, Nov 26, 2020, at 9:27 AM, Lu Baolu wrote:
> Add the API for getting the domain from a vfio group. This could be used
> by the physical device drivers which rely on the vfio/mdev framework for
> mediated device user level access. The typical use case like below:
>
> unsigned int pas
1 - 100 of 545 matches
Mail list logo