Re: [PATCH 3/3] iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping

2019-10-15 Thread Joerg Roedel
On Tue, Oct 08, 2019 at 04:18:37PM -0600, Logan Gunthorpe wrote: > -static struct irq_remap_table *alloc_irq_table(u16 devid) > +static int set_remap_table_entry_alias(struct pci_dev *pdev, u16 alias, > +void *data) > +{ > + struct irq_remap_table *table =

Re: [PATCH 0/2] iommu/vt-d: Select PCI_PRI for INTEL_IOMMU_SVM

2019-10-15 Thread Bjorn Helgaas
[+cc Jerry] On Wed, Oct 09, 2019 at 05:45:49PM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > I think intel-iommu.c depends on CONFIG_AMD_IOMMU in an undesirable way: > > When CONFIG_INTEL_IOMMU_SVM=y, iommu_enable_dev_iotlb() calls PRI > interfaces (pci_reset_pri() and

[RFC 2/3] memory: tegra186: Register as memory controller

2019-10-15 Thread Thierry Reding
From: Thierry Reding Registering as memory controller allows other drivers to obtain a reference to it. This is mostly useful as a way of ordering probe between devices depending on one another. Signed-off-by: Thierry Reding --- drivers/memory/tegra/tegra186.c | 8 +++- 1 file changed, 7

Re: [PATCH] iommu: rockchip: Free domain on .domain_free

2019-10-15 Thread Heiko Stuebner
Am Mittwoch, 2. Oktober 2019, 19:29:23 CEST schrieb Ezequiel Garcia: > IOMMU domain resource life is well-defined, managed > by .domain_alloc and .domain_free. > > Therefore, domain-specific resources shouldn't be tied to > the device life, but instead to its domain. > > Signed-off-by: Ezequiel

Re: Advice on oops - memory trap on non-memory access instruction (invalid CR2?)

2019-10-15 Thread Guilherme G. Piccoli
On 14/10/2019 11:10, Thomas Gleixner wrote: > On Mon, 14 Oct 2019, Guilherme G. Piccoli wrote: >> Modules linked in: <...> >> CPU: 40 PID: 78274 Comm: qemu-system-x86 Tainted: P W OE > > Tainted: P - Proprietary module loaded ... > > Try again without that module Thanks Thomas, for the

[RFC 3/3] iommu: arm-smmu: Get reference to memory controller

2019-10-15 Thread Thierry Reding
From: Thierry Reding Use the memory controller framework to obtain a reference to the memory controller to which the SMMU will make memory requests. This allows the two drivers to properly order their probes so that the memory controller can be programmed first. An example where this is

[RFC 0/3] Introduce memory controller mini-framework

2019-10-15 Thread Thierry Reding
From: Thierry Reding Hi, this series proposes the introduction of a mini-framework for memory controllers. The primary use-case for this right now is to allow for drivers that depend on the memory controller to defer probe until the memory controller has been successfully registered. One

[RFC 1/3] memory: Introduce memory controller mini-framework

2019-10-15 Thread Thierry Reding
From: Thierry Reding This new framework is currently nothing more than a registry of memory controllers, with the goal being to order device probing. One use-case where this is useful, for example, is a memory controller device which needs to program some registers before the system MMU can be

Re: [RFC PATCH 0/6] SMMUv3 PMCG IMP DEF event support

2019-10-15 Thread Robin Murphy
Hi John, On 30/09/2019 15:33, John Garry wrote: This patchset adds IMP DEF event support for the SMMUv3 PMCG. It is marked as an RFC as the method to identify the PMCG implementation may be a quite disliked. And, in general, the series is somewhat incomplete. So the background is that the

Re: [PATCH RFC 0/5] ARM: Raspberry Pi 4 DMA support

2019-10-15 Thread Catalin Marinas
On Tue, Oct 15, 2019 at 09:48:22AM +0200, Nicolas Saenz Julienne wrote: > A little off topic but I was wondering if you have a preferred way to refer to > the arm architecture in a way that it unambiguously excludes arm64 (for > example > arm32 would work). arm32 should be fine. Neither arm64

[PATCH 2/2] iommu/dmar: catch early fault occurrences

2019-10-15 Thread Yuri Volchkov
First dmar faults can happen even before linux have scanned PCI bus. In such case worker will not have chance to lookup a corresponding 'struct pci_dev'. This commit defers processing of the fault until intel_iommu_init function has been called. At this point of time pci devices will be already

[PATCH 0/2] iommu/dmar: expose fault counters via sysfs

2019-10-15 Thread Yuri Volchkov
For health monitoring, it can be useful to know if iommu is behaving as expected. DMAR faults can be an indicator that a device: - has been misconfigured, or - has experienced a hardware hiccup and replacement should be considered, or - has been issuing faults due to malicious activity

[PATCH 1/2] iommu/dmar: collect fault statistics

2019-10-15 Thread Yuri Volchkov
Currently dmar_fault handler only prints a message in the dmesg. This commit introduces counters - how many faults have happened, and exposes them via sysfs. Each pci device will have an entry 'dmar_faults' reading from which will give user 3 lines remap: xxx read: xxx write: xxx This

Re: [PATCH 3/3] iommu/amd: Support multiple PCI DMA aliases in IRQ Remapping

2019-10-15 Thread Logan Gunthorpe
On 2019-10-15 7:37 a.m., Joerg Roedel wrote: > On Tue, Oct 08, 2019 at 04:18:37PM -0600, Logan Gunthorpe wrote: >> -static struct irq_remap_table *alloc_irq_table(u16 devid) >> +static int set_remap_table_entry_alias(struct pci_dev *pdev, u16 alias, >> + void

[PATCH] iommu/vt-d: Check VT-d RMRR region in BIOS is reported as reserved

2019-10-15 Thread Yian Chen
VT-d RMRR (Reserved Memory Region Reporting) regions are reserved for device use only and should not be part of allocable memory pool of OS. BIOS e820_table reports complete memory map to OS, including OS usable memory ranges and BIOS reserved memory ranges etc. x86 BIOS may not be trusted to

Re: [PATCH 0/2] iommu/dmar: expose fault counters via sysfs

2019-10-15 Thread Lu Baolu
Hi, On 10/15/19 11:11 PM, Yuri Volchkov wrote: For health monitoring, it can be useful to know if iommu is behaving as expected. DMAR faults can be an indicator that a device: - has been misconfigured, or - has experienced a hardware hiccup and replacement should be considered, or -

Re: [PATCH] iommu/vt-d: Check VT-d RMRR region in BIOS is reported as reserved

2019-10-15 Thread Lu Baolu
Hi, On 10/16/19 12:49 AM, Yian Chen wrote: VT-d RMRR (Reserved Memory Region Reporting) regions are reserved for device use only and should not be part of allocable memory pool of OS. BIOS e820_table reports complete memory map to OS, including OS usable memory ranges and BIOS reserved memory

[PATCH v4 7/7] iommu/mediatek: Reduce the tlb flush timeout value

2019-10-15 Thread Yong Wu
Reduce the tlb timeout value from 10us to 1000us. the original value is so long that affect the multimedia performance. This is only a minor improvement rather than fixing a issue. Signed-off-by: Yong Wu --- drivers/iommu/mtk_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v4 5/7] iommu/mediatek: Move the tlb_sync into tlb_flush

2019-10-15 Thread Yong Wu
Right now, the tlb_add_flush_nosync and tlb_sync always appear together. we merge the two functions into one(also move the tlb_lock into the new function). No functional change. Signed-off-by: Chao Hao Signed-off-by: Yong Wu --- drivers/iommu/mtk_iommu.c | 45

[PATCH v4 4/7] iommu/mediatek: Delete the leaf in the tlb_flush

2019-10-15 Thread Yong Wu
In our tlb range flush, we don't care the "leaf". Remove it to simplify the code. no functional change. "granule" also is unnecessary for us, Keep it satisfy the format of tlb_flush_walk. Signed-off-by: Yong Wu Reviewed-by: Robin Murphy --- drivers/iommu/mtk_iommu.c | 21 -

[PATCH v4 3/7] iommu/mediatek: Use gather to achieve the tlb range flush

2019-10-15 Thread Yong Wu
Use the iommu_gather mechanism to achieve the tlb range flush. Gather the iova range in the "tlb_add_page", then flush the merged iova range in iotlb_sync. Suggested-by: Tomasz Figa Signed-off-by: Yong Wu --- drivers/iommu/mtk_iommu.c | 12 1 file changed, 8 insertions(+), 4

[PATCH v4 6/7] iommu/mediatek: Get rid of the pgtlock

2019-10-15 Thread Yong Wu
Now we have tlb_lock for the HW tlb flush, then pgtable code hasn't needed the external "pgtlock" for a while. this patch remove the "pgtlock". Signed-off-by: Yong Wu --- drivers/iommu/mtk_iommu.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git

[PATCH v4 1/7] iommu/mediatek: Correct the flush_iotlb_all callback

2019-10-15 Thread Yong Wu
Use the correct tlb_flush_all instead of the original one. Fixes: 4d689b619445 ("iommu/io-pgtable-arm-v7s: Convert to IOMMU API TLB sync") Signed-off-by: Yong Wu Reviewed-by: Robin Murphy --- drivers/iommu/mtk_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v4 0/7] Improve tlb range flush

2019-10-15 Thread Yong Wu
This patchset mainly fixes a tlb flush timeout issue and use the new iommu_gather to re-implement the tlb flush flow. and several clean up patches about the tlb_flush. change note: v4: 1. Add a new tlb_lock for tlb operations. 2. Delete the pgtlock. 3. Remove the "writel" patch. v3:

[PATCH v4 2/7] iommu/mediatek: Add a new tlb_lock for tlb_flush

2019-10-15 Thread Yong Wu
The commit 4d689b619445 ("iommu/io-pgtable-arm-v7s: Convert to IOMMU API TLB sync") help move the tlb_sync of unmap from v7s into the iommu framework. It helps add a new function "mtk_iommu_iotlb_sync", But it lacked the lock, then it will cause the variable "tlb_flush_active" may be changed

RE: [PATCH 1/2] dma-mapping: Add dma_addr_is_phys_addr()

2019-10-15 Thread Ram Pai
On Mon, Oct 14, 2019 at 11:29:24AM +0100, Robin Murphy wrote: > On 14/10/2019 05:51, David Gibson wrote: > >On Fri, Oct 11, 2019 at 06:25:18PM -0700, Ram Pai wrote: > >>From: Thiago Jung Bauermann > >> > >>In order to safely use the DMA API, virtio needs to know whether DMA > >>addresses are in

Re: [PATCH 1/2] dma-mapping: Add dma_addr_is_phys_addr()

2019-10-15 Thread Christoph Hellwig
On Mon, Oct 14, 2019 at 11:29:24AM +0100, Robin Murphy wrote: >> However, I would like to see the commit message (and maybe the inline >> comments) expanded a bit on what the distinction here is about. Some >> of the text from the next patch would be suitable, about DMA addresses >> usually being

Re: [RFC PATCH 1/6] ACPI/IORT: Set PMCG device parent

2019-10-15 Thread John Garry
Hi Hanjun, Thanks for checking this. */ static int __init iort_add_platform_device(struct acpi_iort_node *node, - const struct iort_dev_config *ops) + const struct iort_dev_config *ops, struct device *parent)

