Re: [PATCH v2 3/7] iommu/vt-d: Expose ISA direct mapping region via iommu_get_resv_regions

2019-03-25 Thread Lu Baolu
Hi James, On 3/25/19 8:57 PM, James Sewart wrote: Theres an issue that if we choose to alloc a new resv_region with type IOMMU_RESV_DIRECT, we will need to refactor intel_iommu_put_resv_regions to free this entry type which means refactoring the rmrr regions in get_resv_regions. Should this work

Re: [PATCH v2 3/7] iommu/vt-d: Expose ISA direct mapping region via iommu_get_resv_regions

2019-03-25 Thread Lu Baolu
Hi, On 3/25/19 8:57 PM, James Sewart wrote: Hey Lu, On 25 Mar 2019, at 02:03, Lu Baolu wrote: Hi James, On 3/22/19 5:57 PM, James Sewart wrote: Hey Lu, On 15 Mar 2019, at 02:19, Lu Baolu wrote: Hi James, On 3/14/19 7:58 PM, James Sewart wrote: To support mapping ISA region via iommu_g

Re: [PATCH v2 4/4] iommu/arm-smmu: Add support to handle Qcom's TLBI serialization errata

2019-03-25 Thread Bjorn Andersson
On Sun 09 Sep 23:25 PDT 2018, Vivek Gautam wrote: > Qcom's implementation of arm,mmu-500 require to serialize all > TLB invalidations for context banks. > In case the TLB invalidation requests don't go through the first > time, there's a way to disable/enable the wait for safe logic. > Disabling t

Re: [PATCH v2 3/4] firmware/qcom_scm: Add scm call to handle smmu errata

2019-03-25 Thread Bjorn Andersson
On Sun 09 Sep 23:25 PDT 2018, Vivek Gautam wrote: > Qcom's smmu-500 needs to toggle wait-for-safe sequence to > handle TLB invalidation sync's. > Few firmwares allow doing that through SCM interface. > Add API to toggle wait for safe from firmware through a > SCM call. > > Signed-off-by: Vivek Ga

Re: [PATCH v2 2/4] firmware/qcom_scm: Add atomic version of io read/write APIs

2019-03-25 Thread Bjorn Andersson
On Sun 09 Sep 23:25 PDT 2018, Vivek Gautam wrote: > Add atomic versions of qcom_scm_io_readl/writel to enable > reading/writing secure registers from atomic context. > > Signed-off-by: Vivek Gautam Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/firmware/qcom_scm-32.c | 12 +

Re: [PATCH v2 1/4] firmware: qcom_scm-64: Add atomic version of qcom_scm_call

2019-03-25 Thread Bjorn Andersson
On Sun 09 Sep 23:25 PDT 2018, Vivek Gautam wrote: > There are scnenarios where drivers are required to make a > scm call in atomic context, such as in one of the qcom's > arm-smmu-500 errata [1]. > > [1] ("https://source.codeaurora.org/quic/la/kernel/msm-4.9/ > tree/drivers/iommu/arm-smmu.c

Re: [PATCH v3 09/10] NTB: Add MSI interrupt support to ntb_transport

2019-03-25 Thread Logan Gunthorpe
On 2019-03-22 10:47 a.m., Bjorn Helgaas wrote: > Hi Logan, > > Drive-by nits: Thanks Bjorn! I've updated my patches for v4 which I'll send out in a week or two. Logan ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundat

Re: [PATCH v2 RFC/RFT] dma-contiguous: Get normal pages for single-page allocations

