add a new dma_alloc_noncontiguous API v2

2021-02-02 Thread Christoph Hellwig
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

[PATCH 1/7] dma-mapping: remove the {alloc,free}_noncoherent methods

2021-02-02 Thread Christoph Hellwig
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

[PATCH 2/7] dma-mapping: add a dma_mmap_pages helper

2021-02-02 Thread Christoph Hellwig
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 ++

[PATCH 3/7] dma-mapping: refactor dma_{alloc,free}_pages

2021-02-02 Thread Christoph Hellwig
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:

[PATCH 4/7] dma-mapping: add a dma_alloc_noncontiguous API

2021-02-02 Thread Christoph Hellwig
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

[PATCH 7/7] media: uvcvideo: Use dma_alloc_noncontiguos API

2021-02-02 Thread Christoph Hellwig
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

[PATCH 5/7] dma-iommu: refactor iommu_dma_alloc_remap

2021-02-02 Thread Christoph Hellwig
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

[PATCH 6/7] dma-iommu: implement ->alloc_noncontiguous

2021-02-02 Thread Christoph Hellwig
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

Re: [PATCH V2 3/3] Adding device_dma_parameters->offset_preserve_mask to NVMe driver.

2021-02-02 Thread Andy Shevchenko
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

Re: [EXTERNAL] Re: Question regarding VIOT proposal

2021-02-02 Thread Jean-Philippe Brucker
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

[PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Chunyan Zhang
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 |

Re: [PATCH v13 06/15] iommu/smmuv3: Implement attach/detach_pasid_table

2021-02-02 Thread Keqian Zhu
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. > >

[PATCH] iommu: Update the document of IOMMU_DOMAIN_UNMANAGED

2021-02-02 Thread Keqian Zhu
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

[GIT PULL] dma-mapping fix for 5.11

2021-02-02 Thread Christoph Hellwig
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

Re: [PATCH v11 01/13] vfio: VFIO_IOMMU_SET_PASID_TABLE

2021-02-02 Thread Keqian Zhu
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 >

Re: [PATCH 3/3] iommu/vt-d: Apply SATC policy

2021-02-02 Thread Joerg Roedel
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

Re: [PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Robin Murphy
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),

Re: [PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Joerg Roedel
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

[PATCH] iommu: Check dev->iommu in dev_iommu_priv_get() before dereferencing it

2021-02-02 Thread Joerg Roedel
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:

Re: [PATCH v11 03/13] vfio: VFIO_IOMMU_SET_MSI_BINDING

2021-02-02 Thread Keqian Zhu
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

Re: [GIT PULL] iommu/arm-smmu: Updates for 5.12

2021-02-02 Thread Joerg Roedel
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

Re: [PATCH v6 00/33] MT8192 IOMMU support

2021-02-02 Thread Will Deacon
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

Re: [PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Joerg Roedel
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

Re: [PATCH V2 3/3] Adding device_dma_parameters->offset_preserve_mask to NVMe driver.

2021-02-02 Thread Robin Murphy
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

Re: [PATCH] iommu: Update the document of IOMMU_DOMAIN_UNMANAGED

2021-02-02 Thread Robin Murphy
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 +++

Re: [PATCH 1/1] iommu/vt-d: Fix compile error [-Werror=implicit-function-declaration]

2021-02-02 Thread Joerg Roedel
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.

Re: [GIT PULL] iommu/arm-smmu: Updates for 5.12

2021-02-02 Thread Will Deacon
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

Re: [GIT PULL] iommu/arm-smmu: Updates for 5.12

2021-02-02 Thread Joerg Roedel
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 > > > >

Re: [PATCH V2 0/3] SWIOTLB: Preserve swiotlb map offset when needed.

2021-02-02 Thread Greg KH
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

Re: [PATCH] iommu: Update the document of IOMMU_DOMAIN_UNMANAGED

2021-02-02 Thread Keqian Zhu
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

Re: [PATCH 1/3] iommu/vt-d: Add new enum value and structure for SATC

2021-02-02 Thread Joerg Roedel
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

Re: [PATCH] iommu: Properly pass gfp_t in _iommu_map() to avoid atomic sleeping

2021-02-02 Thread Will Deacon
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

Re: [PATCH 2/3] iommu/vt-d: Parse SATC reporting structure

2021-02-02 Thread Joerg Roedel
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

Re: [RFC PATCH 0/3] iommu/arm-smmu-v3: Add debug interfaces for SMMUv3

2021-02-02 Thread Zhou Wang
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

Re: [PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Chunyan Zhang
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

Re: [PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Chunyan Zhang
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

Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path

2021-02-02 Thread Konrad Rzeszutek Wilk
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,

Re: [PATCH 1/3] iommu/vt-d: Add new enum value and structure for SATC

2021-02-02 Thread Raj, Ashok
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

Re: [PATCH v3 0/2] vfio/iommu_type1: some fixes

2021-02-02 Thread Alex Williamson
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

Re: [PATCH] vfio/iommu_type1: Mantainance a counter for non_pinned_groups

2021-02-02 Thread Alex Williamson
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 +

Re: [PATCH 2/3] iommu/vt-d: Parse SATC reporting structure

2021-02-02 Thread Raj, Ashok
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

Re: [PATCH] iommu: Properly pass gfp_t in _iommu_map() to avoid atomic sleeping

2021-02-02 Thread Joerg Roedel
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

Re: [PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Joerg Roedel
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; >

Re: [EXTERNAL] Re: Question regarding VIOT proposal

2021-02-02 Thread Al Stone
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

[PATCH 1/3] dt-bindings: Fix undocumented compatible strings in examples

2021-02-02 Thread Rob Herring
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:

[PATCH 3/3] dt-bindings: Fix errors in 'if' schemas

2021-02-02 Thread Rob Herring
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

[PATCH 2/3] dt-bindings: iommu: renesas, ipmmu-vmsa: Make 'power-domains' conditionally required

2021-02-02 Thread Rob Herring
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

Re: [GIT PULL] dma-mapping fix for 5.11

2021-02-02 Thread pr-tracker-bot
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.

Re: [PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Robin Murphy
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/

Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path

2021-02-02 Thread Tom Lendacky
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

Re: [PATCH 1/3] dt-bindings: Fix undocumented compatible strings in examples

2021-02-02 Thread Guenter Roeck
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

Re: [PATCH 1/3] dt-bindings: Fix undocumented compatible strings in examples

2021-02-02 Thread Andrew Jeffery
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

Re: [PATCH 1/3] dt-bindings: Fix undocumented compatible strings in examples

2021-02-02 Thread Stephen Boyd
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 > --- >

Re: [PATCH] swiotlb: Validate bounce size in the sync/unmap path

2021-02-02 Thread Konrad Rzeszutek Wilk
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

Re: [PATCH 1/3] iommu/vt-d: Add new enum value and structure for SATC

2021-02-02 Thread Lu Baolu
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, -

Re: [PATCH 1/3] iommu/vt-d: Add new enum value and structure for SATC

2021-02-02 Thread Lu Baolu
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

Re: [PATCH 2/3] iommu/vt-d: Parse SATC reporting structure

2021-02-02 Thread Lu Baolu
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); +

Re: [PATCH 2/3] iommu/vt-d: Parse SATC reporting structure

2021-02-02 Thread Lu Baolu
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.

Re: [PATCH 3/3] iommu/vt-d: Apply SATC policy

2021-02-02 Thread Lu Baolu
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 ==