Re: [PATCH v11 20/27] iommu/exynos: allow having multiple System MMUs for a master H/W

2014-03-21 Thread Tomasz Figa
On 21.03.2014 06:21, Cho KyongHo wrote: On Thu, 20 Mar 2014 11:54:58 +0100, Tomasz Figa wrote: On 20.03.2014 11:22, Cho KyongHo wrote: On Wed, 19 Mar 2014 16:14:57 +0100, Tomasz Figa wrote: On 19.03.2014 14:20, Tomasz Figa wrote: On 19.03.2014 01:39, Cho KyongHo wrote: On Tue, 18 Mar 2014

[PATCH 10/33] iommu/vt-d: Stop dmar_insert_dev_info() freeing domains on losing race

2014-03-21 Thread David Woodhouse
By moving this into get_domain_for_dev() we can make dmar_insert_dev_info() suitable for use with special domains such as the si_domain, which currently use domain_add_dev_info(). Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 45

[PATCH 05/33] iommu/vt-d: Add ACPI devices into dmaru-devices[] array

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/dmar.c | 75 1 file changed, 75 insertions(+) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 34d271e..382f63d 100644 --- a/drivers/iommu/dmar.c +++

[PATCH 12/33] iommu/vt-d: Use domain_remove_one_dev_info() in domain_add_dev_info() error path

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 3342d65..0751f6d 100644 --- a/drivers/iommu/intel-iommu.c +++

[PATCH 16/33] iommu/vt-d: Store PCI segment number in struct intel_iommu

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/dmar.c| 1 + include/linux/intel-iommu.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 382f63d..cd05a4b 100644 --- a/drivers/iommu/dmar.c +++

[PATCH 03/33] iommu/vt-d: Allocate space for ACPI devices

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/dmar.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index eb95020..4c6297d 100644 --- a/drivers/iommu/dmar.c +++

[PATCH 08/33] iommu/vt-d: Use struct device in device_domain_info, not struct pci_dev

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 54 +++-- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 85ec773..ccef436 100644 ---

[PATCH 19/33] iommu/vt-d: Make device_to_iommu() cope with non-PCI devices

2014-03-21 Thread David Woodhouse
Pass the struct device to it, and also make it return the bus/devfn to use, since that is also stored in the DMAR table. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 78 ++--- 1 file changed, 46 insertions(+),

[PATCH 09/33] iommu/vt-d: Pass iommu to domain_context_mapping_one() and iommu_support_dev_iotlb()

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index ccef436..1ab7c18 100644 ---

[PATCH 00/33] iommu/vt-d: Add support for DMA mapping of ACPI-enumerated devices

2014-03-21 Thread David Woodhouse
Version 2.2 of the VT-d specification adds support for DMA mapping of ACPI devices, by adding fields to the DMAR table which indicate the ACPI path of each DMA-capable device and the PCI bus/dev/fn from which its DMA will *appear* to come. The bulk of this patch series is going through the code

[PATCH 07/33] iommu/vt-d: Make dmar_insert_dev_info() take struct device instead of struct pci_dev

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index db7e44b..85ec773 100644 ---

[PATCH 15/33] iommu/vt-d: Remove device_to_iommu() call from domain_remove_dev_info()

2014-03-21 Thread David Woodhouse
This was problematic because it works by domain/bus/devfn and we want to make device_to_iommu() use only a struct device * (for handling non-PCI devices). Now that the iommu pointer is reliably stored in the device_domain_info, we don't need to look it up. Signed-off-by: David Woodhouse

[PATCH 06/33] iommu/vt-d: Make iommu_dummy() take struct device instead of struct pci_dev

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index f38f482..db7e44b 100644 --- a/drivers/iommu/intel-iommu.c +++

[PATCH 04/33] iommu/vt-d: Change scope lists to struct device, bus, devfn

2014-03-21 Thread David Woodhouse
It's not only for PCI devices any more, and the scope information for an ACPI device provides the bus and devfn so that has to be stored here too. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/dmar.c| 41 ++---

[PATCH 17/33] iommu/vt-d: Remove segment from struct device_domain_info()

2014-03-21 Thread David Woodhouse
It's accessible via info-iommu-segment so this is redundant. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c