2019-03-25 Thread Nicolin Chen
On Mon, Mar 25, 2019 at 12:14:37PM +, Catalin Marinas wrote: > diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c > index fcdb23e8d2fc..8955ba6f52fc 100644 > --- a/kernel/dma/direct.c > +++ b/kernel/dma/direct.c > @@ -111,8 +111,7 @@ struct page *__dma_direct_alloc_pages(struct device *dev

Re: [PATCH 1/4] ACPI/IORT: Check ATS capability in root complex nodes

2019-03-25 Thread Jean-Philippe Brucker
On 21/03/2019 16:00, Sinan Kaya wrote: > On 3/20/2019 1:36 PM, Jean-Philippe Brucker wrote: >>   err = pci_for_each_dma_alias(to_pci_dev(dev), >>    iort_pci_iommu_init, &info); >> + >> +    if (!err && !iort_pci_rc_supports_ats(node)) >> +    dev->iommu_

Re: [PATCH 3/4] iommu/arm-smmu-v3: Add support for PCI ATS

2019-03-25 Thread Jean-Philippe Brucker
On 21/03/2019 15:52, Sinan Kaya wrote: > On 3/20/2019 1:36 PM, Jean-Philippe Brucker wrote: >> pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_ATS); >> +    if (!pos) >> +    return -ENOSYS; >> + > > You don't need this. pci_enable_ats() validates this via. > > if (!dev->ats_cap) >    

Re: [PATCH v2 1/1] iommu: Bind process address spaces to devices

2019-03-25 Thread Joerg Roedel
Hey Jean-Philippe, thanks for the patch, I think we are on the finish line with this interface. Just one small question below. On Wed, Mar 20, 2019 at 03:02:58PM +, Jean-Philippe Brucker wrote: > +int iommu_sva_set_ops(struct iommu_sva *handle, > + const struct iommu_sva_ops

Re: [PATCH] svm/avic: iommu/amd: Flush IOMMU IRT after update all entries

2019-03-25 Thread j...@8bytes.org
On Wed, Mar 20, 2019 at 08:14:56AM +, Suthikulpanit, Suravee wrote: > When AVIC is enabled and the VM has discrete device assignment, > the interrupt remapping table (IRT) is used to keep track of which > destination APIC ID the IOMMU will inject the device interrput to. > > This means every t

Re: [PATCH 1/1] iommu: Remove iommu_callback_data

2019-03-25 Thread Joerg Roedel
On Wed, Mar 20, 2019 at 09:40:24AM +0800, Lu Baolu wrote: > The iommu_callback_data is not used anywhere, remove it to make > the code more concise. > > Signed-off-by: Lu Baolu > --- > drivers/iommu/iommu.c | 11 ++- > 1 file changed, 2 insertions(+), 9 deletions(-) Applied, thanks. ___

Re: [PATCH] iommu: Don't print warning when IOMMU driver only supports unmanaged domains

2019-03-25 Thread Joerg Roedel
On Fri, Mar 22, 2019 at 05:04:26PM +0100, Joerg Roedel wrote: > From: Joerg Roedel > > Print the warning about the fall-back to IOMMU_DOMAIN_DMA in > iommu_group_get_for_dev() only when such a domain was > actually allocated. > > Otherwise the user will get misleading warnings in the > kernel lo

Re: [PATCH v2 3/7] iommu/vt-d: Expose ISA direct mapping region via iommu_get_resv_regions

2019-03-25 Thread James Sewart via iommu
Hey Lu, > On 25 Mar 2019, at 02:03, Lu Baolu wrote: > > Hi James, > > On 3/22/19 5:57 PM, James Sewart wrote: >> Hey Lu, >>> On 15 Mar 2019, at 02:19, Lu Baolu wrote: >>> >>> Hi James, >>> >>> On 3/14/19 7:58 PM, James Sewart wrote: To support mapping ISA region via iommu_group_create_d

Re: [PATCH v2 RFC/RFT] dma-contiguous: Get normal pages for single-page allocations

2019-03-25 Thread Catalin Marinas
On Fri, Mar 22, 2019 at 01:09:26PM -0700, Nicolin Chen wrote: > On Fri, Mar 22, 2019 at 10:57:13AM +, Catalin Marinas wrote: > > > > Do you have any numbers to back this up? You don't seem to address > > > > dma_direct_alloc() either but, as I said above, it's not trivial since > > > > some pla