Re: [PATCH v4 0/4] User API for nested shared virtual address (SVA)

2019-10-15 Thread Jean-Philippe Brucker
On Mon, Oct 14, 2019 at 10:14:05AM -0700, Jacob Pan wrote: > Hi Joerg, > > Just another gentle reminder. I think we have reached consensus in this > common code. Jean and Eric can confirm. Yes for the whole series Reviewed-by: Jean-Philippe Brucker

Re: [PATCH 2/2] virtio_ring: Use DMA API if memory is encrypted

2019-10-15 Thread Christoph Hellwig
On Fri, Oct 11, 2019 at 06:25:19PM -0700, Ram Pai wrote: > From: Thiago Jung Bauermann > > Normally, virtio enables DMA API with VIRTIO_F_IOMMU_PLATFORM, which must > be set by both device and guest driver. However, as a hack, when DMA API > returns physical addresses, guest driver can use the

Re: [PATCH RFC 0/5] ARM: Raspberry Pi 4 DMA support

2019-10-15 Thread Nicolas Saenz Julienne
On Mon, 2019-10-14 at 21:59 +0100, Catalin Marinas wrote: > On Mon, Oct 14, 2019 at 08:31:02PM +0200, Nicolas Saenz Julienne wrote: > > the Raspberry Pi 4 offers up to 4GB of memory, of which only the first > > is DMA capable device wide. This forces us to use of bounce buffers, > > which are