[PATCH 11/33] iommu/vt-d: use dmar_insert_dev_info() from dma_add_dev_info()

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 22 +++--- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b50d1d6..3342d65 100644 ---

[PATCH 14/33] iommu/vt-d: Simplify iommu check in domain_remove_one_dev_info()

2014-03-21 Thread David Woodhouse
Now we store the iommu in the device_domain_info, we don't need to do a lookup. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c

[PATCH 01/33] iommu/vt-d: Add ACPI namespace device reporting structures

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- include/acpi/actbl2.h | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 094a906..da5b057 100644 --- a/include/acpi/actbl2.h +++

[PATCH 02/33] iommu/vt-d: Parse ANDD records

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/dmar.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index b19f9f4..eb95020 100644 --- a/drivers/iommu/dmar.c +++ b/drivers/iommu/dmar.c @@

[PATCH 18/33] iommu/vt-d: Make identity_mapping() take struct device not struct pci_dev

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 81f52d3..4a028c9 100644 --- a/drivers/iommu/intel-iommu.c +++

[PATCH 29/33] iommu/vt-d: Remove pdev from iommu_no_mapping()

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 3e15050..7b73c42 100644 --- a/drivers/iommu/intel-iommu.c +++

[PATCH 20/33] iommu/vt-d: Make domain_context_mapp{ed, ing}() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index a24611f..741fb1d 100644 ---

[PATCH 21/33] iommu/vt-d: Make get_domain_for_dev() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 75 ++--- 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 741fb1d..05c5214 100644 ---

[PATCH 25/33] iommu/vt-d: Remove some pointless to_pci_dev() calls

2014-03-21 Thread David Woodhouse
Mostly made redundant by using dev_name() instead of pci_name(), and one instance of using *dev-dma_mask instead of pdev-dma_mask. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff

[PATCH 23/33] iommu/vt-d: Make iommu_should_identity_map() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 107 +++- 1 file changed, 57 insertions(+), 50 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index acb9268..15371ec 100644 ---

[PATCH 24/33] iommu/vt-d: Make get_valid_domain_for_dev() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 15371ec..41eafc3 100644 ---

[PATCH 26/33] iommu/vt-d: Rename 'hwdev' variables to 'dev' now that that's the norm

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index cfe08ea..f3c1624 100644 ---

[PATCH 30/33] iommu/vt-d: Remove pdev from intel_iommu_attach_device()

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 7b73c42..9a66bf7 100644 --- a/drivers/iommu/intel-iommu.c +++

[PATCH 22/33] iommu/vt-d: Handle RMRRs for non-PCI devices

2014-03-21 Thread David Woodhouse
Should hopefully never happen (RMRRs are an abomination) but while we're busy eliminating all the PCI assumptions, we might as well do it. Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 30 ++ 1 file changed, 14

[PATCH 28/33] iommu/vt-d: Make domain_add_dev_info() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 270a25b..3e15050 100644 --- a/drivers/iommu/intel-iommu.c

[PATCH 32/33] iommu/vt-d: Finally enable translation for non-PCI devices

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b1235dc..0f065bc 100644 --- a/drivers/iommu/intel-iommu.c +++

[PATCH 33/33] iommu/vt-d: Include ACPI devices in iommu=pt

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 61 +++-- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 0f065bc..53996d9 100644 ---

[PATCH 31/33] iommu/vt-d: Remove to_pci_dev() in intel_map_page()

2014-03-21 Thread David Woodhouse
It might not be... Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 9a66bf7..b1235dc 100644 ---

[PATCH 27/33] iommu/vt-d: Make domain_remove_one_dev_info() take struct device

2014-03-21 Thread David Woodhouse
Signed-off-by: David Woodhouse david.woodho...@intel.com --- drivers/iommu/intel-iommu.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index f3c1624..270a25b 100644 ---

Re: [PATCH V2] iommu/amd: Fix logic to determine and checking max PASID

2014-03-21 Thread Suravee Suthikulpanit
Joerg, Do you have any concerns about the V2 of this patch? Thanks, Suravee On 3/5/2014 6:54 PM, suravee.suthikulpa...@amd.com wrote: From: Suravee Suthikulpanit suravee.suthikulpa...@amd.com In reality, the spec can only support 16-bit PASID since INVALIDATE_IOTLB_PAGES and