Hi all,
this series adds the new noncontiguous DMA allocation API requested by
various media driver maintainers.
Changes since v1:
- document that flush_kernel_vmap_range and invalidate_kernel_vmap_range
must be called once an allocation is mapped into KVA
- add dma-debug support
- remove
It turns out allowing non-contigous allocations here was a rather bad
idea, as we'll now need to define ways to get the pages for mmaping
or dma_buf sharing. Revert this change and stick to the original
concept. A different API for the use case of non-contigous allocations
will be added back
Add a helper to map memory allocated using dma_alloc_pages into
a user address space, similar to the dma_alloc_attrs function for
coherent allocations.
Signed-off-by: Christoph Hellwig
---
Documentation/core-api/dma-api.rst | 10 ++
include/linux/dma-mapping.h| 2 ++
Factour out internal versions without the dma_debug calls in preparation
for callers that will need different dma_debug calls.
Note that this changes the dma_debug calls to get the not page aligned
size values, but as long as alloc and free agree on one variant we are
fine.
Signed-off-by:
Add a new API that returns a potentiall virtually non-contigous sg_table
and a DMA address. This API is only properly implemented for dma-iommu
and will simply return a contigious chunk as a fallback.
The intent is that media drivers can use this API if either:
- no kernel mapping or only
From: Ricardo Ribalda
On architectures where the is no coherent caching such as ARM use the
dma_alloc_noncontiguos API and handle manually the cache flushing using
dma_sync_sgtable().
With this patch on the affected architectures we can measure up to 20x
performance improvement in
Split out a new helper that only allocates a sg_table worth of
memory without mapping it into contiguous kernel address space.
Signed-off-by: Christoph Hellwig
---
drivers/iommu/dma-iommu.c | 67 ---
1 file changed, 35 insertions(+), 32 deletions(-)
diff
Implement support for allocating a non-contiguous DMA region.
Signed-off-by: Christoph Hellwig
---
drivers/iommu/dma-iommu.c | 35 +++
1 file changed, 35 insertions(+)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index
On Mon, Feb 01, 2021 at 04:25:55PM -0800, Jianxiong Gao wrote:
> + if (dma_set_min_align_mask(dev->dev, NVME_CTRL_PAGE_SIZE - 1))
Side note: we have DMA_BIT_MASK(), please use it.
> + dev_warn(dev->dev, "dma_set_min_align_mask failed to
> set offset\n");
--
With Best
Hi Al,
On Fri, Dec 04, 2020 at 01:18:25PM -0700, Al Stone wrote:
> > I updated the doc: https://jpbrucker.net/virtio-iommu/viot/viot-v9.pdf
> > You can incorporate it into the ASWG proposal.
> > Changes since v8:
> > * One typo (s/programing/programming/)
> > * Modified the PCI Range node to
From: Chunyan Zhang
This iommu module can be used by Unisoc's multimedia devices, such as
display, Image codec(jpeg) and a few signal processors, including
VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc.
Signed-off-by: Chunyan Zhang
---
drivers/iommu/Kconfig |
Hi Eric,
On 2020/11/18 19:21, Eric Auger wrote:
> On attach_pasid_table() we program STE S1 related info set
> by the guest into the actual physical STEs. At minimum
> we need to program the context descriptor GPA and compute
> whether the stage1 is translated/bypassed or aborted.
>
>
Signed-off-by: Keqian Zhu
---
include/linux/iommu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 77e561ed57fd..e8f2efae212b 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -68,7 +68,7 @@ struct
The following changes since commit 6ee1d745b7c9fd573fba142a2efdad76a9f1cb04:
Linux 5.11-rc5 (2021-01-24 16:47:14 -0800)
are available in the Git repository at:
git://git.infradead.org/users/hch/dma-mapping.git tags/dma-mapping-5.11-1
for you to fetch changes up to
Hi Eric,
On 2020/11/16 19:00, Eric Auger wrote:
> From: "Liu, Yi L"
>
> This patch adds an VFIO_IOMMU_SET_PASID_TABLE ioctl
> which aims to pass the virtual iommu guest configuration
> to the host. This latter takes the form of the so-called
> PASID table.
>
> Signed-off-by: Jacob Pan
>
On Tue, Feb 02, 2021 at 12:40:57PM +0800, Lu Baolu wrote:
> + list_for_each_entry_rcu(satcu, _satc_units, list) {
> + satc = container_of(satcu->hdr, struct acpi_dmar_satc, header);
> + if (satc->segment == pci_domain_nr(dev->bus) &&
> satcu->atc_required) {
You can
On 2021-02-02 14:01, Joerg Roedel wrote:
On Tue, Feb 02, 2021 at 06:42:57PM +0800, Chunyan Zhang wrote:
From: Chunyan Zhang
This iommu module can be used by Unisoc's multimedia devices, such as
display, Image codec(jpeg) and a few signal processors, including
VSP(video), GSP(graphic),
On Tue, Feb 02, 2021 at 02:34:34PM +, Robin Murphy wrote:
> Nope, I believe if Arm Ltd. had any involvement in this I'd know about it :)
Okay, got confused by thinking of ARM as the CPU architecture, not the
company :)
But given the intel/ and amd/ subdirectories refer to company names as
From: Joerg Roedel
The dev_iommu_priv_get() needs a similar check to
dev_iommu_fwspec_get() to make sure no NULL-ptr is dereferenced.
Fixes: 05a0542b456e1 ("iommu/amd: Store dev_data as device iommu private data")
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=211241
Cc:
Hi Eric,
On 2020/11/16 19:00, Eric Auger wrote:
> This patch adds the VFIO_IOMMU_SET_MSI_BINDING ioctl which aim
> to (un)register the guest MSI binding to the host. This latter
> then can use those stage 1 bindings to build a nested stage
> binding targeting the physical MSIs.
[...]
> +static
On Mon, Feb 01, 2021 at 03:46:33PM +, Will Deacon wrote:
> git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git
> tags/arm-smmu-updates
Pulled, thanks Will.
___
iommu mailing list
iommu@lists.linux-foundation.org
On Tue, Feb 02, 2021 at 10:03:45AM +0800, Yong Wu wrote:
> On Mon, 2021-02-01 at 14:54 +, Will Deacon wrote:
> > On Mon, Jan 11, 2021 at 07:18:41PM +0800, Yong Wu wrote:
> > > This patch mainly adds support for mt8192 Multimedia IOMMU and SMI.
> > >
> > > mt8192 also is MTK IOMMU gen2 which
On Tue, Feb 02, 2021 at 06:42:57PM +0800, Chunyan Zhang wrote:
> From: Chunyan Zhang
>
> This iommu module can be used by Unisoc's multimedia devices, such as
> display, Image codec(jpeg) and a few signal processors, including
> VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel
On 2021-02-02 11:21, Andy Shevchenko wrote:
On Mon, Feb 01, 2021 at 04:25:55PM -0800, Jianxiong Gao wrote:
+ if (dma_set_min_align_mask(dev->dev, NVME_CTRL_PAGE_SIZE - 1))
Side note: we have DMA_BIT_MASK(), please use it.
FWIW I'd actually disagree on that point. Conceptually, this
On 2021-02-02 08:53, Keqian Zhu wrote:
Signed-off-by: Keqian Zhu
---
include/linux/iommu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 77e561ed57fd..e8f2efae212b 100644
--- a/include/linux/iommu.h
+++
On Sat, Jan 30, 2021 at 11:19:07PM +0800, Lu Baolu wrote:
> drivers/iommu/intel/Makefile | 2 +-
> drivers/iommu/intel/iommu.c| 1 -
> include/trace/events/intel_iommu.h | 2 --
> 3 files changed, 1 insertion(+), 4 deletions(-)
Applied, thanks.
On Tue, Feb 02, 2021 at 02:34:56PM +0100, Joerg Roedel wrote:
> On Mon, Feb 01, 2021 at 03:46:33PM +, Will Deacon wrote:
> > git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git
> > tags/arm-smmu-updates
>
> Pulled, thanks Will.
Cheers, Joerg. Doug spotted a thinko in one of the
On Tue, Feb 02, 2021 at 01:53:41PM +, Will Deacon wrote:
> On Tue, Feb 02, 2021 at 02:34:56PM +0100, Joerg Roedel wrote:
> > On Mon, Feb 01, 2021 at 03:46:33PM +, Will Deacon wrote:
> > > git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git
> > > tags/arm-smmu-updates
> >
> >
On Mon, Feb 01, 2021 at 10:30:14AM -0800, Jianxiong Gao wrote:
> NVMe driver and other applications may depend on the data offset
> to operate correctly. Currently when unaligned data is mapped via
> SWIOTLB, the data is mapped as slab aligned with the SWIOTLB. This
> patch adds an option to make
On 2021/2/2 20:58, Robin Murphy wrote:
> On 2021-02-02 08:53, Keqian Zhu wrote:
>> Signed-off-by: Keqian Zhu
>> ---
>> include/linux/iommu.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/iommu.h b/include/linux/iommu.h
>> index
Hi Baolu,
On Tue, Feb 02, 2021 at 12:40:55PM +0800, Lu Baolu wrote:
> @@ -514,7 +514,8 @@ enum acpi_dmar_type {
> ACPI_DMAR_TYPE_ROOT_ATS = 2,
> ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
> ACPI_DMAR_TYPE_NAMESPACE = 4,
> - ACPI_DMAR_TYPE_RESERVED = 5 /* 5 and greater are
On Mon, Feb 01, 2021 at 05:06:23PM -0800, Douglas Anderson wrote:
> Sleeping while atomic = bad. Let's fix an obvious typo to try to avoid it.
>
> The warning that was seen (on a downstream kernel with the problematic
> patch backported):
>
> BUG: sleeping function called from invalid context
On Tue, Feb 02, 2021 at 12:40:56PM +0800, Lu Baolu wrote:
> + case ACPI_DMAR_TYPE_SATC:
> + satc = container_of(header, struct acpi_dmar_satc, header);
> + pr_info("SATC flags: 0x%x\n", satc->flags);
> + break;
Did the pr_info() slip through or is there a
On 2021/1/29 17:06, Zhou Wang wrote:
> This RFC series is the followed patch of this discussion:
> https://www.spinics.net/lists/arm-kernel/msg866187.html.
>
> Currently there is no debug interface about SMMUv3 driver, which makes it
> not convenient when we want to dump some information, like
On Tue, 2 Feb 2021 at 22:14, Joerg Roedel wrote:
>
> On Tue, Feb 02, 2021 at 06:42:57PM +0800, Chunyan Zhang wrote:
> > +static phys_addr_t sprd_iommu_iova_to_phys(struct iommu_domain *domain,
> > +dma_addr_t iova)
> > +{
> > + struct sprd_iommu_domain
On Wed, 3 Feb 2021 at 02:02, Robin Murphy wrote:
>
> On 2021-02-02 14:41, Joerg Roedel wrote:
> > On Tue, Feb 02, 2021 at 02:34:34PM +, Robin Murphy wrote:
> >> Nope, I believe if Arm Ltd. had any involvement in this I'd know about it
> >> :)
> >
> > Okay, got confused by thinking of ARM as
On Mon, Jan 25, 2021 at 07:33:35PM +0100, Martin Radev wrote:
> On Mon, Jan 18, 2021 at 10:14:28AM -0500, Konrad Rzeszutek Wilk wrote:
> > On Mon, Jan 18, 2021 at 12:44:58PM +0100, Martin Radev wrote:
> > > On Wed, Jan 13, 2021 at 12:30:17PM +0100, Christoph Hellwig wrote:
> > > > On Tue, Jan 12,
On Tue, Feb 02, 2021 at 12:40:55PM +0800, Lu Baolu wrote:
> From: Yian Chen
>
> Starting from Intel Platform VT-d v3.2, BIOS may provide new remapping
> structure SATC for SOC integrated devices, according to section 8.8 of
> Intel VT-d architecture specification v3.2. The SATC structure reports
On Fri, 22 Jan 2021 17:26:33 +0800
Keqian Zhu wrote:
> v3:
> - Populate bitmap unconditionally.
> - Sanity check notifier when remove all domains.
>
> v2:
> - Address suggestions from Alex.
> - Remove unnecessary patches.
>
>
> Keqian Zhu (2):
> vfio/iommu_type1: Populate full dirty
On Mon, 25 Jan 2021 10:46:42 +0800
Keqian Zhu wrote:
> With this counter, we never need to traverse all groups to update
> pinned_scope of vfio_iommu.
>
> Suggested-by: Alex Williamson
> Signed-off-by: Keqian Zhu
> ---
> drivers/vfio/vfio_iommu_type1.c | 40 +
On Tue, Feb 02, 2021 at 12:40:56PM +0800, Lu Baolu wrote:
> From: Yian Chen
>
> Software should parse every SATC table and all devices in the tables
> reported by the BIOS and keep the information in kernel list for further
> SATC policy deployment.
>
The last part seems bit vague? Are you
On Mon, Feb 01, 2021 at 05:06:23PM -0800, Douglas Anderson wrote:
> drivers/iommu/iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
___
iommu mailing list
iommu@lists.linux-foundation.org
On Tue, Feb 02, 2021 at 06:42:57PM +0800, Chunyan Zhang wrote:
> +static phys_addr_t sprd_iommu_iova_to_phys(struct iommu_domain *domain,
> +dma_addr_t iova)
> +{
> + struct sprd_iommu_domain *dom = to_sprd_domain(domain);
> + unsigned long flags;
>
On 02 Feb 2021 10:17, Jean-Philippe Brucker wrote:
> Hi Al,
>
> On Fri, Dec 04, 2020 at 01:18:25PM -0700, Al Stone wrote:
> > > I updated the doc: https://jpbrucker.net/virtio-iommu/viot/viot-v9.pdf
> > > You can incorporate it into the ASWG proposal.
> > > Changes since v8:
> > > * One typo
Running 'dt-validate -m' will flag any compatible strings missing a schema.
Fix all the errors found in DT binding examples. Most of these are just
typos.
Cc: Stephen Boyd
Cc: Maxime Ripard
Cc: Chen-Yu Tsai
Cc: Linus Walleij
Cc: Herbert Xu
Cc: "David S. Miller"
Cc: Daniel Palmer
Cc:
Properties in if/then schemas weren't getting checked by the meta-schemas.
Enabling meta-schema checks finds several errors.
The use of an 'items' schema (as opposed to the list form) is wrong in
some cases as it applies to all entries. 'contains' is the correct schema
to use in the case of
Fixing the compatible string typos results in an error in the example:
Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.example.dt.yaml:
iommu@fe951000: 'power-domains' is a required property
Based on the dts files, a 'power-domains' property only exists on Gen 3
which can be
The pull request you sent on Tue, 2 Feb 2021 10:25:26 +0100:
> git://git.infradead.org/users/hch/dma-mapping.git tags/dma-mapping-5.11-1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/7d36ccd4bd07825775b512f654566d3e89e9cfd0
Thank you!
--
Deet-doot-dot, I am a bot.
On 2021-02-02 14:41, Joerg Roedel wrote:
On Tue, Feb 02, 2021 at 02:34:34PM +, Robin Murphy wrote:
Nope, I believe if Arm Ltd. had any involvement in this I'd know about it :)
Okay, got confused by thinking of ARM as the CPU architecture, not the
company :)
But given the intel/ and amd/
On 2/2/21 10:37 AM, Konrad Rzeszutek Wilk wrote:
> On Mon, Jan 25, 2021 at 07:33:35PM +0100, Martin Radev wrote:
>> On Mon, Jan 18, 2021 at 10:14:28AM -0500, Konrad Rzeszutek Wilk wrote:
>>> On Mon, Jan 18, 2021 at 12:44:58PM +0100, Martin Radev wrote:
On Wed, Jan 13, 2021 at 12:30:17PM
On 2/2/21 12:55 PM, Rob Herring wrote:
> Running 'dt-validate -m' will flag any compatible strings missing a schema.
> Fix all the errors found in DT binding examples. Most of these are just
> typos.
>
> Cc: Stephen Boyd
> Cc: Maxime Ripard
> Cc: Chen-Yu Tsai
> Cc: Linus Walleij
> Cc: Herbert
On Wed, 3 Feb 2021, at 07:25, Rob Herring wrote:
> Running 'dt-validate -m' will flag any compatible strings missing a schema.
> Fix all the errors found in DT binding examples. Most of these are just
> typos.
>
> Cc: Stephen Boyd
> Cc: Maxime Ripard
> Cc: Chen-Yu Tsai
> Cc: Linus Walleij
Quoting Rob Herring (2021-02-02 12:55:42)
>
> diff --git
> a/Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-usb-clocks.yaml
> b/Documentation/devicetree/bindings/clock/allwinner,sun9i-a80-usb-clocks.yaml
> index fa0ee03a527f..53cc6df0df96 100644
> ---
>
On Tue, Feb 02, 2021 at 04:34:09PM -0600, Tom Lendacky wrote:
> On 2/2/21 10:37 AM, Konrad Rzeszutek Wilk wrote:
> > On Mon, Jan 25, 2021 at 07:33:35PM +0100, Martin Radev wrote:
> >> On Mon, Jan 18, 2021 at 10:14:28AM -0500, Konrad Rzeszutek Wilk wrote:
> >>> On Mon, Jan 18, 2021 at 12:44:58PM
Hi Joerg,
On 2/2/21 9:51 PM, Joerg Roedel wrote:
Hi Baolu,
On Tue, Feb 02, 2021 at 12:40:55PM +0800, Lu Baolu wrote:
@@ -514,7 +514,8 @@ enum acpi_dmar_type {
ACPI_DMAR_TYPE_ROOT_ATS = 2,
ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
ACPI_DMAR_TYPE_NAMESPACE = 4,
-
Hi Ashok,
On 2/3/21 12:02 AM, Raj, Ashok wrote:
On Tue, Feb 02, 2021 at 12:40:55PM +0800, Lu Baolu wrote:
From: Yian Chen
Starting from Intel Platform VT-d v3.2, BIOS may provide new remapping
structure SATC for SOC integrated devices, according to section 8.8 of
Intel VT-d architecture
Hi Joerg,
On 2/2/21 9:53 PM, Joerg Roedel wrote:
On Tue, Feb 02, 2021 at 12:40:56PM +0800, Lu Baolu wrote:
+ case ACPI_DMAR_TYPE_SATC:
+ satc = container_of(header, struct acpi_dmar_satc, header);
+ pr_info("SATC flags: 0x%x\n", satc->flags);
+
Hi Ashok,
On 2/3/21 12:41 AM, Raj, Ashok wrote:
On Tue, Feb 02, 2021 at 12:40:56PM +0800, Lu Baolu wrote:
From: Yian Chen
Software should parse every SATC table and all devices in the tables
reported by the BIOS and keep the information in kernel list for further
SATC policy deployment.
On 2/2/21 9:55 PM, Joerg Roedel wrote:
On Tue, Feb 02, 2021 at 12:40:57PM +0800, Lu Baolu wrote:
+ list_for_each_entry_rcu(satcu, _satc_units, list) {
+ satc = container_of(satcu->hdr, struct acpi_dmar_satc, header);
+ if (satc->segment ==
59 matches
Mail list logo