Re: [PATCH v4 0/4] User API for nested shared virtual address (SVA)

2019-10-15 Thread Auger Eric
Hi, On 10/2/19 9:42 PM, Jacob Pan wrote: > This set consists of IOMMU APIs to support SVA in the guest, a.k.a nested > SVA. As the complete SVA support is complex, we break down the enabling > effort into three stages: > 1. PCI device direct assignment > 2. Fault handling, especially page request

Re: [RFC PATCH 6/6] ACPI/IORT: Drop code to set the PMCG software-defined model

2019-10-15 Thread John Garry
On 15/10/2019 04:06, Hanjun Guo wrote: -/* > - * PMCG model identifiers for use in smmu pmu driver. Please note > - * that this is purely for the use of software and has nothing to > - * do with hardware or with IORT specification. > - */ > -#define IORT_SMMU_V3_PMCG_GENERIC0x /*

Re: [PATCH] iommu/qcom: Simplify a test in 'qcom_iommu_add_device()'

2019-10-15 Thread Joerg Roedel
On Mon, Sep 16, 2019 at 10:29:36PM +0200, Christophe JAILLET wrote: > 'iommu_group_get_for_dev()' never returns NULL, so this test can be > simplified a bit. > > This way, the test is consistent with all other calls to > 'iommu_group_get_for_dev()'. > > Signed-off-by: Christophe JAILLET > --- >

