Hi Alex,
On 7/30/20 4:32 AM, Alex Williamson wrote:
On Tue, 14 Jul 2020 13:57:03 +0800
Lu Baolu wrote:
Replace iommu_aux_at(de)tach_device() with iommu_aux_at(de)tach_group().
It also saves the IOMMU_DEV_FEAT_AUX-capable physcail device in the
vfio_group data structure so that it could be
Hi Alex,
On 7/30/20 4:03 AM, Alex Williamson wrote:
On Tue, 14 Jul 2020 13:57:00 +0800
Lu Baolu wrote:
The iommu aux-domain api's work only when IOMMU_DEV_FEAT_AUX is enabled
for the device. Add this check to avoid misuse.
Shouldn't this really be the IOMMU driver's respons
(pci_pasid_features) for PRI.
Fixes: b16d0cb9e2fc ("iommu/vt-d: Always enable PASID/PRI PCI capabilities before
ATS")
Signed-off-by: Ashok Raj
To: Bjorn Helgaas
To: Joerg Roedel
To: Lu Baolu
Reviewed-by: Lu Baolu
Best regards,
baolu
Cc: sta...@vger.kernel.org
Cc: linux-...@vger.kernel.org
,
baolu
On 2020/7/14 13:56, Lu Baolu wrote:
This series aims to extend the IOMMU aux-domain API set so that it
could be more friendly to vfio/mdev usage. The interactions between
vfio/mdev and iommu during mdev creation and passthr are:
1. Create a group for mdev with iommu_group_alloc();
2. Add
On 7/22/20 7:45 AM, Limonciello, Mario wrote:
-Original Message-
From: Lu Baolu
Sent: Tuesday, July 21, 2020 6:07 PM
To: Limonciello, Mario; Joerg Roedel
Cc: baolu...@linux.intel.com; Ashok Raj; linux-kernel@vger.kernel.org;
sta...@vger.kernel.org; Koba Ko; io...@lists.linux
those devices and skips TE disabling if
the qurik hits.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=208363
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=206571
Tested-by: Koba Ko
Tested-by: Jun Miao
Cc: Ashok Raj
Cc: sta...@vger.kernel.org
Signed-off-by: Lu Baolu
---
Change since v1
efficient in that multiple
PASIDs can be used by a single device, when tearing down a PASID entry
we shall flush only the devTLB specific to a PASID.
Fixes: 6f7db75e1c46 ("iommu/vt-d: Add second level page table")
Signed-off-by: Jacob Pan
Reviewed-by: Eric Auger
Acked-by: Lu Ba
On 7/22/20 11:03 AM, Jun Miao wrote:
On 7/22/20 10:40 AM, Lu Baolu wrote:
Hi Jun,
On 7/22/20 10:26 AM, Miao, Jun wrote:
Kernel panic - not syncing: DMAR hardware is malfunctioning
CPU: 0 PID: 347 Comm: rtcwake Not tainted 5.4.0-yocto-standard #124
Hardware name: Intel Corporation Ice Lake
As Intel VT-d files have been move to its own subdirectory, the prefix
makes no sense.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/debugfs.c | 2 +-
drivers/iommu/intel/iommu.c| 2 +-
drivers/iommu/intel/pasid.c| 2 +-
drivers/iommu
Hi Jun,
On 7/22/20 10:26 AM, Miao, Jun wrote:
Kernel panic - not syncing: DMAR hardware is malfunctioning
CPU: 0 PID: 347 Comm: rtcwake Not tainted 5.4.0-yocto-standard #124
Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4
SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3162.A00.190
checks and enforce
address to be page aligned, otherwise reserved bits can be set in the
invalidation descriptor. Unrecoverable fault will be reported due to
non-zero value in the reserved bits.
Fixes: 61a06a16e36d8 ("iommu/vt-d: Support flushing more translation
cache types")
Acked-by
Hi Limonciello,
On 7/21/20 10:44 PM, Limonciello, Mario wrote:
-Original Message-
From: iommu On Behalf Of Lu
Baolu
Sent: Monday, July 20, 2020 7:17 PM
To: Joerg Roedel
Cc: Ashok Raj;linux-kernel@vger.kernel.org;sta...@vger.kernel.org; Koba
Ko;io...@lists.linux-foundation.org
Subject
those devices and skips TE disabling if
the qurik hits.
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=208363
Tested-by: Koba Ko
Cc: Ashok Raj
Cc: sta...@vger.kernel.org
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/dmar.c | 1 +
drivers/iommu/intel/iommu.c | 27
On 7/17/20 2:45 AM, Jacob Pan wrote:
IOMMU generic layer already does sanity checks UAPI data for version
match and argsz range under generic information.
Remove the redundant version check from VT-d driver and check for vendor
specific data size.
Signed-off-by: Jacob Pan
Reviewed-by: Lu
Hi Jacob,
On 7/16/20 12:01 AM, Jacob Pan wrote:
On Wed, 15 Jul 2020 08:47:36 +0800
Lu Baolu wrote:
Hi Jacob,
On 7/15/20 12:39 AM, Jacob Pan wrote:
On Tue, 14 Jul 2020 13:57:01 +0800
Lu Baolu wrote:
This adds two new aux-domain APIs for a use case like vfio/mdev
where sub-devices
Hi Christoph and Jacob,
On 7/15/20 12:29 AM, Jacob Pan wrote:
On Tue, 14 Jul 2020 09:25:14 +0100
Christoph Hellwig wrote:
On Tue, Jul 14, 2020 at 01:57:03PM +0800, Lu Baolu wrote:
Replace iommu_aux_at(de)tach_device() with
iommu_aux_at(de)tach_group(). It also saves the
IOMMU_DEV_FEAT_AUX
Hi Jacob,
On 7/15/20 12:39 AM, Jacob Pan wrote:
On Tue, 14 Jul 2020 13:57:01 +0800
Lu Baolu wrote:
This adds two new aux-domain APIs for a use case like vfio/mdev where
sub-devices derived from an aux-domain capable device are created and
put in an iommu_group
Replace iommu_aux_at(de)tach_device() with iommu_aux_at(de)tach_group().
It also saves the IOMMU_DEV_FEAT_AUX-capable physcail device in the
vfio_group data structure so that it could be reused in other places.
Signed-off-by: Lu Baolu
---
drivers/vfio/vfio_iommu_type1.c | 44
,
struct device *dev)
It also adds a flag in the iommu_group data structure to identify
an iommu_group with aux-domain attached from those normal ones.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommu.c | 58 +++
include/linux/iommu.h | 17 +
2
The iommu aux-domain api's work only when IOMMU_DEV_FEAT_AUX is enabled
for the device. Add this check to avoid misuse.
Signed-off-by: Lu Baolu
---
drivers/iommu/iommu.c | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/
-by: Alex Williamson
Signed-off-by: Lu Baolu
---
drivers/iommu/iommu.c | 18 ++
include/linux/iommu.h | 7 +++
2 files changed, 25 insertions(+)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index cad5a19ebf22..434bf42b6b9b 100644
--- a/drivers/iommu/iommu.c
++
olu
---
Change log:
- v1->v2:
-
https://lore.kernel.org/linux-iommu/20200627031532.28046-1-baolu...@linux.intel.com/
- Suggested by Robin.
- v2->v3:
-
https://lore.kernel.org/linux-iommu/20200707013957.23672-1-baolu...@linux.intel.com/
- Suggested by Alex
Lu Baolu (4):
iom
Hi Kevin,
On 2020/7/10 13:49, Tian, Kevin wrote:
From: Lu Baolu
Sent: Friday, July 10, 2020 1:37 PM
Hi Kevin,
On 2020/7/10 10:42, Tian, Kevin wrote:
From: Lu Baolu
Sent: Thursday, July 9, 2020 3:06 PM
After page requests are handled, software must respond to the device
which raised the page
Hi Kevin,
On 2020/7/10 10:42, Tian, Kevin wrote:
From: Lu Baolu
Sent: Thursday, July 9, 2020 3:06 PM
After page requests are handled, software must respond to the device
which raised the page request with the result. This is done through
the iommu ops.page_response if the request was reported
Hi Kevin,
On 2020/7/10 10:24, Tian, Kevin wrote:
From: Lu Baolu
Sent: Thursday, July 9, 2020 3:06 PM
A pasid might be bound to a page table from a VM guest via the iommu
ops.sva_bind_gpasid. In this case, when a DMA page fault is detected
on the physical IOMMU, we need to inject the page
There are several places in the code that need to get the pointers of
svm and sdev according to a pasid and device. Add a helper to achieve
this for code consolidation and readability.
Signed-off-by: Lu Baolu
Reviewed-by: Kevin Tian
---
drivers/iommu/intel/svm.c | 121
of page_response ops.
Co-developed-by: Jacob Pan
Signed-off-by: Jacob Pan
Co-developed-by: Liu Yi L
Signed-off-by: Liu Yi L
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 1 +
drivers/iommu/intel/svm.c | 100
include/linux/intel-iommu.h
: Liu Yi L
Signed-off-by: Liu Yi L
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 103 +++---
1 file changed, 85 insertions(+), 18 deletions(-)
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
index c23167877b2b..d24e71bac8db 100644
It is refactored in two ways:
- Make it global so that it could be used in other files.
- Make bus/devfn optional so that callers could ignore these two returned
values when they only want to get the coresponding iommu pointer.
Signed-off-by: Lu Baolu
Reviewed-by: Kevin Tian
---
drivers
lkml/2020/6/27/387
- Remove unnecessary pci_get_domain_bus_and_slot()
- Return error when sdev == NULL in intel_svm_page_response()
Lu Baolu (4):
iommu/vt-d: Refactor device_to_iommu() helper
iommu/vt-d: Add a helper to get svm and sdev for pasid
iommu/vt-d: Report page request faults
On 2020/7/7 9:39, Lu Baolu wrote:
The hardware assistant vfio mediated device is a use case of iommu
aux-domain. The interactions between vfio/mdev and iommu during mdev
creation and passthr are:
- Create a group for mdev with iommu_group_alloc();
- Add the device to the group with
Hi Jacob,
On 7/8/20 11:29 PM, Jacob Pan wrote:
On Wed, 8 Jul 2020 10:07:13 +0800
Lu Baolu wrote:
Hi,
On 7/8/20 7:43 AM, Jacob Pan wrote:
+For UAPIs that are shared with in-kernel users, a wrapper function
+is provided to distinguish the callers. For example,
+
+Userspace caller ::
+
+ int
Hi Alex,
On 7/9/20 3:07 AM, Alex Williamson wrote:
On Wed, 8 Jul 2020 10:53:12 +0800
Lu Baolu wrote:
Hi Alex,
Thanks a lot for your comments. Please check my reply inline.
On 7/8/20 5:04 AM, Alex Williamson wrote:
On Tue, 7 Jul 2020 09:39:56 +0800
Lu Baolu wrote:
The hardware
Hi Kevin,
On 7/6/20 9:47 AM, Tian, Kevin wrote:
From: Lu Baolu
Sent: Monday, July 6, 2020 8:26 AM
After a page request is handled, software must response the device which
raised the page request with the handling result. This is done through
'response' is a noun.
Yes.
Hi Alex,
Thanks a lot for your comments. Please check my reply inline.
On 7/8/20 5:04 AM, Alex Williamson wrote:
On Tue, 7 Jul 2020 09:39:56 +0800
Lu Baolu wrote:
The hardware assistant vfio mediated device is a use case of iommu
aux-domain. The interactions between vfio/mdev and iommu
Hi Jacob,
On 7/8/20 7:43 AM, Jacob Pan wrote:
IOMMU UAPI data size is filled by the user space which must be validated
by ther kernel. To ensure backward compatibility, user data can only be
extended by either re-purpose padding bytes or extend the variable sized
union at the end. No size change
Hi Jean,
On 7/7/20 7:23 PM, Jean-Philippe Brucker wrote:
On Mon, Jul 06, 2020 at 08:25:34AM +0800, Lu Baolu wrote:
A pasid might be bound to a page table from a VM guest via the iommu
ops.sva_bind_gpasid. In this case, when a DMA page fault is detected
on the physical IOMMU, we need to inject
Hi,
On 7/8/20 7:43 AM, Jacob Pan wrote:
+For UAPIs that are shared with in-kernel users, a wrapper function
+is provided to distinguish the callers. For example,
+
+Userspace caller ::
+
+ int iommu_sva_unbind_gpasid(struct iommu_domain *domain, struct device *dev,
+ void __user *udata)
+
+In-
Hi Koba KO,
On 2020/7/7 11:27, Koba Ko wrote:
Dear Baolu,
On Tue, Jun 30, 2020 at 3:52 PM Lu Baolu wrote:
Hi Koba,
On 2020/6/30 15:31, Koba Ko wrote:
On Mon, Jun 15, 2020 at 3:20 PM Lu Baolu wrote:
Hi Koba Ko,
On 2020/6/15 11:19, Koba Ko wrote:
hi All,
I have a machine and there
cording to Robin's feedback.
Your comments are very appreciated.
Best regards,
baolu
Lu Baolu (2):
iommu: iommu_aux_at(de)tach_device() extension
iommu: Add aux_domain_attached flag to iommu_group
drivers/iommu/iommu.c | 98 +
drivers/vfio/vfio_iom
rohibit an iommu_group to go through aux-domain api's if
group->domain != NULL; but we don't check aux-domain attachment in the
normal attach api's. This marks an iommu_group after an aux-domain is
attached, so that normal domain at(de)tach api's should never be used
after that.
Cc
This extends iommu_aux_at(de)tach_device() so that the users could pass
in an optional device pointer (struct device for vfio/mdev for example),
and the necessary check and data link could be done.
Fixes: a3a195929d40b ("iommu: Add APIs for multiple domains per device")
Cc: Robin Murphy
On 7/2/20 10:36 AM, Lu Baolu wrote:
Hi Robin,
On 7/1/20 8:18 PM, Robin Murphy wrote:
On 2020-07-01 08:32, Lu Baolu wrote:
Hi Robin,
On 2020/7/1 0:51, Robin Murphy wrote:
On 2020-06-30 02:03, Lu Baolu wrote:
Hi Robin,
On 6/29/20 7:56 PM, Robin Murphy wrote:
On 2020-06-27 04:15, Lu Baolu
On 2020/7/6 9:36, Tian, Kevin wrote:
From: Tian, Kevin
Sent: Monday, July 6, 2020 9:30 AM
From: Lu Baolu
Sent: Monday, July 6, 2020 8:26 AM
A pasid might be bound to a page table from a VM guest via the iommu
ops.sva_bind_gpasid. In this case, when a DMA page fault is detected
on the
Hi Kevin,
On 2020/7/6 9:29, Tian, Kevin wrote:
From: Lu Baolu
Sent: Monday, July 6, 2020 8:26 AM
A pasid might be bound to a page table from a VM guest via the iommu
ops.sva_bind_gpasid. In this case, when a DMA page fault is detected
on the physical IOMMU, we need to inject the page fault
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 99 ---
1 file changed, 81 insertions(+), 18 deletions(-)
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
index c23167877b2b..08c58c2b1a06 100644
--- a/drivers/iommu/intel/svm.c
+++ b
implementation of page_response ops.
Co-developed-by: Jacob Pan
Signed-off-by: Jacob Pan
Co-developed-by: Liu Yi L
Signed-off-by: Liu Yi L
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 1 +
drivers/iommu/intel/svm.c | 74 +
include/linux/intel
There are several places in the code that need to get the pointers of
svm and sdev according to a pasid and device. Add a helper to achieve
this for code consolidation and readability.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 121 +-
1 file
It is refactored in two ways:
- Make it global so that it could be used in other files.
- Make bus/devfn optional so that callers could ignore these two returned
values when they only want to get the coresponding iommu pointer.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 55
Remove unnecessary pci_get_domain_bus_and_slot()
- Return error when sdev == NULL in intel_svm_page_response()
Lu Baolu (4):
iommu/vt-d: Refactor device_to_iommu() helper
iommu/vt-d: Add a helper to get svm and sdev for pasid
iommu/vt-d: Report page request faults for guest SVA
iommu/vt-d: Ad
Hi Robin,
On 7/1/20 8:18 PM, Robin Murphy wrote:
On 2020-07-01 08:32, Lu Baolu wrote:
Hi Robin,
On 2020/7/1 0:51, Robin Murphy wrote:
On 2020-06-30 02:03, Lu Baolu wrote:
Hi Robin,
On 6/29/20 7:56 PM, Robin Murphy wrote:
On 2020-06-27 04:15, Lu Baolu wrote:
The hardware assistant vfio
Hello,
On 7/1/20 8:18 PM, Robin Murphy wrote:
On 2020-07-01 08:32, Lu Baolu wrote:
Hi Robin,
On 2020/7/1 0:51, Robin Murphy wrote:
On 2020-06-30 02:03, Lu Baolu wrote:
Hi Robin,
On 6/29/20 7:56 PM, Robin Murphy wrote:
On 2020-06-27 04:15, Lu Baolu wrote:
The hardware assistant vfio
patch relax the fault
handling from error to warning and proceed with invalidation request
with the given mask.
Signed-off-by: Jacob Pan
Fixes: 6ee1b77ba3ac0 ("iommu/vt-d: Add svm/sva invalidate function")
Acked-by: Lu Baolu
Best regards,
baolu
---
drivers/iommu/intel/iommu.c | 7 +
efficient in that multiple
PASIDs can be used by a single device, when tearing down a PASID entry
we shall flush only the devTLB specific to a PASID.
Fixes: 6f7db75e1c46 ("iommu/vt-d: Add second level page table")
Signed-off-by: Jacob Pan
Acked-by: Lu Baolu
Best regards,
baolu
---
Hi Robin,
On 2020/7/1 0:51, Robin Murphy wrote:
On 2020-06-30 02:03, Lu Baolu wrote:
Hi Robin,
On 6/29/20 7:56 PM, Robin Murphy wrote:
On 2020-06-27 04:15, Lu Baolu wrote:
The hardware assistant vfio mediated device is a use case of iommu
aux-domain. The interactions between vfio/mdev and
Hi Kevin,
On 6/30/20 2:19 PM, Tian, Kevin wrote:
From: Lu Baolu
Sent: Sunday, June 28, 2020 8:34 AM
After a page request is handled, software must response the device which
raised the page request with the handling result. This is done through
the iommu ops.page_response if the request was
Hi Kevin,
Thanks a lot for reviewing my patches.
On 6/30/20 2:01 PM, Tian, Kevin wrote:
From: Lu Baolu
Sent: Sunday, June 28, 2020 8:34 AM
A pasid might be bound to a page table from a VM guest via the iommu
ops.sva_bind_gpasid. In this case, when a DMA page fault is detected
on the physical
Hi Jerry,
On 7/1/20 4:06 AM, Jerry Snitselaar wrote:
Move Intel Kconfig and Makefile bits down into intel directory
with the rest of the Intel specific files.
Cc: Joerg Roedel
Cc: Lu Baolu
Reviewed-by: Lu Baolu
Best regards,
baolu
Signed-off-by: Jerry Snitselaar
---
drivers/iommu
Hi Jacob,
On 7/1/20 1:34 AM, Jacob Pan wrote:
On Thu, 25 Jun 2020 18:10:43 +0800
Lu Baolu wrote:
Hi,
On 2020/6/23 23:43, Jacob Pan wrote:
For guest requested IOTLB invalidation, address and mask are
provided as part of the invalidation data. VT-d HW silently ignores
any address bits below
7ba3ac ("iommu/vt-d: Add svm/sva invalidate function")
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
Acked-by: Lu Baolu
Best regards,
baolu
---
drivers/iommu/intel/iommu.c | 28 ++--
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/dri
reserved bits can be set in the
invalidation descriptor. Unrecoverable fault will be reported due to
non-zero value in the reserved bits.
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
Fixes: 61a06a16e36d8 ("iommu/vt-d: Support flushing more translation
cache types")
Acked-by: Lu Ba
Hi Jacob,
On 7/1/20 5:07 AM, Jacob Pan wrote:
DevTLB flush can be used for both DMA request with and without PASIDs.
The former uses PASID#0 (RID2PASID), latter uses non-zero PASID for SVA
usage.
This patch adds a check for PASID value such that devTLB flush with
PASID is used for SVA case. Thi
Hi Koba,
On 2020/6/30 15:31, Koba Ko wrote:
On Mon, Jun 15, 2020 at 3:20 PM Lu Baolu wrote:
Hi Koba Ko,
On 2020/6/15 11:19, Koba Ko wrote:
hi All,
I have a machine and there's only intel gpu.
the secureboot and vt-d is enabled in BIOS.
On the Ubuntu desktop, I do s2idle first and re
sing the same "ExternalFacing" firmware info. Any
device not behind the "ExternalFacing" bridges are marked internal and
the ones behind such bridges are markes external.
Signed-off-by: Rajat Jain
For changes in Intel VT-d driver,
Reviewed-by: Lu Baolu
Best regards,
baolu
---
d then use it to mark any downstream devices as "untrusted". The
external-facing devices themselves are left as "trusted". This was
discussed here: https://lkml.org/lkml/2020/6/10/1049
Signed-off-by: Rajat Jain
For changes in Intel VT-d driver,
Reviewed-by: Lu Baolu
Hi Robin,
On 6/29/20 7:56 PM, Robin Murphy wrote:
On 2020-06-27 04:15, Lu Baolu wrote:
The hardware assistant vfio mediated device is a use case of iommu
aux-domain. The interactions between vfio/mdev and iommu during mdev
creation and passthr are:
- Create a group for mdev with
implementation of page_response ops.
Co-developed-by: Jacob Pan
Signed-off-by: Jacob Pan
Co-developed-by: Liu Yi L
Signed-off-by: Liu Yi L
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 1 +
drivers/iommu/intel/svm.c | 73 +
include/linux/intel
->sva_bind_gpasid() api, the page requests should be routed to
the guest, and after the page is served, the device should be responded
with the result.
Your review comments are very appreciated.
Best regards,
baolu
Lu Baolu (4):
iommu/vt-d: Refactor device_to_iommu() helper
iommu/vt-d: Add a hel
There are several places in the code that need to get the pointers of
svm and sdev according to a pasid and device. Add a helper to achieve
this for code consolidation and readability.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 121 +-
1 file
It is refactored in two ways:
- Make it global so that it could be used in other files.
- Make bus/devfn optional so that callers could ignore these two returned
values when they only want to get the coresponding iommu pointer.
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/iommu.c | 55
Signed-off-by: Lu Baolu
---
drivers/iommu/intel/svm.c | 83 +--
1 file changed, 80 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c
index c23167877b2b..4800bb6f8794 100644
--- a/drivers/iommu/intel/svm.c
+++ b
Update group->domain whenever an aux-domain is attached to or detached
from a mediated device. Without this change, iommu_get_domain_for_dev()
will be broken for mdev devices.
Fixes: 7bd50f0cd2fd5 ("vfio/type1: Add domain at(de)taching group helpers")
Signed-off-by: Lu Baolu
---
t, iommu_get_domain_for_dev() doesn't work anymore.
This adds iommu_group_get/set_domain() so that group->domain could be
managed whenever a domain is attached or detached through the aux-domain
api's.
Fixes: 7bd50f0cd2fd5 ("vfio/type1: Add domain at(de)taching group helpers&
SR is already initialized, then the #GP was for some
other reason
3) Try initializing the PASID MSR and returning. If the #GP was from
an ENQCMD this will fix it. If not, the #GP fault will be repeated
and will hit case "2".
For changes in Intel VT-d driver,
Reviewed-by: Lu Baolu
"u32" is also shorter and a little more explicit than "unsigned int".
For changes in Intel VT-d driver,
Reviewed-by: Lu Baolu
Best regards,
baolu
No PASID type change in uapi although it defines PASID as __u64 in
some places.
Suggested-by: Thomas Gleixner
Signed-off-by
exits (so no need to keep
reference counts on how many SVM devices are sharing the PASID).
For changes in Intel VT-d driver,
Reviewed-by: Lu Baolu
Best regards,
baolu
Signed-off-by: Fenghua Yu
Reviewed-by: Tony Luck
---
v4:
- Change PASID type to u32 (Christoph)
v3:
- Add sanity
Hi Fenghua,
On 2020/6/26 4:17, Fenghua Yu wrote:
"flags" passed to intel_svm_bind_mm() is a bit mask and should be
defined as "unsigned int" instead of "int".
Change its type to "unsigned int".
Reviewed-by: Lu Baolu
Best regards,
baolu
Sugg
ers/iommu/intel/iommu.c| 18 +-
For changes in VT-d driver,
Reviewed-by: Lu Baolu
Best regards,
baolu
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
b/drivers/gpu/drm/i915/selfte
Hi Jacob,
On 2020/6/24 1:03, Jacob Pan wrote:
+int __iommu_sva_unbind_gpasid(struct iommu_domain *domain, struct device *dev,
+ struct iommu_gpasid_bind_data *data)
{
if (unlikely(!domain->ops->sva_unbind_gpasid))
return -ENODEV;
- return domain
available.
Overall, the complexity and potential glitch do not warrant this unlikely
use case thereby removed by this patch.
Cc: Kevin Tian
Cc: Lu Baolu
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
Fixes: 56722a4398a30 ("iommu/vt-d: Add bind guest PASID support")
Acked-by: Lu Ba
Hi,
On 2020/6/23 23:43, Jacob Pan wrote:
For guest requested IOTLB invalidation, address and mask are provided as
part of the invalidation data. VT-d HW silently ignores any address bits
below the mask. SW shall also allow such case but give warning if
address does not align with the mask. This
Hi,
On 2020/6/23 23:43, Jacob Pan wrote:
From: Liu Yi L
Address information for device TLB invalidation comes from userspace
when device is directly assigned to a guest with vIOMMU support.
VT-d requires page aligned address. This patch checks and enforce
address to be page aligned, otherwise
On 2020/6/23 23:43, Jacob Pan wrote:
DevTLB flush can be used for both DMA request with and without PASIDs.
The former uses PASID#0 (RID2PASID), latter uses non-zero PASID for SVA
usage.
This patch adds a check for PASID value such that devTLB flush with
PASID is used for SVA case. This is more
On 2020/6/23 23:43, Jacob Pan wrote:
Global pages support is removed from VT-d spec 3.0 for dev TLB
invalidation. This patch is to remove the bits for vSVA. Similar change
already made for the native SVA. See the link below.
Acked-by: Lu Baolu
Best regards,
baolu
Link: https://lkml.org
On 2020/6/23 23:43, Jacob Pan wrote:
From: Liu Yi L
Set proper masks to avoid invalid input spillover to reserved bits.
Acked-by: Lu Baolu
Best regards,
baolu
Signed-off-by: Liu Yi L
Signed-off-by: Jacob Pan
---
include/linux/intel-iommu.h | 4 ++--
1 file changed, 2 insertions
On 2020/6/25 1:07, Jacob Pan wrote:
On Wed, 24 Jun 2020 14:54:49 +0800
Lu Baolu wrote:
Hi Jacob,
On 2020/6/24 1:03, Jacob Pan wrote:
IOMMU UAPI data has a user filled argsz field which indicates the
data length comes with the API call. User data is not trusted,
argsz must be validated based
Hi Jacob,
On 2020/6/24 1:03, Jacob Pan wrote:
Guest SVA unbind data can come from either kernel and user space, if a
either kernel or user space
user pointer is passed in, IOMMU driver must copy from data from user.
copy data from user
If the unbind data is assembled in kernel, data can
Hi Jacob,
On 2020/6/24 1:03, Jacob Pan wrote:
IOMMU UAPI data has a user filled argsz field which indicates the data
length comes with the API call. User data is not trusted, argsz must be
validated based on the current kernel data size, mandatory data size,
and feature flags.
User data may als
GRANU_ADDR &&
size &&
- (inv_info->addr_info.addr & ((BIT(VTD_PAGE_SHIFT +
size)) - 1))) {
+ (inv_info->granu.addr_info.addr &
((BIT(VTD_PAGE_SHIFT + size)) - 1))) {
Nit: Keep it a
The iommu_domain_identity_map() helper takes start/end PFN as arguments.
Fix a misuse case where the start and end addresses are passed.
Fixes: e70b081c6f376 ("iommu/vt-d: Remove IOVA handling code from the
non-dma_ops path")
Cc: Tom Murphy
Reported-by: Alex Williamson
Signed-off-by
Hi Koba Ko,
On 2020/6/15 11:19, Koba Ko wrote:
hi All,
I have a machine and there's only intel gpu.
the secureboot and vt-d is enabled in BIOS.
On the Ubuntu desktop, I do s2idle first and restart the machine.
The machine can't restart successfully, so I need to press the
power button to shutdo
Hi Fenghua,
On 6/13/20 8:41 AM, Fenghua Yu wrote:
A PASID is allocated for an "mm" the first time any thread attaches
to an SVM capable device. Later device attachments (whether to the same
device or another SVM device) will re-use the same PASID.
The PASID is freed when the process exits (so n
Hi Fenghua,
On 2020/6/13 8:41, Fenghua Yu wrote:
A PASID is allocated for an "mm" the first time any thread attaches
to an SVM capable device. Later device attachments (whether to the same
device or another SVM device) will re-use the same PASID.
The PASID is freed when the process exits (so no
Hi Fenghua,
On 2020/6/13 8:41, Fenghua Yu wrote:
From: Ashok Raj
ENQCMD and Data Streaming Accelerator (DSA) and all of their associated
features are a complicated stack with lots of interconnected pieces.
This documentation provides a big picture overview for all of the
features.
Signed-off-
Hi Jerry,
On 2020/6/13 7:10, Jerry Snitselaar wrote:
Move Intel Kconfig and Makefile bits down into intel directory
with the rest of the Intel specific files.
Cc: Joerg Roedel
Cc: Lu Baolu
Thanks!
Reviewed-by: Lu Baolu
Best regards,
baolu
Signed-off-by: Jerry Snitselaar
---
drivers
Hi Jacob,
On 2020/6/11 12:12, Jacob Pan wrote:
IOMMU UAPI is newly introduced to support communications between guest
virtual IOMMU and host IOMMU. There has been lots of discussions on how
it should work with VFIO UAPI and userspace in general.
This document is indended to clarify the UAPI des
Hi Joerg,
On 6/9/20 9:03 PM, Joerg Roedel wrote:
From: Joerg Roedel
Move all files related to the Intel IOMMU driver into its own
subdirectory.
Signed-off-by: Joerg Roedel
Reviewed-by: Jerry Snitselaar
Reviewed-by: Lu Baolu
Best regards,
baolu
---
MAINTAINERS
so that paging structure updates could be manually flushed from
the cache line if hardware page walking is not snooped.
Fixes: 765b6a98c1de3 ("iommu/vt-d: Enumerate the scalable mode capability")
Cc: Ashok Raj
Cc: Kevin Tian
Cc: Jacob Pan
Signed-off-by: Lu Baolu
---
drivers/iommu/int
Signed-off-by: Lalithambika Krishnakumar
Signed-off-by: Lu Baolu
---
drivers/iommu/dmar.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index 60a2970c37ff..9e3e9067a71d 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/d
Hi Joerg,
On 6/2/20 5:26 PM, Joerg Roedel wrote:
Hi,
two small patches to move the Intel and AMD IOMMU drivers into their own
subdirectory under drivers/iommu/ to make the file structure a bit less
cluttered.
Does the MAINTAINERS file need to update?
Best regards,
baolu
Regards,
301 - 400 of 1115 matches
Mail list logo