On Wed, May 19, 2021 at 2:51 AM Robin Murphy wrote:
>
> On 2021-05-18 12:28, Dong Aisheng wrote:
> > dma_contiguous_reserve() aims to support cmdline case for CMA memory
> > reserve. But if users define reserved memory in DT,
> > 'dma_contiguous_default_area' will not be 0, then it's meaningless
>
On Wed, May 19, 2021 at 09:50:25AM +0800, Lu Baolu wrote:
> Hi Joerg,
>
> Two small fixes are queued in this series. It includes:
>
> - Use user privilege for RID2PASID translation
> - Check memory allocation return value
>
> Please consider them for v5.13.
>
> Best regards,
> Lu Baolu
>
> D
'err' will be initialized and cleanup the redundant initialization.
Cc: Joerg Roedel
Signed-off-by: Shaokun Zhang
---
drivers/iommu/amd/iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index 80e8e1916dd1..bea91cc7
From: Dan Carpenter
In current kernels small allocations never fail, but checking for
allocation failure is the correct thing to do.
Fixes: 18abda7a2d55 ("iommu/vt-d: Fix general protection fault in
aux_detach_device()")
Signed-off-by: Dan Carpenter
Acked-by: Lu Baolu
Link: https://lore.kerne
When first-level page tables are used for IOVA translation, we use user
privilege by setting U/S bit in the page table entry. This is to make it
consistent with the second level translation, where the U/S enforcement
is not available. Clear the SRE (Supervisor Request Enable) field in the
pasid tab
Hi Joerg,
Two small fixes are queued in this series. It includes:
- Use user privilege for RID2PASID translation
- Check memory allocation return value
Please consider them for v5.13.
Best regards,
Lu Baolu
Dan Carpenter (1):
iommu/vt-d: Check for allocation failure in aux_detach_device()
From: Saravana Kannan
This patch revives changes from Saravana Kannan to switch the
qcom-pdc driver to use IRQCHIP_PLATFORM_DRIVER helper macros,
and allows qcom-pdc driver to be loaded as a permanent module.
Earlier attempts at this ran into trouble with loading
dependencies, but with Saravana'
Allow the qcom_scm driver to be loadable as a permenent module.
This still uses the "depends on QCOM_SCM || !QCOM_SCM" bit to
ensure that drivers that call into the qcom_scm driver are
also built as modules. While not ideal in some cases its the
only safe way I can find to avoid build errors witho
On Fri, 9 Apr 2021 11:44:17 +0800
Shenming Lu wrote:
> Since enabling IOPF for devices may lead to a slow ramp up of performance,
> we add an ioctl VFIO_IOMMU_ENABLE_IOPF to make it configurable. And the
> IOPF enabling of a VFIO device includes setting IOMMU_DEV_FEAT_IOPF and
> registering the V
On Fri, 9 Apr 2021 11:44:12 +0800
Shenming Lu wrote:
> Hi,
>
> Requesting for your comments and suggestions. :-)
>
> The static pinning and mapping problem in VFIO and possible solutions
> have been discussed a lot [1, 2]. One of the solutions is to add I/O
> Page Fault support for VFIO devices
On Fri, 9 Apr 2021 11:44:18 +0800
Shenming Lu wrote:
> If IOPF enabled for the VFIO container, there is no need to statically
> pin and map the entire DMA range, we can do it on demand. And unmap
> according to the IOPF mapped bitmap when removing vfio_dma.
>
> Note that we still mark all pages
On Fri, 9 Apr 2021 11:44:15 +0800
Shenming Lu wrote:
> To avoid pinning pages when they are mapped in IOMMU page tables, we
> add an MMU notifier to tell the addresses which are no longer valid
> and try to unmap them.
>
> Signed-off-by: Shenming Lu
> ---
> drivers/vfio/vfio_iommu_type1.c | 11
On Fri, 9 Apr 2021 11:44:16 +0800
Shenming Lu wrote:
> To optimize for fewer page fault handlings, we can pre-map more pages
> than requested at once.
>
> Note that IOPF_PREMAP_LEN is just an arbitrary value for now, which we
> could try further tuning.
I'd prefer that the series introduced ful
On Fri, 9 Apr 2021 11:44:13 +0800
Shenming Lu wrote:
> This patch follows the discussion here:
>
> https://lore.kernel.org/linux-acpi/YAaxjmJW+ZMvrhac@myrica/
>
> Besides SVA/vSVA, such as VFIO may also enable (2nd level) IOPF to remove
> pinning restriction. In order to better support more sce
On Fri, 9 Apr 2021 11:44:20 +0800
Shenming Lu wrote:
> To set up nested mode, drivers such as vfio_pci need to register a
> handler to receive stage/level 1 faults from the IOMMU, but since
> currently each device can only have one iommu dev fault handler,
> and if stage 2 IOPF is already enabled
On Fri, 9 Apr 2021 11:44:14 +0800
Shenming Lu wrote:
> VFIO manages the DMA mapping itself. To support IOPF (on-demand paging)
> for VFIO (IOMMU capable) devices, we add a VFIO page fault handler to
> serve the reported page faults from the IOMMU driver.
>
> Signed-off-by: Shenming Lu
> ---
>
On Fri, 9 Apr 2021 11:44:19 +0800
Shenming Lu wrote:
> Some devices only allow selective DMA faulting. Similar to the selective
> dirty page tracking, the vendor driver can call vfio_pin_pages() to
> indicate the non-faultable scope, we add a new struct vfio_range to
> record it, then when the IO
On 2021-05-18 12:28, Dong Aisheng wrote:
dma_contiguous_reserve() aims to support cmdline case for CMA memory
reserve. But if users define reserved memory in DT,
'dma_contiguous_default_area' will not be 0, then it's meaningless
to continue to run dma_contiguous_reserve(). So we return early
if d
Since, overlapping mappings are not supported by the DMA API we should
report an error if active_cacheline_insert returns -EEXIST.
Suggested-by: Dan Williams
Signed-off-by: Hamza Mahfooz
---
kernel/dma/debug.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/kernel/dma/
dma_contiguous_reserve() aims to support cmdline case for CMA memory
reserve. But if users define reserved memory in DT,
'dma_contiguous_default_area' will not be 0, then it's meaningless
to continue to run dma_contiguous_reserve(). So we return early
if detect 'dma_contiguous_default_area' is unze
On Tue, May 18, 2021 at 11:08:47AM +0200, Joerg Roedel wrote:
> Looks good to me, but I'll wait for Robins opinion before applying.
Nevermind, just found the new version which Robin already acked.
___
iommu mailing list
iommu@lists.linux-foundation.org
h
On 2021-05-18 10:08, Joerg Roedel wrote:
On Mon, Apr 19, 2021 at 03:13:35PM +0800, chenxiang wrote:
From: Xiang Chen
It is not necessary to put free_iova_mem() inside of spinlock/unlock
iova_rbtree_lock which only leads to more completion for the spinlock.
It has a small promote on the perform
Hi Joerg,
在 2021/5/18 17:08, Joerg Roedel 写道:
On Mon, Apr 19, 2021 at 03:13:35PM +0800, chenxiang wrote:
From: Xiang Chen
It is not necessary to put free_iova_mem() inside of spinlock/unlock
iova_rbtree_lock which only leads to more completion for the spinlock.
It has a small promote on the p
On Sat, May 08, 2021 at 11:14:51AM +0800, Bixuan Cui wrote:
> This patch adds missing MODULE_DEVICE_TABLE definition which generates
> correct modalias for automatic loading of this driver when it is built
> as an external module.
>
> Reported-by: Hulk Robot
> Signed-off-by: Bixuan Cui
> ---
>
On Sat, May 01, 2021 at 11:59:56PM -0700, Nadav Amit wrote:
> From: Nadav Amit
>
> The logic to determine the mask of page-specific invalidations was
> tested in userspace. As the code was copied into the kernel, the
> parentheses were mistakenly set in the wrong place, resulting in the
> wrong m
On Thu, Apr 22, 2021 at 11:42:19AM +0200, Jean-Philippe Brucker wrote:
> Since commit 08a27c1c3ecf ("iommu: Add support to change default domain
> of an iommu group") a user can switch a device between IOMMU and direct
> DMA through sysfs. This doesn't work for AMD IOMMU at the moment because
> dev
On Mon, Apr 19, 2021 at 03:13:35PM +0800, chenxiang wrote:
> From: Xiang Chen
>
> It is not necessary to put free_iova_mem() inside of spinlock/unlock
> iova_rbtree_lock which only leads to more completion for the spinlock.
> It has a small promote on the performance after the change. And also
>
On Thu, May 13, 2021 at 02:45:44PM +0100, Shameer Kolothum wrote:
> +/**
> + * struct iommu_rmr - Reserved Memory Region details per IOMMU
> + * @list: Linked list pointers to hold RMR region info
> + * @base_address: base address of Reserved Memory Region
> + * @length: length of memory region
> +
v7: https://lore.kernel.org/patchwork/cover/1431031/
On Mon, May 10, 2021 at 5:50 PM Claire Chang wrote:
>
> From: Claire Chang
>
> This series implements mitigations for lack of DMA access control on
> systems without an IOMMU, which could result in the DMA accessing the
> system memory at unex
29 matches
Mail list logo