Re: [PATCH RFC 4/5] dma/direct: check for overflows in ARM's dma_capable()

2019-10-15 Thread Christoph Hellwig
On Mon, Oct 14, 2019 at 08:31:06PM +0200, Nicolas Saenz Julienne wrote: > The Raspberry Pi 4 has a 1GB ZONE_DMA area starting at address > 0x and a mapping between physical and DMA memory offset by > 0xc000. It transpires that, on non LPAE systems, any attempt to > translate physical

Re: [PATCH] iommu/rockchip: don't use platform_get_irq to implicitly count irqs

2019-10-15 Thread Joerg Roedel
On Wed, Sep 25, 2019 at 08:43:46PM +0200, Heiko Stuebner wrote: > Till now the Rockchip iommu driver walked through the irq list via > platform_get_irq() until it encountered an ENXIO error. With the > recent change to add a central error message, this always results > in such an error for each

Re: [PATCH v2] iommu/ipmmu-vmsa: Hook up r8a774b1 DT matching code

2019-10-15 Thread Joerg Roedel
On Fri, Sep 27, 2019 at 11:53:21AM +0100, Biju Das wrote: > Support RZ/G2N (R8A774B1) IPMMU. > > Signed-off-by: Biju Das > Reviewed-by: Geert Uytterhoeven > --- > V1-->V2 > * Incorporated Geet's review comment > * Added Geert's Reviewed-by tag > --- > drivers/iommu/ipmmu-vmsa.c | 5 + >

Re: [PATCH v4 1/7] firmware: qcom: scm: Add function to set IOMMU pagetable addressing

2019-10-15 Thread Joerg Roedel
On Wed, Oct 02, 2019 at 12:01:59AM +0200, khol...@gmail.com wrote: > From: "Angelo G. Del Regno" > > Add a function to change the IOMMU pagetable addressing to > AArch32 LPAE or AArch64. If doing that, then this must be > done for each IOMMU context (not necessarily at the same time). This

Re: [PATCH 1/1] iommu/vt-d: Refactor find_domain() helper

