Re: [Patch Part3 V6 5/8] iommu/vt-d: Enhance intel_irq_remapping driver to support DMAR unit hotplug

2014-09-18 Thread Yijing Wang
On 2014/9/19 13:18, Jiang Liu wrote: > Implement required callback functions for intel_irq_remapping driver > to support DMAR unit hotplug. > > Signed-off-by: Jiang Liu Reviewed-by: Yijing Wang > --- > drivers/iommu/intel_irq_remapping.c | 226 > ++- > 1 file

Re: [Patch Part3 V6 1/8] iommu/vt-d: Introduce helper function dmar_walk_resources()

2014-09-18 Thread Yijing Wang
On 2014/9/19 13:18, Jiang Liu wrote: > Introduce helper function dmar_walk_resources to walk resource entries > in DMAR table and ACPI buffer object returned by ACPI _DSM method > for IOMMU hot-plug. > > Signed-off-by: Jiang Liu Reviewed-by: Yijing Wang > --- > drivers/iommu/dmar.c|

[Patch Part3 V6 7/8] iommu/vt-d: Enhance intel-iommu driver to support DMAR unit hotplug

2014-09-18 Thread Jiang Liu
Implement required callback functions for intel-iommu driver to support DMAR unit hotplug. Signed-off-by: Jiang Liu Reviewed-by: Yijing Wang --- drivers/iommu/intel-iommu.c | 206 +++ 1 file changed, 151 insertions(+), 55 deletions(-) diff --git a/drive

[Patch Part3 V6 3/8] iommu/vt-d: Implement DMAR unit hotplug framework

2014-09-18 Thread Jiang Liu
On Intel platforms, an IO Hub (PCI/PCIe host bridge) may contain DMAR units, so we need to support DMAR hotplug when supporting PCI host bridge hotplug on Intel platforms. According to Section 8.8 "Remapping Hardware Unit Hot Plug" in "Intel Virtualization Technology for Directed IO Architecture S

[Patch Part3 V6 2/8] iommu/vt-d: Dynamically allocate and free seq_id for DMAR units

2014-09-18 Thread Jiang Liu
Introduce functions to support dynamic IOMMU seq_id allocating and releasing, which will be used to support DMAR hotplug. Also rename IOMMU_UNITS_SUPPORTED as DMAR_UNITS_SUPPORTED. Signed-off-by: Jiang Liu Reviewed-by: Yijing Wang --- drivers/iommu/dmar.c| 40

[Patch Part3 V6 4/8] iommu/vt-d: Search for ACPI _DSM method for DMAR hotplug

2014-09-18 Thread Jiang Liu
According to Intel VT-d specification, _DSM method to support DMAR hotplug should exist directly under corresponding ACPI object representing PCI host bridge. But some BIOSes doesn't conform to this, so search for _DSM method in the subtree starting from the ACPI object representing the PCI host br

[Patch Part3 V6 6/8] iommu/vt-d: Enhance error recovery in function intel_enable_irq_remapping()

2014-09-18 Thread Jiang Liu
Enhance error recovery in function intel_enable_irq_remapping() by tearing down all created data structures. Signed-off-by: Jiang Liu Reviewed-by: Yijing Wang --- drivers/iommu/intel_irq_remapping.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/int

[Patch Part3 V6 8/8] pci, ACPI, iommu: Enhance pci_root to support DMAR device hotplug

2014-09-18 Thread Jiang Liu
Finally enhance pci_root driver to support DMAR device hotplug when hot-plugging PCI host bridges. Signed-off-by: Jiang Liu Reviewed-by: Yijing Wang --- drivers/acpi/pci_root.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/pci_root.c b/driv

[Patch Part3 V6 0/8] Enable support of Intel DMAR device hotplug

2014-09-18 Thread Jiang Liu
When hot plugging a descrete IOH or a physical processor with embedded IIO, we need to handle DMAR(or IOMMU) unit in the PCIe host bridge if DMAR is in use. This patch set tries to enhance current DMAR/IOMMU/IR drivers to support hotplug and is based on latest Linus master branch. All prerequisite

[Patch Part3 V6 5/8] iommu/vt-d: Enhance intel_irq_remapping driver to support DMAR unit hotplug

2014-09-18 Thread Jiang Liu
Implement required callback functions for intel_irq_remapping driver to support DMAR unit hotplug. Signed-off-by: Jiang Liu --- drivers/iommu/intel_irq_remapping.c | 226 ++- 1 file changed, 171 insertions(+), 55 deletions(-) diff --git a/drivers/iommu/intel_irq

[Patch Part3 V6 1/8] iommu/vt-d: Introduce helper function dmar_walk_resources()

2014-09-18 Thread Jiang Liu
Introduce helper function dmar_walk_resources to walk resource entries in DMAR table and ACPI buffer object returned by ACPI _DSM method for IOMMU hot-plug. Signed-off-by: Jiang Liu --- drivers/iommu/dmar.c| 209 +++ drivers/iommu/intel-iommu.c |

Re: [RFC PATCH v3 1/7] iommu: provide early initialisation hook for IOMMU drivers

2014-09-18 Thread Robin Murphy
Hi Will, After some fun times wondering why on Earth of_iommu_init was trying to instantiate a GIC, I think we may need one of these as part of this patch, too ;) Robin. --->8--- diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index 8656b63..1927691 100644 --- a/drivers/iom

Re: [RFC PATCH v3 5/7] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-09-18 Thread Laurent Pinchart
Hi Will, Thank you for the patch. On Friday 12 September 2014 17:34:53 Will Deacon wrote: > This patch extends of_dma_configure so that it sets up the IOMMU for a > device, as well as the coherent/non-coherent DMA mapping ops. > > Signed-off-by: Will Deacon > --- > arch/arm/include/asm/dma-map

Re: [RFC PATCH v3 4/7] iommu: provide helper function to configure an IOMMU for an of master

2014-09-18 Thread Laurent Pinchart
Hi Will, Thank you for the patch. On Friday 12 September 2014 17:34:52 Will Deacon wrote: > The generic IOMMU device-tree bindings can be used to add arbitrary OF > masters to an IOMMU with a compliant binding. > > This patch introduces of_iommu_configure, which does exactly that. A > list of io