On Wed, Jan 06, 2021 at 11:41:23AM +0800, Claire Chang wrote:
> Introduce the new compatible string, restricted-dma-pool, for restricted
> DMA. One can specify the address and length of the restricted DMA memory
> region by restricted-dma-pool in the device tree.
>
> Signed-off-by: Claire Chang
The IOMMU code needs more work. We're sure for now the IRQ remapping
hooks are not applicable when Linux is the root partition.
Signed-off-by: Wei Liu
Acked-by: Joerg Roedel
Reviewed-by: Vitaly Kuznetsov
---
drivers/iommu/hyperv-iommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Hi,
First of all let me say that I am glad that someone is working on a
upstream solution for this issue, would appreciate if you could CC and
Jim Quinlan on subsequent submissions.
On 1/5/21 7:41 PM, Claire Chang wrote:
> This series implements mitigations for lack of DMA access control on
>
Hello!
In this file:
> diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
> index e4368159f88a..7fb2ac087d23 100644
> --- a/kernel/dma/swiotlb.c
> +++ b/kernel/dma/swiotlb.c
..
> +static const struct reserved_mem_ops rmem_swiotlb_ops = {
> + .device_init= rmem_swiotlb_device_init,
In the existing code, loop all devices attached to a domain does not
include sub-devices attached via iommu_aux_attach_device().
This was found by when I'm working on the below patch, There is no
device in the domain->devices list, thus unable to get the cap and
ecap of iommu unit. But this
iommu_flush_dev_iotlb() is called to invalidate caches on device. It only
loops the devices which are full-attached to the domain. For sub-devices,
this is ineffective. This results in invalid caching entries left on the
device. Fix it by adding loop for subdevices as well. Also, the domain->
Hi Baolu, Joerg, Will,
This patchset aims to fix a bug regards to native SVM usage, and
also two bugs around subdevice (attached to device via auxiliary
manner) tracking and ineffective device_tlb flush.
v3 -> v4:
- Address comments from Baolu Lu and add acked-by
- Fix issue reported by "Dan
Current struct intel_svm has a field to record the struct intel_iommu
pointer for a PASID bind. And struct intel_svm will be shared by all
the devices bind to the same process. The devices may be behind different
DMAR units. As the iommu driver code uses the intel_iommu pointer stored
in intel_svm
Hi Will,
> From: Will Deacon
> Sent: Wednesday, January 6, 2021 1:24 AM
>
> On Tue, Jan 05, 2021 at 05:50:22AM +, Liu, Yi L wrote:
> > > > +static void __iommu_flush_dev_iotlb(struct device_domain_info
> *info,
> > > > + u64 addr, unsigned int mask)
> > > >
Hi Will,
On 2021-01-06 17:26, Will Deacon wrote:
On Thu, Dec 24, 2020 at 12:10:07PM +0530, Sai Prakash Ranjan wrote:
commit ecd7274fb4cd ("iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag")
removed unused IOMMU_SYS_CACHE_ONLY prot flag and along with it went
the memory type setting required for
On 1/6/21 9:35 PM, John Garry wrote:
Function iommu_dev_has_feature() has never been referenced in the tree,
and there does not appear to be anything coming soon to use it, so delete
it.
It will be used by the device driver which want to support the aux-
domain capability, for example, below
Hi Will, Robin or other guys,
When debugging SMMU/SVA issue on huawei ARM64 board, we find that it
lacks of enough debugfs for ARM SMMU driver (such as
the value of STE/CD which we need to check sometimes). Currently it
creates top-level iommu directory in debugfs, but there is no debugfs
We always use the smallest supported page size of vfio_iommu as
pgsize. Remove parameter "pgsize" of vfio_dma_bitmap_alloc_all.
Signed-off-by: Keqian Zhu
---
drivers/vfio/vfio_iommu_type1.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git
Hi,
In patch series[1], I put forward some fixes and optimizations for
vfio_iommu_type1. This extracts and improves the optimization part
of it.
[1]
https://lore.kernel.org/linux-iommu/20201210073425.25960-1-zhukeqi...@huawei.com/T/#t
Thanks,
Keqian
Keqian Zhu (6):
vfio/iommu_type1: Make
For now there are 3 ways to promote the pinned_page_dirty_scope
status of vfio_iommu:
1. Through vfio pin interface.
2. Detach a group without pinned_dirty_scope.
3. Attach a group with pinned_dirty_scope.
For point 3, the only chance to promote the pinned_page_dirty_scope
status is when
We always use the smallest supported page size of vfio_iommu as
pgsize. Drop parameter "pgsize" of update_user_bitmap.
Signed-off-by: Keqian Zhu
---
drivers/vfio/vfio_iommu_type1.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c
When we want to promote the pinned_page_dirty_scope of vfio_iommu,
we call the "update" function to visit all vfio_group, but when we
want to downgrade this, we can set the flag as false directly.
So we'd better make an explicit "promote" semantic to the "update"
function. BTW, if vfio_iommu
We always use the smallest supported page size of vfio_iommu as
pgsize. Remove parameter "pgsize" of vfio_iova_dirty_bitmap.
Signed-off-by: Keqian Zhu
---
drivers/vfio/vfio_iommu_type1.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/vfio/vfio_iommu_type1.c
The pinned_scope of external domain's groups are always true, that's
to say we can safely ignore external domain when promote pinned_scope
status of vfio_iommu.
Signed-off-by: Keqian Zhu
---
drivers/vfio/vfio_iommu_type1.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
On Tue, Jan 5, 2021 at 3:04 AM Konrad Rzeszutek Wilk
wrote:
>
> On Wed, Dec 23, 2020 at 02:24:12PM +0800, Zhenzhong Duan wrote:
> > check_iommu_entries() checks for cyclic dependency in iommu entries
> > and fixes the cyclic dependency by setting x->depend to NULL. But
> > this repairing isn't
Hi,
On Tue, Dec 15, 2020 at 01:09:29AM +, Krishna Reddy wrote:
> Hi Jean,
>
> > +bool arm_smmu_master_sva_supported(struct arm_smmu_master *master) {
> > + if (!(master->smmu->features & ARM_SMMU_FEAT_SVA))
> > + return false;
> +
> > + /* SSID and IOPF support are
On Thu, Dec 24, 2020 at 12:10:07PM +0530, Sai Prakash Ranjan wrote:
> commit ecd7274fb4cd ("iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag")
> removed unused IOMMU_SYS_CACHE_ONLY prot flag and along with it went
> the memory type setting required for the non-coherent masters to use
> system cache.
On Mon, Jan 04, 2021 at 11:36:38PM -0800, Isaac J. Manjarres wrote:
> The goal of the Generic Kernel Image (GKI) effort is to have a common
> kernel image that works across multiple Android devices. This involves
> generating a kernel image that has core features integrated into it,
> while SoC
Function iommu_domain_window_disable() is not referenced in the tree, so
delete it.
Signed-off-by: John Garry
---
drivers/iommu/iommu.c | 9 -
include/linux/iommu.h | 6 --
2 files changed, 15 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index
Just some tidy-up to IOVA and core code.
Based on v5.11-rc2
Differences to v1:
- Add core IOMMU patches
John Garry (6):
iova: Make has_iova_flush_queue() private
iova: Delete copy_reserved_iova()
iova: Stop exporting some more functions
iommu: Stop exporting iommu_map_sg_atomic()
Function iommu_map_sg_atomic() is only referenced in dma-iommu.c, which
can only be built-in, so stop exporting.
Signed-off-by: John Garry
---
drivers/iommu/iommu.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index ffeebda8d6de..4f4edb087ce6
Function iommu_dev_has_feature() has never been referenced in the tree,
and there does not appear to be anything coming soon to use it, so delete
it.
Signed-off-by: John Garry
---
drivers/iommu/iommu.c | 11 ---
include/linux/iommu.h | 7 ---
2 files changed, 18 deletions(-)
diff
The following functions are not referenced outside dma-iommu.c (and
iova.c), which can only be built-in:
- init_iova_flush_queue()
- free_iova_fast()
- queue_iova()
- alloc_iova_fast()
So stop exporting them.
Signed-off-by: John Garry
---
drivers/iommu/iova.c | 4
1 file changed, 4
Function has_iova_flush_queue() has no users outside iova.c, so make it
private.
Signed-off-by: John Garry
---
drivers/iommu/iova.c | 2 +-
include/linux/iova.h | 6 --
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c
index
Since commit c588072bba6b ("iommu/vt-d: Convert intel iommu driver to the
iommu ops"), function copy_reserved_iova() is not referenced, so delete
it.
Signed-off-by: John Garry
---
drivers/iommu/iova.c | 30 --
include/linux/iova.h | 6 --
2 files changed, 36
> I agree that we should let a device driver enable SVA if it supports some
> form of IOPF.
Right, The PCIe device has capability to handle IO page faults on its own when
ATS translation request response indicates that no valid mapping exist.
SMMU doesn't involve/handle page faults for ATS
31 matches
Mail list logo