2019-10-15 Thread Joerg Roedel
On Sat, Sep 21, 2019 at 03:06:44PM +0800, Lu Baolu wrote: > Current find_domain() helper checks and does the deferred domain > attachment and return the domain in use. This isn't always the > use case for the callers. Some callers only want to retrieve the > current domain in use. > > This

Re: [PATCH] dt-bindings: iommu: ipmmu-vmsa: Add r8a774b1 support

2019-10-15 Thread Joerg Roedel
On Tue, Sep 24, 2019 at 08:40:54AM +0100, Biju Das wrote: > Document RZ/G2N (R8A774B1) SoC bindings. > > Signed-off-by: Biju Das > --- > Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt | 1 + > 1 file changed, 1 insertion(+) Applied, thanks.

Re: [PATCH RFC 2/5] ARM: introduce arm_dma_direct

2019-10-15 Thread Christoph Hellwig
I think we just need to byte the bullet and move over arm to dma-direct entirely. This needs a careful audit of what differs, but the biggest item is that we need to ensure dmabounce keeps working (or is replaced with swiotlb in a suitable way, but that might be a lot more work).

Re: [PATCH] iommu/ipmmu-vmsa: Only call platform_get_irq() when interrupt is mandatory

2019-10-15 Thread Joerg Roedel
On Tue, Oct 01, 2019 at 08:06:22PM +0200, Geert Uytterhoeven wrote: > As platform_get_irq() now prints an error when the interrupt does not > exist, calling it gratuitously causes scary messages like: > > ipmmu-vmsa e674.mmu: IRQ index 0 not found > > Fix this by moving the call to

[PATCH v2 6/6] iommu/ipmmu-vmsa: Add utlb_offset_base

2019-10-15 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, this patch adds a utlb_offset_base into struct ipmmu_features for IMUCTR and IMUASID registers. No behavior change. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 5 - 1 file changed, 4 insertions(+), 1

[PATCH v2 1/6] iommu/ipmmu-vmsa: Remove all unused register definitions

2019-10-15 Thread Yoshihiro Shimoda
To support different registers memory mapping hardware easily in the future, this patch removes all unused register definitions. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 76 -- 1 file changed, 76 deletions(-) diff --git

[PATCH v2 4/6] iommu/ipmmu-vmsa: Calculate context registers' offset instead of a macro

2019-10-15 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, this patch uses ipmmu_features values instead of a macro to calculate context registers offset. No behavior change. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 11 --- 1 file changed, 8

[PATCH v2 3/6] iommu/ipmmu-vmsa: Add helper functions for MMU "context" registers

2019-10-15 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, This patch adds helper functions ipmmu_ctx_{reg,read,write}() for MMU "context" registers. No behavior change. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 32 +++- 1 file

[PATCH v2 5/6] iommu/ipmmu-vmsa: Add helper functions for "uTLB" registers

2019-10-15 Thread Yoshihiro Shimoda
Since we will have changed memory mapping of the IPMMU in the future, This patch adds helper functions ipmmu_utlb_reg() and ipmmu_imu{asid,ctr}_write() for "uTLB" registers. No behavior change. Signed-off-by: Yoshihiro Shimoda --- drivers/iommu/ipmmu-vmsa.c | 26 +- 1

[PATCH v2 0/6] iommu/ipmmu-vmsa: minor updates

2019-10-15 Thread Yoshihiro Shimoda
This patch series is based on the latest iommu.git / next branch to modify the driver in the future's new hardware. Changes from v1: - Remove all unused register definitions instead of selective. so that I didn't add Geert-san's Reviewed-by in the patch [1/3]. - To improve code readability,

[PATCH v2 2/6] iommu/ipmmu-vmsa: tidyup register definitions

2019-10-15 Thread Yoshihiro Shimoda
To support different registers memory mapping hardware easily in the future, this patch tidies up the register definitions as below: - Add comments to state to which SoCs or SoC families they apply - Add categories about MMU "context" and uTLB registers No change behavior. Signed-off-by:

Re: [PATCH v4 0/4] User API for nested shared virtual address (SVA)

