From: Liu Yi L
For a long time, devices have only one DMA address space from platform
IOMMU's point of view. This is true for both bare metal and directed-
access in virtualization environment. Reason is the source ID of DMA in
PCIe are BDF (bus/dev/fnc ID), which results in only d
From: Liu Yi L
In Linux Kernel, the IOMMU nesting translation (a.k.a. IOMMU dual stage
translation capability) is abstracted in uapi/iommu.h, in which the uAPIs
like bind_gpasid/iommu_cache_invalidate/fault_report/pgreq_resp are defined.
VFIO_TYPE1_NESTING_IOMMU stands for the vfio iommu type
From: Liu Yi L
The PASID quota is per-application (VM) according to vfio's PASID
management rule. For better flexibility, quota shall be user tunable
. This patch provides a VFIO based user interface for which quota can
be adjusted. However, quota cannot be adjusted downward below the
numb
d) Adds vSVA vfio support for IOMMU-backed mdevs.
- RFC v1 -> v2:
Dropped vfio: VFIO_IOMMU_ATTACH/DETACH_PASID_TABLE.
Liu Yi L (8):
vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free)
vfio/type1: Make per-application (VM) PASID quota tunable
vfio: Reclaim PASIDs when
From: Liu Yi L
For IOMMU with type VFIO_TYPE1_NESTING_IOMMU, guest "owns" the
first-level/stage-1 translation structures, the host IOMMU driver
has no knowledge of first-level/stage-1 structure cache updates
unless the guest invalidation requests are trapped and passed down
to the h
From: Liu Yi L
Recent years, mediated device pass-through framework (e.g. vfio-mdev)
are used to achieve flexible device sharing across domains (e.g. VMs).
Also there are hardware assisted mediated pass-through solutions from
platform vendors. e.g. Intel VT-d scalable mode which supports Intel
From: Liu Yi L
When userspace application is down, kernel should reclaim the PASIDs
allocated for this application to avoid PASID leak. This patch adds
a PASID list in vfio_mm structure to track the allocated PASIDs. The
PASID reclaim will be triggered when last vfio container is released
From: Liu Yi L
This patch exposes PCIe PASID capability to guest. Existing vfio_pci
driver hides it from guest by setting the capability length as 0 in
pci_ext_cap_length[].
This capability is required for vSVA enabling on pass-through PCIe
devices.
Cc: Kevin Tian
CC: Jacob Pan
Cc: Alex
From: Liu Yi L
Per PCIe r5.0, sec 9.3.7.14, if a PF implements the PASID Capability, the
PF PASID configuration is shared by its VFs. VFs must not implement their
own PASID Capability.
Per PCIe r5.0, sec 9.3.7.11, VFs must not implement the PRI Capability. If
the PF implements PRI, it is
ay need to introduce a generic communication
framework between vfio-pci driver and PF drivers. Please feel free to give
your suggestions on it.
Liu Yi L (2):
vfio/pci: Expose PCIe PASID capability to guest
vfio/pci: Emulate PASID/PRI capability for VFs
drivers/vfio/pci/vfio_pci_conf
> From: Jacob Pan [mailto:jacob.jun@linux.intel.com]
> Sent: Wednesday, January 29, 2020 2:02 PM
> Subject: [PATCH V9 00/10] Nested Shared Virtual Address (SVA) VT-d support
>
> Shared virtual address (SVA), a.k.a, Shared virtual memory (SVM) on Intel
> platforms
> allow address space sharing
Hi Alex,
> From: Alex Williamson [mailto:alex.william...@redhat.com]
> Sent: Thursday, January 30, 2020 7:56 AM
> To: Liu, Yi L
> Subject: Re: [RFC v3 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free)
>
> On Wed, 29 Jan 2020 04:11:45 -0800
> "Liu, Yi L"
Hi Alex,
> From: Alex Williamson [mailto:alex.william...@redhat.com]
> Sent: Thursday, January 30, 2020 7:57 AM
> To: Liu, Yi L
> Subject: Re: [RFC v3 3/8] vfio: Reclaim PASIDs when application is down
>
> On Wed, 29 Jan 2020 04:11:47 -0800
> "Liu, Yi L"
Hi Alex,
> From: Alex Williamson [mailto:alex.william...@redhat.com]
> Sent: Thursday, January 30, 2020 7:57 AM
> To: Liu, Yi L
> Subject: Re: [RFC v3 4/8] vfio/type1: Add
> VFIO_NESTING_GET_IOMMU_UAPI_VERSION
>
> On Wed, 29 Jan 2020 04:11:48 -0800
> "Liu, Yi L&q
> From: Alex Williamson [mailto:alex.william...@redhat.com]
> Sent: Tuesday, February 4, 2020 2:01 AM
> To: Liu, Yi L
> Subject: Re: [RFC v3 4/8] vfio/type1: Add
> VFIO_NESTING_GET_IOMMU_UAPI_VERSION
>
> On Fri, 31 Jan 2020 13:04:11 +
> "Liu, Yi L" wro
> From: Alex Williamson [mailto:alex.william...@redhat.com]
> Sent: Thursday, January 30, 2020 7:57 AM
> To: Liu, Yi L
> Subject: Re: [RFC v3 2/8] vfio/type1: Make per-application (VM) PASID quota
> tunable
>
> On Wed, 29 Jan 2020 04:11:46 -0800
> "Liu, Yi L&q
> From: Liu, Yi L
> Sent: Friday, January 31, 2020 8:41 PM
> To: Alex Williamson
> Subject: RE: [RFC v3 1/8] vfio: Add VFIO_IOMMU_PASID_REQUEST(alloc/free)
>
> Hi Alex,
>
> > From: Alex Williamson [mailto:alex.william...@redhat.com]
> > Sent: Thursday, January
Hi Alex,
Any comment on this series?
Regards,
Yi Liu
> From: Liu, Yi L
> Sent: Wednesday, January 29, 2020 8:19 PM
> To: alex.william...@redhat.com; eric.au...@redhat.com
> Subject: [RFC v1 0/2] vfio/pci: expose device's PASID capability to VMs
>
> Shared Virtual
Hi Jacob,
> From: Jacob Pan [mailto:jacob.jun@linux.intel.com]
> Sent: Saturday, February 8, 2020 3:44 AM
> To: Liu, Yi L
> Subject: Re: [RFC v3 2/8] vfio/type1: Make per-application (VM) PASID quota
> tunable
>
> On Wed, 29 Jan 2020 04:11:46 -0800
> "Liu, Yi L
What's changed from v2:
a) Detailed feature description
b) refine description in "Address translation in virtual SVM"
b) "Terms" is added
Content
===
1. Feature description
2. Why use it?
3. How to enable it
4. How to test
5. Terms
Details
=
Hi Jean,
> -Original Message-
> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com]
> Sent: Wednesday, September 20, 2017 8:10 PM
> To: Pan, Jacob jun ; iommu@lists.linux-
> foundation.org
> Cc: Liu, Yi L ; Raj, Ashok ; David
> Woodhouse ; Joerg R
was calling it iommu_passdown_invalidate() originally.
> The invalidation request comes from guest or user space instead of in-kernel
> unmap
> kind of calls.
[Liu, Yi L] I agree that iommu_invalidate() is too generic. Additionally, also
better to avoid
making it svm specific.
The reason we
> On Wed, Oct 11, 2017 at 07:54:32AM +0000, Liu, Yi L wrote:
> > I agree that iommu_invalidate() is too generic. Additionally, also
> > better to avoid making it svm specific.
>
> I also don't like to name the functions after the Intel feature, but I failed
&g
> -Original Message-
> From: Bob Liu [mailto:liub...@huawei.com]
> Sent: Thursday, October 12, 2017 5:39 PM
> To: Jean-Philippe Brucker ; Joerg Roedel
> ; Liu, Yi L
> Cc: Lan, Tianyu ; Liu, Yi L ;
> Greg
> Kroah-Hartman ; Wysocki, Rafael J
> ; LKML ;
> io
> -Original Message-
> From: Bob Liu [mailto:liub...@huawei.com]
> Sent: Thursday, October 12, 2017 6:08 PM
> To: Liu, Yi L ; Jean-Philippe Brucker philippe.bruc...@arm.com>; Joerg Roedel
> Cc: Lan, Tianyu ; Liu, Yi L ;
> Greg
> Kroah-Hartman ; Wysocki, Raf
> From: Jacob Pan [mailto:jacob.jun@linux.intel.com]
> Sent: Friday, October 6, 2017 7:04 AM
> To: iommu@lists.linux-foundation.org; LKML ;
> Joerg
> Roedel ; David Woodhouse ; Greg
> Kroah-Hartman ; Wysocki, Rafael J
> ; Jean-Philippe Brucker philippe.bruc...@arm.com&g
index
> f6697e5..43280ca 100644
> --- a/drivers/iommu/intel-svm.c
> +++ b/drivers/iommu/intel-svm.c
> @@ -292,7 +292,7 @@ int intel_svm_bind_mm(struct device *dev, int *pasid, int
> flags, struct svm_dev_
> int pasid_max;
> int ret;
>
> - if (WARN_ON(!iom
> -Original Message-
> From: Lu Baolu [mailto:baolu...@linux.intel.com]
> Sent: Friday, October 20, 2017 8:49 AM
> To: Liu, Yi L ; j...@8bytes.org; dw...@infradead.org
> Cc: iommu@lists.linux-foundation.org; linux-ker...@vger.kernel.org
> Subject: Re: [PATCH 1/3] i
gt; > + IOMMU_FAULT_REASON_ACCESS,
>
> And this a pgd or pte access fault?
>
> > + IOMMU_FAULT_REASON_INVALIDATE,
>
> What would this be?
>
> > + IOMMU_FAULT_REASON_UNKNOWN,
> > +};
>
> I'm currently doing the same exploratory work for virti
...@google.com;
> alex.william...@redhat.com; t...@semihalf.com; liub...@huawei.com;
> thunder.leiz...@huawei.com; xieyishe...@huawei.com;
> gabriele.paol...@huawei.com; nwatt...@codeaurora.org; ok...@codeaurora.org;
> rfr...@cavium.com; dw...@infradead.org; jacob.jun@linux.in
Hi Jean,
Nice to have you "online". This open is really blocking the progress. Pls check
inline.
> -Original Message-
> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com]
> Sent: Tuesday, November 7, 2017 3:02 AM
> To: Liu, Yi L ; Jacob Pan
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, F
chset subject: "vfio/pci: wrap pci device as a mediated device"
Liu, Yi L (3):
vfio_pci: split vfio_pci.c into two source files
vfio/pci: protect cap/ecap_perm bits alloc/free with atomic op
smaples: add vfio-mdev-pci driver
drivers/vfio/pci/Makefile
vfio_pci_init_perm_bits() will initialize the bits. While the last
caller of vfio_pci_uninit_perm_bits() will free the bits.
Cc: Kevin Tian
Cc: Lu Baolu
Suggested-by: Alex Williamson
Signed-off-by: Liu, Yi L
---
drivers/vfio/pci/vfio_pci_config.c | 9 +
1 file changed, 9 insertions(+)
diff --git a
This patch splits the non-module specific codes from original
drivers/vfio/pci/vfio_pci.c into a common.c under drivers/vfio/pci.
This is for potential code sharing. e.g. vfio-mdev-pci driver
Cc: Kevin Tian
Cc: Lu Baolu
Signed-off-by: Liu, Yi L
---
drivers/vfio/pci/Makefile |2
s/mdev/devices/83b8f4f2-509f-382f-3c1e-e6bfe0fa1003
g) destroy mdev
> echo 1 > /sys/bus/mdev/devices/83b8f4f2-509f-382f-3c1e-e6bfe0fa1003/\
remove
Cc: Kevin Tian
Cc: Lu Baolu
Cc: Masahiro Yamada
Suggested-by: Alex Williamson
Signed-off-by: Liu, Yi L
---
drivers/vfi
Hi Eric,
> From: Auger Eric [mailto:eric.au...@redhat.com]
> Sent: Thursday, April 25, 2019 1:28 AM
> To: Jacob Pan ;
> iommu@lists.linux-foundation.org;
> Subject: Re: [PATCH v2 09/19] iommu/vt-d: Enlightened PASID allocation
>
> Hi Jacob,
>
> On 4/24/19 1:31 AM, Jacob Pan wrote:
> > From: Lu
Hi Alex,
Sorry to disturb you. Do you want to review on this version or review a rebased
version? :-) If rebase version is better, I can try to do it asap.
Thanks,
Yi Liu
> -Original Message-
> From: Liu, Yi L
> Sent: Tuesday, April 23, 2019 8:15 PM
> To: alex.william..
> From Alex Williamson
> Sent: Thursday, May 23, 2019 9:03 PM
> To: Liu, Yi L
> Cc: kwankh...@nvidia.com; Tian, Kevin ;
> baolu...@linux.intel.com; Sun, Yi Y ; j...@8bytes.org;
> jean-
> philippe.bruc...@arm.com; pet...@redhat.com; linux-ker...@vger.kernel.org;
&
Hi Eric,
> From: Eric Auger [mailto:eric.au...@redhat.com]
> Sent: Monday, May 27, 2019 12:10 AM
> Subject: [PATCH v8 23/29] vfio: VFIO_IOMMU_CACHE_INVALIDATE
>
> From: "Liu, Yi L"
>
> When the guest "owns" the stage 1 translation structures, the h
Uv3 2 stage VFIO integration by Eric Auger
https://lists.sr.ht/~philmd/qemu/%3C20190527114203.2762-1-eric.auger%40redhat.com%3E
[6] [RFC PATCH 2/6] drivers core: Add I/O ASID allocator by Jean-Philippe
Brucker
https://www.spinics.net/lists/iommu/msg30639.html
Liu Yi L (4):
vfio: VFIO_IOMMU
From: Liu Yi L
This patch adds VFIO_IOMMU_ATTACH/DETACH_PASID_TABLE ioctl
which aims to pass/withdraw the virtual iommu guest configuration
to/from the VFIO driver downto to the iommu subsystem.
Cc: Kevin Tian
Signed-off-by: Jacob Pan
Signed-off-by: Liu Yi L
Signed-off-by: Eric Auger
From: Liu Yi L
This patch adds vfio support to bind guest translation structure
to host iommu. VFIO exposes iommu programming capability to user-
space. Guest is a user-space application in host under KVM solution.
For SVA usage in Virtual Machine, guest owns GVA->GPA translation
structure.
From: Liu Yi L
When the guest "owns" the stage 1 translation structures, the host
IOMMU driver has no knowledge of caching structure updates unless
the guest invalidation requests are trapped and passed down to the
host.
This patch adds the VFIO_IOMMU_CACHE_INVALIDATE ioctl wi
From: Liu Yi L
This patch adds VFIO_IOMMU_PASID_REQUEST ioctl which aims
to passdown PASID allocation/free request from the virtual
iommu. This is required to get PASID managed in system-wide.
Cc: Kevin Tian
Signed-off-by: Liu Yi L
Signed-off-by: Yi Sun
Signed-off-by: Jacob Pan
---
drivers
> From: Auger Eric [mailto:eric.au...@redhat.com]
> Sent: Thursday, July 18, 2019 6:17 PM
> To: Liu, Yi L ; alex.william...@redhat.com
> Subject: Re: [RFC v1 4/4] vfio/type1: bind guest pasid (guest page tables) to
> host
>
> Yi,
>
> On 7/5/19 1:06 PM, Liu, Yi
Hi Alex,
> From: Alex Williamson
> Sent: Friday, June 19, 2020 5:48 AM
>
> On Wed, 17 Jun 2020 08:28:24 +
> "Tian, Kevin" wrote:
>
> > > From: Liu, Yi L
> > > Sent: Wednesday, June 17, 2020 2:20 PM
> > >
> > >
Hi Alex,
> From: Alex Williamson
> Sent: Friday, June 19, 2020 10:55 AM
>
> On Fri, 19 Jun 2020 02:15:36 +0000
> "Liu, Yi L" wrote:
>
> > Hi Alex,
> >
> > > From: Alex Williamson
> > > Sent: Friday, June 19, 2020 5:48 AM
> &g
> From: Alex Williamson
> Sent: Saturday, June 20, 2020 12:38 AM
>
> On Fri, 19 Jun 2020 03:30:24 +0000
> "Liu, Yi L" wrote:
>
> > Hi Alex,
> >
> > > From: Alex Williamson
> > > Sent: Friday, June 19, 2020 10:55 AM
> > >
> From: Stefan Hajnoczi
> Sent: Monday, June 22, 2020 8:51 PM
>
> On Wed, Jun 17, 2020 at 06:27:27AM +0000, Liu, Yi L wrote:
> > > From: Stefan Hajnoczi
> > > Sent: Monday, June 15, 2020 5:41 PM
> > > On Thu, Jun 11, 2020 at 05:15:33AM -0700, Liu Yi
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_
lex Williamson
Cc: Eric Auger
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/iommu.c | 16
include/linux/intel-iommu.h | 4
include/linux/iommu.h | 1 +
3 files changed, 21 inserti
PASIDs. Currently the quota is a global parameter applied to
all VFIO devices. In the future per-device quota might be supported too.
Cc: Kevin Tian
CC: Jacob Pan
Cc: Eric Auger
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Suggested-by: Alex Williamson
Signed-off-by: Liu Yi L
---
v1
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: Jacob Pan
---
v2 -> v3:
*) remove cap/ecap_mask in iommu_nesting_info.
---
drivers/iommu/intel/iommu.c |
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: Jacob Pan
---
drivers/iommu/intel/iommu.c | 10 ++
drivers/iommu/intel/svm.c | 7 +--
2 files changed, 15 insertions(+), 2
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
---
v2 -> v3:
*) pass in domain info only
*) use ioasid_t for pasid instead of int type
v1 -&
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
---
v1 -> v2:
*) check the iommu_device to ensure the handl
: Liu Yi L
---
drivers/vfio/vfio_iommu_type1.c | 392 ++--
1 file changed, 213 insertions(+), 179 deletions(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
index 5e556ac..7accb59 100644
--- a/drivers/vfio/vfio_iommu_type1.c
+++ b
562324772-3084-1-git-send-email-yi.l@intel.com/
---
Eric Auger (1):
vfio: Document dual stage control
Liu Yi L (12):
vfio/type1: Refactor vfio_iommu_type1_ioctl()
iommu: Report domain nesting info
vfio/type1: Report iommu nesting info to userspace
vfio: Add PASID allocation/free s
l
Cc: Lu Baolu
Signed-off-by: Eric Auger
Signed-off-by: Liu Yi L
---
v2 -> v3:
*) address comments from Stefan Hajnoczi
v1 -> v2:
*) new in v2, compared with Eric's original version, pasid table bind
and fault reporting is removed as this series doesn't cover them.
Origi
lated discussion about this decision.
https://lkml.org/lkml/2020/5/15/1028
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
---
drivers/vfio/vfio_iommu_type1.c
-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/arm-smmu-v3.c | 29 --
drivers/iommu/arm-smmu.c| 29 --
include/uapi/linux/iommu.h | 59 +
3 files changed, 113 insertions(+), 4 deletions(-)
diff
inding request.
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: Jean-Philippe Brucker
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
v2 -> v3:
*) use __iommu_sva_unbind_gpasid() for unbind ca
amson
Cc: Eric Auger
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
---
v1 -> v2:
*) added in v2, but it was sent in a separate patchseries before
---
drivers/vfio/pci/vfio_pci_config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
Signed-off-by: Yi Sun
Signed-off-by: Jacob Pan
---
v1 -> v2:
*) move the vfio_mm related code to be a seprate module
*) use a single structure for alloc/free, could support a range of PASIDs
*) fetch vfio_mm
> From: Jean-Philippe Brucker
> Sent: Friday, June 26, 2020 3:48 PM
>
> On Wed, Jun 24, 2020 at 01:55:15AM -0700, Liu Yi L wrote:
> > IOMMUs that support nesting translation needs report the capability
> > info to userspace, e.g. the format of first level/stage paging
Hi Robin,
> From: Robin Murphy
> Sent: Saturday, June 27, 2020 12:05 AM
>
> On 2020-06-26 08:47, Jean-Philippe Brucker wrote:
> > On Wed, Jun 24, 2020 at 01:55:15AM -0700, Liu Yi L wrote:
> >> IOMMUs that support nesting translation needs report the capability
>
> From: Stefan Hajnoczi
> Sent: Monday, June 29, 2020 5:22 PM
>
> On Wed, Jun 24, 2020 at 01:55:26AM -0700, Liu Yi L wrote:
> > +Details can be found in Documentation/userspace-api/iommu.rst. For
> > +Intel VT-d, each stage 1 page table is bound to host by:
> >
Hi Stefan,
> From: Stefan Hajnoczi
> Sent: Monday, June 29, 2020 5:25 PM
>
> On Wed, Jun 24, 2020 at 01:55:15AM -0700, Liu Yi L wrote:
> > +/*
> > + * struct iommu_nesting_info - Information for nesting-capable IOMMU.
> > + * user spac
> From: Tian, Kevin
> Sent: Tuesday, June 30, 2020 10:01 AM
>
> > From: Liu, Yi L
> > Sent: Monday, June 29, 2020 8:23 PM
> >
> > Hi Stefan,
> >
> > > From: Stefan Hajnoczi
> > > Sent: Monday, June 29, 2020 5:25 PM
> > &
> From: Alex Williamson
> Sent: Friday, July 3, 2020 5:21 AM
> To: Liu, Yi L
>
> On Wed, 24 Jun 2020 01:55:14 -0700
> Liu Yi L wrote:
>
> > This patch refactors the vfio_iommu_type1_ioctl() to use switch
> > instead of if-else, and each cmd got a helper
> From: Williamson < alex.william...@redhat.com >
> Sent: Friday, July 3, 2020 5:20 AM
>
> On Wed, 24 Jun 2020 01:55:23 -0700
> Liu Yi L wrote:
>
> > This patch provides an interface allowing the userspace to invalidate
> > IOMMU cache for first-level page
> From: Alex Williamson
> Sent: Friday, July 3, 2020 1:55 AM
>
> On Wed, 24 Jun 2020 01:55:15 -0700
> Liu Yi L wrote:
>
> > IOMMUs that support nesting translation needs report the capability
> > info to userspace, e.g. the format of first level/stage paging
Hi Alex,
> From: Alex Williamson < alex.william...@redhat.com >
> Sent: Friday, July 3, 2020 2:39 AM
>
> On Wed, 24 Jun 2020 01:55:16 -0700
> Liu Yi L wrote:
>
> > This patch exports iommu nesting capability info to user space through
> > VFIO. User spac
Hi Alex,
> From: Alex Williamson
> Sent: Friday, July 3, 2020 5:17 AM
>
> On Wed, 24 Jun 2020 01:55:17 -0700
> Liu Yi L wrote:
>
> > Shared Virtual Addressing (a.k.a Shared Virtual Memory) allows sharing
> > multiple process virtual address spaces
Hi Alex,
> From: Alex Williamson
> Sent: Friday, July 3, 2020 5:19 AM
>
> On Wed, 24 Jun 2020 01:55:19 -0700
> Liu Yi L wrote:
>
> > This patch allows user space to request PASID allocation/free, e.g.
> > when serving the request from the guest.
> >
> &
Hi Alex,
> From: Alex Williamson
> Sent: Friday, July 3, 2020 5:20 AM
>
> On Wed, 24 Jun 2020 01:55:22 -0700
> Liu Yi L wrote:
>
> > Nesting translation allows two-levels/stages page tables, with 1st
> > level for guest translations (e.g. GVA->GPA), 2nd lev
Hi Alex,
> From: Liu, Yi L
> Sent: Friday, July 3, 2020 2:06 PM
[...]
> > > +#define VFIO_IOMMU_TYPE1_INFO_CAP_NESTING 3
> > > +
> > > +struct vfio_iommu_type1_info_cap_nesting {
> > > + struct vfio_info_cap_header header;
> > > + __u32 fla
PASIDs. Currently the quota is a global parameter applied to
all VFIO devices. In the future per-device quota might be supported too.
Cc: Kevin Tian
CC: Jacob Pan
Cc: Eric Auger
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Suggested-by: Alex Williamson
Signed-off-by: Liu Yi L
---
v3
it-send-email-yi.l@intel.com/
- RFC v1 -> v2:
Dropped vfio: VFIO_IOMMU_ATTACH/DETACH_PASID_TABLE.
RFC v1:
https://lore.kernel.org/linux-iommu/1562324772-3084-1-git-send-email-yi.l@intel.com/
---
Eric Auger (1):
vfio: Document dual stage control
Liu Yi L
: Liu Yi L
---
drivers/vfio/vfio_iommu_type1.c | 392 ++--
1 file changed, 213 insertions(+), 179 deletions(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
index 5e556ac..7accb59 100644
--- a/drivers/vfio/vfio_iommu_type1.c
+++ b
l
Cc: Lu Baolu
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Eric Auger
Signed-off-by: Liu Yi L
---
v3 -> v4:
*) add review-by from Stefan Hajnoczi
v2 -> v3:
*) address comments from Stefan Hajnoczi
v1 -> v2:
*) new in v2, compared with Eric's original version, pasid tabl
lated discussion about this decision.
https://lkml.org/lkml/2020/5/15/1028
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
---
v3 -> v4:
*) address comments against v3.
v1 -> v2:
*)
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
---
v1 -> v2:
*) check the iommu_device to ensure the handl
: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
Signed-off-by: Yi Sun
Signed-off-by: Jacob Pan
---
v3 -> v4:
*) address comments from v3, except the below comment against the range
of PASID_FREE request. needs more help on it.
"> +if (re
inding request.
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: Jean-Philippe Brucker
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
v3 -> v4:
*) address comments from Alex on v3
v2 ->
: Alex Williamson
Cc: Eric Auger
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
v3 -> v4:
*) split the SMMU driver changes to be a separate patch
*) move the @addr_width and @pasid_bits from vendor specific
part to generic p
amson
Cc: Eric Auger
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
---
v1 -> v2:
*) added in v2, but it was sent in a separate patchseries before
---
drivers/vfio/pci/vfio_pci_config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
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_
Cc: Will Deacon
Cc: Robin Murphy
Cc: Eric Auger
Cc: Jean-Philippe Brucker
Suggested-by: Jean-Philippe Brucker
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/arm-smmu-v3.c | 29 +++--
drivers/iommu/arm-smmu.c| 29
lex Williamson
Cc: Eric Auger
Cc: Jean-Philippe Brucker
Cc: Joerg Roedel
Cc: Lu Baolu
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
drivers/iommu/intel/iommu.c | 16
include/linux/intel-iommu.h | 4
include/linux/iommu.h | 1 +
3 files changed, 21 inserti
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: Jacob Pan
---
drivers/iommu/intel/iommu.c | 10 ++
drivers/iommu/intel/svm.c | 7 +--
2 files changed, 15 insertions(+), 2
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
---
v2 -> v3:
*) pass in domain info only
*) use ioasid_t for pasid instead of int type
v1 -&
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: Jacob Pan
---
v2 -> v3:
*) remove cap/ecap_mask in iommu_nesting_info.
---
drivers/iommu/intel/iommu.c |
Hi Eric,
> From: Auger Eric
> Sent: Monday, July 6, 2020 5:34 PM
>
> On 7/4/20 1:26 PM, Liu Yi L wrote:
> > IOMMUs that support nesting translation needs report the capability info
> need to report
> > to userspace, e.g. the format of first level/stage paging str
Hi Eric,
> From: Auger Eric
> Sent: Monday, July 6, 2020 5:34 PM
>
> Hi Yi,
>
> On 7/4/20 1:26 PM, Liu Yi L wrote:
> > This patch refactors the vfio_iommu_type1_ioctl() to use switch
> > instead of if-else, and each cmd got a helper function.
> command
I
Hi Eric,
> From: Auger Eric
>
> Hi Yi,
>
> Please add a commit message: instead of returning a boolean for
> DOMAIN_ATTR_NESTING, arm_smmu_domain_get_attr() returns a
> iommu_nesting_info handle.
will do. thanks for the suggestion.
>
> On 7/4/20 1:26 PM, Liu Yi L
Hi Eric,
> From: Auger Eric
> Sent: Monday, July 6, 2020 8:56 PM
>
> Hi Yi,
>
> On 7/6/20 2:27 PM, Liu, Yi L wrote:
> > Hi Eric,
> >
> >> From: Auger Eric
> >> Sent: Monday, July 6, 2020 5:34 PM
> >>
> >> Hi Yi,
> >
Hi Eric,
> From: Auger Eric
> Sent: Monday, July 6, 2020 6:37 PM
>
> Yi,
>
> On 7/4/20 1:26 PM, Liu Yi L wrote:
> > This patch exports iommu nesting capability info to user space through
> > VFIO. User space is expected to check this info for supported uAPIs (e
> From: Auger Eric
> Sent: Monday, July 6, 2020 9:01 PM
>
> On 7/6/20 2:20 PM, Liu, Yi L wrote:
> > Hi Eric,
> >
> >> From: Auger Eric
> >> Sent: Monday, July 6, 2020 5:34 PM
> >>
> >> On 7/4/20 1:26 PM, Liu Yi L wrote:
> >>
201 - 300 of 545 matches
Mail list logo