2019-10-15 Thread Joerg Roedel
On Wed, Oct 02, 2019 at 12:42:39PM -0700, Jacob Pan wrote: > Jacob Pan (2): > iommu/ioasid: Add custom allocators > iommu: Introduce guest PASID bind function > > Jean-Philippe Brucker (1): > iommu: Add I/O ASID allocator > > Yi L Liu (1): > iommu: Introduce cache_invalidate API > >

Re: [PATCH v3 3/7] iommu/mediatek: Use gather to achieve the tlb range flush

2019-10-15 Thread Robin Murphy
On 15/10/2019 06:26, Yong Wu wrote: On Mon, 2019-10-14 at 15:21 +0100, Robin Murphy wrote: On 14/10/2019 07:38, Yong Wu wrote: Use the iommu_gather mechanism to achieve the tlb range flush. Gather the iova range in the "tlb_add_page", then flush the merged iova range in iotlb_sync. Note: If

Re: [PATCH 0/2] iommu/vt-d: Select PCI_PRI for INTEL_IOMMU_SVM

2019-10-15 Thread Joerg Roedel
Hey Bjorn, On Wed, Oct 09, 2019 at 05:45:49PM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > I think intel-iommu.c depends on CONFIG_AMD_IOMMU in an undesirable way: > > When CONFIG_INTEL_IOMMU_SVM=y, iommu_enable_dev_iotlb() calls PRI > interfaces (pci_reset_pri() and

Re: [PATCH] iommu: rockchip: Free domain on .domain_free

2019-10-15 Thread Joerg Roedel
On Wed, Oct 02, 2019 at 02:29:23PM -0300, Ezequiel Garcia wrote: > IOMMU domain resource life is well-defined, managed > by .domain_alloc and .domain_free. > > Therefore, domain-specific resources shouldn't be tied to > the device life, but instead to its domain. > > Signed-off-by: Ezequiel

Re: [PATCH v3 4/7] iommu/mediatek: Delete the leaf in the tlb flush

2019-10-15 Thread Robin Murphy
On 15/10/2019 06:25, Yong Wu wrote: On Mon, 2019-10-14 at 15:22 +0100, Robin Murphy wrote: On 14/10/2019 07:38, Yong Wu wrote: In our tlb range flush, we don't care the "leaf". Remove it to simplify the code. no functional change. Presumably you don't care about the granule either? Yes. I

Re: [PATCH] iommu/intel: Use fallback generic_device_group() for ACPI devices

2019-10-15 Thread Joerg Roedel
On Fri, Oct 04, 2019 at 09:55:54PM +0100, Chris Wilson wrote: > [2.073922] DMAR: ACPI device "INT33C2:00" under DMAR at fed91000 as > 00:15.1 > [2.073983] DMAR: ACPI device "INT33C3:00" under DMAR at fed91000 as > 00:15.2 > [2.074027] DMAR: ACPI device "INT33C0:00" under DMAR at

Re: [PATCH] iommu: rockchip: Free domain on .domain_free

2019-10-15 Thread Robin Murphy
On 02/10/2019 18:29, Ezequiel Garcia wrote: IOMMU domain resource life is well-defined, managed by .domain_alloc and .domain_free. Therefore, domain-specific resources shouldn't be tied to the device life, but instead to its domain. FWIW, Reviewed-by: Robin Murphy Signed-off-by: Ezequiel

Re: [PATCH 0/3] PCI/ATS: Clean up unnecessary stubs and exports

2019-10-15 Thread Joerg Roedel
Hi Bjorn, On Wed, Oct 09, 2019 at 05:53:51PM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Most of the ATS/PRI/PASID interfaces are only used by IOMMU drivers that > can only be built statically, not as modules. A couple are only used by > the PCI core and don't need to be visible

Re: iommu: amd: Simpify decoding logic for INVALID_PPR_REQUEST event

2019-10-15 Thread j...@8bytes.org
On Mon, Oct 14, 2019 at 08:06:19PM +, Suthikulpanit, Suravee wrote: > Reuse existing macro to simplify the code and improve readability. > > Cc: Joerg Roedel > Cc: Gary R Hook > Signed-off-by: Suravee Suthikulpanit > --- > drivers/iommu/amd_iommu.c | 3 +-- > 1 file changed, 1

Re: [PATCH] memory: mtk-smi: Add PM suspend and resume ops

2019-10-15 Thread Joerg Roedel
On Wed, Oct 09, 2019 at 07:59:33PM +0800, Yong Wu wrote: > In the commit 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback > to enable clocks"), we use pm_runtime callback to enable/disable the smi > larb clocks. It will cause the larb's clock may not be disabled when > suspend. That is

Re: [PATCH v4 1/7] firmware: qcom: scm: Add function to set IOMMU pagetable addressing

2019-10-15 Thread AngeloGioacchino Del Regno
Il giorno mar 15 ott 2019 alle ore 13:14 Joerg Roedel ha scritto: > > On Wed, Oct 02, 2019 at 12:01:59AM +0200, khol...@gmail.com wrote: > > From: "Angelo G. Del Regno" > > > > Add a function to change the IOMMU pagetable addressing to > > AArch32 LPAE or AArch64. If doing that, then this must

Re: [PATCH v4 2/7] iommu/qcom: Use the asid read from device-tree if specified

2019-10-15 Thread AngeloGioacchino Del Regno
Il giorno mar 15 ott 2019 alle ore 14:10 Robin Murphy ha scritto: > > On 01/10/2019 23:02, khol...@gmail.com wrote: > > From: AngeloGioacchino Del Regno > > > > As specified in this driver, the context banks are 0x1000 apart. > > Problem is that sometimes the context number (our asid) does not >

Re: [PATCH RFC 4/5] dma/direct: check for overflows in ARM's dma_capable()

2019-10-15 Thread Nicolas Saenz Julienne
On Tue, 2019-10-15 at 03:23 -0700, Christoph Hellwig wrote: > On Mon, Oct 14, 2019 at 08:31:06PM +0200, Nicolas Saenz Julienne wrote: > > The Raspberry Pi 4 has a 1GB ZONE_DMA area starting at address > > 0x and a mapping between physical and DMA memory offset by > > 0xc000. It

Re: [PATCH v4 2/7] iommu/qcom: Use the asid read from device-tree if specified

2019-10-15 Thread Robin Murphy
On 01/10/2019 23:02, khol...@gmail.com wrote: From: AngeloGioacchino Del Regno As specified in this driver, the context banks are 0x1000 apart. Problem is that sometimes the context number (our asid) does not match this logic and we end up using the wrong one: this starts being a problem in

Re: iommu: amd: Fix incorrect PASID decoding from event log

2019-10-15 Thread j...@8bytes.org
On Mon, Oct 14, 2019 at 08:06:05PM +, Suthikulpanit, Suravee wrote: > IOMMU Event Log encodes 20-bit PASID for events: > ILLEGAL_DEV_TABLE_ENTRY > IO_PAGE_FAULT > PAGE_TAB_HARDWARE_ERROR > INVALID_DEVICE_REQUEST > as: > PASID[15:0] = bit 47:32 > PASID[19:16] = bit

Re: [PATCH v4 1/7] firmware: qcom: scm: Add function to set IOMMU pagetable addressing

2019-10-15 Thread Joerg Roedel
On Tue, Oct 15, 2019 at 02:33:47PM +0200, AngeloGioacchino Del Regno wrote: > Il giorno mar 15 ott 2019 alle ore 13:14 Joerg Roedel > ha scritto: > > > > On Wed, Oct 02, 2019 at 12:01:59AM +0200, khol...@gmail.com wrote: > > > From: "Angelo G. Del Regno" > > > > > > Add a function to change the

Re: [PATCH v4 1/7] firmware: qcom: scm: Add function to set IOMMU pagetable addressing

2019-10-15 Thread AngeloGioacchino Del Regno
Il giorno mar 15 ott 2019 alle ore 14:40 Joerg Roedel ha scritto: > > On Tue, Oct 15, 2019 at 02:33:47PM +0200, AngeloGioacchino Del Regno wrote: > > Il giorno mar 15 ott 2019 alle ore 13:14 Joerg Roedel > > ha scritto: > > > > > > On Wed, Oct 02, 2019 at 12:01:59AM +0200, khol...@gmail.com