Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-26 Thread Joerg Roedel
On Thu, Jan 26, 2012 at 12:25:32PM -0600, Scott Wood wrote: On 01/20/2012 10:03 AM, Joerg Roedel wrote: Because the values in this generic geometry-struct make sense for more than one IOMMU (short-term for Tegra GART and Freescale PAMU). If you have additional vendor-specific ones you could

[PATCH 2/6] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-26 Thread Joerg Roedel
Implement the attribute itself and add the code for the AMD IOMMU driver. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |4 drivers/iommu/iommu.c | 19 --- include/linux/iommu.h |8 3 files changed, 28 insertions

[PATCH 6/6] iommu/tegra: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-26 Thread Joerg Roedel
From: Hiroshi DOYU hd...@nvidia.com Implement the attribute for the Tegra IOMMU drivers. Signed-off-by: Hiroshi DOYU hd...@nvidia.com Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/tegra-gart.c |5 + drivers/iommu/tegra-smmu.c |5 + 2 files changed, 10

Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-26 Thread Joerg Roedel
On Thu, Jan 26, 2012 at 12:42:10PM -0600, Scott Wood wrote: On 01/26/2012 12:31 PM, Joerg Roedel wrote: The force_aperture flag indicated whether DMA is only allowed between aperture_start and apertuer_end or if DMA is allowed outside of this range too (unmapped in this case). The AMD

Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-26 Thread Joerg Roedel
On Thu, Jan 26, 2012 at 01:00:37PM -0600, Scott Wood wrote: On 01/26/2012 12:51 PM, Joerg Roedel wrote: Because this is a flag that makes sense for all IOMMU. Every IOMMU either allows DMA outside its aperture or it doesn't. Another reason why it must be in the generic struct

Re: [PATCH 2/6] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-27 Thread Joerg Roedel
Hi Ohad, On Fri, Jan 27, 2012 at 09:08:44AM +0200, Ohad Ben-Cohen wrote: On Thu, Jan 26, 2012 at 8:40 PM, Joerg Roedel joerg.roe...@amd.com wrote: Implement the attribute itself and add the code for the AMD IOMMU driver. It's somewhat non-intuitive to have the generic attribute code

Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-27 Thread Joerg Roedel
On Thu, Jan 26, 2012 at 02:02:26PM -0600, Scott Wood wrote: On 01/26/2012 01:44 PM, Joerg Roedel wrote: Another reason why it must be in the generic struct is the intended generic dma-ops layer on-top. This code can decide on this flag wheter a address needs to be remapped at all. So

Re: [PATCH 2/5] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-01-30 Thread Joerg Roedel
On Fri, Jan 27, 2012 at 03:22:43PM -0600, Scott Wood wrote: OK, so there's a geometry that is read-only, and potentially a driver-specific geometry that is read/write. The default config for PAMU would likely be a 1 MiB aperture in which the dma api can do arbitrary 4k mappings -- this fits

Re: Using OMAP3 ISP live display and snapshot sample applications

2012-02-14 Thread Joerg Roedel
On Mon, Feb 13, 2012 at 09:28:30AM +0800, James wrote: @@ -28,6 +28,7 @@ obj-$(CONFIG_XEN)           += xen/  # regulators early, since some subsystems rely on them to initialize  obj-$(CONFIG_REGULATOR)              += regulator/ +obj-$(CONFIG_IOMMU_SUPPORT)  += iommu/  # tty/

Re: [PATCH v2 2/2] iommu/omap: fix NULL pointer dereference

2012-02-23 Thread Joerg Roedel
On Thu, Feb 23, 2012 at 06:16:59PM +0200, Ohad Ben-Cohen wrote: On Thu, Feb 23, 2012 at 6:11 PM, Joerg Roedel joerg.roe...@amd.com wrote: I guess these patches are 3.3 material? Yes. How about tagging them for stable too? Good point. But it's only relevant for this 2nd patch (the NULL

Re: Using OMAP3 ISP live display and snapshot sample applications

2012-02-24 Thread Joerg Roedel
On Thu, Feb 23, 2012 at 07:01:05PM +0200, Ohad Ben-Cohen wrote: On Thu, Feb 23, 2012 at 6:59 PM, Ohad Ben-Cohen o...@wizery.com wrote: diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 609ea2d..f992395 100644 --- a/arch/arm/mach-omap2/mailbox.c +++

Re: [PATCH v12 2/3] ARM: EXYNOS: Change System MMU platform device definitions

2012-03-15 Thread Joerg Roedel
On Thu, Mar 15, 2012 at 05:32:39PM +0900, Cho KyongHo wrote: Handling System MMUs with an identifier is not flexible to manage System MMU platform devices because of the following reasons: 1. A device driver which needs to handle System MMU must know the ID. 2. A System MMU may not present in

[PATCH 2/2] iommu/amd: Move interrupt setup code into seperate function

2012-03-15 Thread Joerg Roedel
For interrupt remapping the enablement of the IOMMU MSI interrupt needs to be deferred because the IOMMU itself will be initialized before the io-apics are up and running. So the code to setup the MSI is moved seperated from the hardware-setup routine now. Signed-off-by: Joerg Roedel joerg.roe

[PATCH 4/9] iommu/vt-d: Convert missing apic.c intr-remapping call to remap_ops

2012-03-15 Thread Joerg Roedel
Convert these calls too: * Disable of remapping hardware * Reenable of remapping hardware * Enable fault handling With that all of arch/x86/kernel/apic/apic.c is converted to use the generic intr-remapping interface. Signed-off-by: Joerg Roedel joerg.roe...@amd.com

[PATCH 6/9] iommu/vt-d: Convert IR set_affinity function to remap_ops

2012-03-15 Thread Joerg Roedel
The function to set interrupt affinity with interrupt remapping enabled is Intel specific too. So move it to the irq_remap_ops too. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/intr_remapping.h |9 arch/x86/kernel/apic/io_apic.c| 69

[PATCH 9/9] x86, iommu/vt-d: Clean up interfaces for interrupt remapping

2012-03-15 Thread Joerg Roedel
Remove the Intel specific interfaces from dmar.h and remove asm/irq_remapping.h which is only used for io_apic.c anyway. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/irq_remapping.h | 22 arch/x86/kernel/apic/io_apic.c | 17 +- drivers

[RFC PATCH 0/9] Introduce irq_remap_ops to x86

2012-03-15 Thread Joerg Roedel
Hi, in order to implement interrupt remapping using the AMD IOMMU I did some refactoring of the current Intel-specific interrupt remapping code. The result is posted for comments in this patch-set. The patch-set basically removes the Intel-specific calls from the X86 apic and io-apic code and

[PATCH 7/9] iommu/vt-d: Convert free_irte into a remap_ops callback

2012-03-15 Thread Joerg Roedel
The operation for releasing a remapping entry is iommu specific too. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/intr_remapping.h |2 ++ arch/x86/kernel/apic/io_apic.c|2 +- drivers/iommu/intel_intr_remapping.c |3 ++- drivers/iommu

[PATCH 2/9] iommu: Rename intr_remapping files to intel_intr_remapping

2012-03-15 Thread Joerg Roedel
. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/Makefile |2 +- drivers/iommu/intel_intr_remapping.c | 849 ++ drivers/iommu/intr_remapping.c | 834 - drivers/iommu/intr_remapping.h

Re: [RFC PATCH 0/9] Introduce irq_remap_ops to x86

2012-03-15 Thread Joerg Roedel
On Thu, Mar 15, 2012 at 11:04:39AM -0700, Yinghai Lu wrote: Do you have git branch that I could check? Just pushed it to git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git intr-remapping May take some time until it appears on the mirrors. Joerg

Re: [PATCH v12 2/3] ARM: EXYNOS: Change System MMU platform device definitions

2012-03-18 Thread Joerg Roedel
On Fri, Mar 16, 2012 at 01:47:50PM -0700, Kukjin Kim wrote: Anyway Joerg, how do you want to handle this? Do you want to pick up 1/2/3 all of them in your tree? If so, 2nd patch should be on top of some samsung topic stuff. Since patch 2 only applies to the Samsung tree, it is best to

Re: [PATCH] iommu: amd: fix section mismatch

2012-03-22 Thread Joerg Roedel
On Fri, Mar 16, 2012 at 11:38:22AM -0700, Gerard Snitselaar wrote: amd_iommu_enable_interrupts() called in amd_iommu_resume(). Signed-off-by: Gerard Snitselaar d...@snitselaar.org Applied to x86/amd, thanks Gerard. ___ iommu mailing list

[git pull] IOMMU updates for Linux 3.4

2012-03-22 Thread Joerg Roedel
/kernel/git/joro/iommu.git iommu-updates-v3.4 Gerard Snitselaar (1): iommu/amd: Fix section mismatch Hiroshi DOYU (2): ARM: IOMMU: Tegra20: Add iommu_ops for GART driver ARM: IOMMU: Tegra30: Add iommu_ops for SMMU driver Joerg Roedel (7): iommu/amd: Split amd_iommu_init

Re: [PATCH 00/10] vt-d irq_remap_ops patchset

2012-04-10 Thread Joerg Roedel
in io_apic.c that I would like to roll into the new io_apic_ops. I will look into that shortly. Joerg Roedel (8): iommu: Rename intr_remapping files to intel_intr_remapping iommu/vt-d: Make intr-remapping initialization generic iommu/vt-d: Convert missing apic.c intr-remapping call

Re: [PATCH] iommu: OMAP: device detach on domain destroy

2012-04-12 Thread Joerg Roedel
and internal iommu object. In order to detach the users we need to track devices using the iommu, current use cases only have one user of iommu per instance. When required this can evolve to a list with the devices using the iommu_dev. Reported-by: Joerg Roedel j...@8bytes.org Reviewed-by: Ohad Ben

Re: [PATCH 1/1] iommu/tegra: smmu: Print device name correctly

2012-04-16 Thread Joerg Roedel
On Fri, Apr 13, 2012 at 12:18:30PM +0200, Hiroshi Doyu wrote: From: Hiroshi DOYU hd...@nvidia.com Print an attached device name correctly. Signed-off-by: Hiroshi DOYU hd...@nvidia.com --- drivers/iommu/tegra-smmu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

Re: [PATCH 1/3] iommu: tegra/gart: use correct gart_device

2012-04-16 Thread Joerg Roedel
Applied patches 1 and 2. Should I also queue up patch 3 after the objections have been fixed? The patch doesn't touch drivers/iommu... Joerg On Fri, Apr 13, 2012 at 03:08:07PM +0200, Thierry Reding wrote: From: Vandana Salve vsa...@nvidia.com Pass the correct gart device pointer.

[PATCH 1/2] iommu/amd: Check for the right TLP prefix bit

2012-04-19 Thread Joerg Roedel
...@vger.kernel.org # v3.3 Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index a5bee8e..08f3eec 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers

[git pull] irq remapping ops for x86

2012-05-07 Thread Joerg Roedel
://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git intr-remapping-ops-for-ingo Joerg Roedel (8): iommu: Rename intr_remapping files to intel_intr_remapping iommu/vt-d: Make intr-remapping initialization generic iommu/vt-d: Convert missing apic.c intr-remapping call to remap_ops

[git pull] irq remapping ops for x86

2012-05-07 Thread Joerg Roedel
tag at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git intr-remapping-ops-for-ingo Joerg Roedel (8): iommu: Rename intr_remapping files to intel_intr_remapping iommu/vt-d: Make intr-remapping initialization generic iommu/vt-d: Convert missing apic.c intr

Re: [PATCH 1/2] resources: set type of new resource returned by __request_region()

2012-05-21 Thread Joerg Roedel
On Fri, May 18, 2012 at 05:18:32PM -0600, Bjorn Helgaas wrote: Previously we returned a new struct resource with only IORESOURCE_BUSY set (and possibly IORESOURCE_MUXED or IORESOURCE_EXCLUSIVE), but no MEM/IO/etc. bits set. The new resource should inherit the type of its parent. Should it?

Re: [PATCH 2/2] iommu: Request IOMMU CSR space

2012-05-21 Thread Joerg Roedel
. Reviewed-by: Joerg Roedel j...@8bytes.org --- drivers/iommu/dmar.c| 41 - include/linux/intel-iommu.h |2 ++ 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c index 35c1e17..e4ac23a

Re: [PATCH] iommu/core: pass a user-provided token to fault handlers

2012-05-23 Thread Joerg Roedel
On Mon, May 21, 2012 at 08:20:05PM +0300, Ohad Ben-Cohen wrote: Sometimes a single IOMMU user may have to deal with several different IOMMU devices (e.g. remoteproc). When an IOMMU fault happens, such users have to regain their context in order to deal with the fault. Users can't use the

Re: [PATCH 1/2] resources: set type of new resource returned by __request_region()

2012-05-23 Thread Joerg Roedel
On Mon, May 21, 2012 at 07:52:24AM -0600, Bjorn Helgaas wrote: On Mon, May 21, 2012 at 7:04 AM, Joerg Roedel j...@8bytes.org wrote: On Fri, May 18, 2012 at 05:18:32PM -0600, Bjorn Helgaas wrote: Previously we returned a new struct resource with only IORESOURCE_BUSY set (and possibly

Re: warn_slowpath_common in drivers/pci/search.c:44 on linux-3.4.0

2012-05-29 Thread Joerg Roedel
Hi Antonio, On Sat, May 26, 2012 at 09:09:52AM -0600, Bjorn Helgaas wrote: On Sat, May 26, 2012 at 2:25 AM, Antonio Quartulli or...@autistici.org wrote: [    1.054279] WARNING: at drivers/pci/search.c:44 pci_find_upstream_pcie_bridge+0x5e/0x70() [    1.054385] Hardware name: Latitude

Re: [PATCH v2 0/7] IOMMU: Groups support

2012-06-06 Thread Joerg Roedel
On Wed, May 30, 2012 at 02:18:29PM -0600, Alex Williamson wrote: v2: - Trickle down changes from pci_get_dma_source() to better handle PCI device reference counting in IOMMU driver patches Okay, I looked again over the code and looks good for merging to me. The IOMMU Groups code depends on

[git pull] IOMMU fixes for Linux 3.5-rc1

2012-06-06 Thread Joerg Roedel
-standing warning on resume because the amd_iommu_resume function enabled interrupts. The other patch fixes a deadlock in an error-path of the page-fault request handling code of the IOMMU driver. Joerg Roedel (2): iommu/amd: Cache

Re: [PATCH RFC] iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode

2012-06-07 Thread Joerg Roedel
On Wed, Jun 06, 2012 at 10:50:06AM -0600, Shuah Khan wrote: Change AMD iommu driver to call disable iommus in pass-through mode. AMD iommu driver's amd_iommu_init() routine doesn't initialize iommu_shutdown in pass-through mode. As a result iommu disable via a call to disable_iommus() doesn't

Re: [PATCH v3 0/5] PCI: Prep for VFIO and IOMMU Groups

2012-06-12 Thread Joerg Roedel
Hi Bjorn, On Mon, Jun 11, 2012 at 06:59:25PM -0600, Bjorn Helgaas wrote: On Mon, Jun 11, 2012 at 8:26 AM, Alex Williamson alex.william...@redhat.com wrote: v3:  - Small change to device specific ACS check to allow quirk to   support yes/no/pass type functionality. (no change to other  

Re: [PATCH v3 0/5] PCI: Prep for VFIO and IOMMU Groups

2012-06-12 Thread Joerg Roedel
Hi Bjorn, On Tue, Jun 12, 2012 at 09:55:59AM -0600, Bjorn Helgaas wrote: On Tue, Jun 12, 2012 at 12:20 AM, Joerg Roedel j...@8bytes.org wrote: Hi Bjorn, On Mon, Jun 11, 2012 at 06:59:25PM -0600, Bjorn Helgaas wrote: On Mon, Jun 11, 2012 at 8:26 AM, Alex Williamson alex.william

Re: [PATCH v2 0/7] IOMMU: Groups support

2012-06-19 Thread Joerg Roedel
Hi, On Mon, Jun 18, 2012 at 11:31:43AM -0600, Alex Williamson wrote: Anyone? Alexey BenH, I know you're familiar with IOMMU groups, please give Joerg some kind of indication that you approve of this for POWER. David Woodhouse, these patches touch intel-iommu, please ack or comment:

[PATCH] iommu/amd: Initialize dma_ops for hotplug and sriov devices

2012-06-25 Thread Joerg Roedel
in an IO_PAGE_FAULT. Fix this. Reported-by: Stefan Assmann sassm...@redhat.com Cc: sta...@vger.kernel.org Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |9 + 1 file changed, 9 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index

Re: [PATCH v2 0/7] IOMMU: Groups support

2012-06-25 Thread Joerg Roedel
On Wed, May 30, 2012 at 02:18:29PM -0600, Alex Williamson wrote: Alex Williamson (7): iommu: Remove group_mf intel-iommu: Make use of DMA quirks and ACS checks in IOMMU groups amd_iommu: Make use of DMA quirks and ACS checks in IOMMU groups intel-iommu: Support IOMMU

Re: [v3 1/5] iommu: Add DMA window parser, of_get_dma_window()

2012-06-25 Thread Joerg Roedel
On Mon, Jun 25, 2012 at 02:23:54PM +0300, Hiroshi DOYU wrote: This code was based on: arch/microblaze/kernel/prom_parse.c arch/powerpc/kernel/prom_parse.c Can replace of_parse_dma_window() in the above. This supports different formats flexibly. prefix can be configured if any. busno

[PATCH 09/28] iommu/amd: Move unmap_flush message to amd_iommu_init_dma_ops()

2012-07-05 Thread Joerg Roedel
The message belongs there anyway, so move it to that function. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |5 + drivers/iommu/amd_iommu_init.c |8 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/iommu

[PATCH 12/28] iommu/amd: Keep track of HPET and IOAPIC device ids

2012-07-05 Thread Joerg Roedel
The IVRS ACPI table provides information about the IOAPICs and the HPETs available in the system and which PCI device ID they use in transactions. Save that information for later usage in interrupt remapping. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c

[PATCH 01/28] x86/irq: Add data structure to keep AMD specific irq remapping information

2012-07-05 Thread Joerg Roedel
Add a data structure to store information the IOMMU driver can use to get from a 'struct irq_cfg' to the remapping entry. Cc: x...@kernel.org Cc: Yinghai Lu ying...@kernel.org Cc: Suresh Siddha suresh.b.sid...@intel.com Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm

[PATCH 18/28] iommu/amd: Make sure IOMMU is not considered to translate itself

2012-07-05 Thread Joerg Roedel
The IVRS table usually includes the IOMMU device. But the IOMMU does never translate itself, so make sure the IOMMU driver knows this. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu_init.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/iommu

[PATCH 13/28] iommu/amd: Add slab-cache for irq remapping tables

2012-07-05 Thread Joerg Roedel
The irq remapping tables for the AMD IOMMU need to be aligned on a 128 byte boundary. Create a seperate slab-cache to guarantee this alignment. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |2 ++ drivers/iommu/amd_iommu_init.c | 23

[PATCH 02/28] x86/irq: Introduce irq_cfg-remapped

2012-07-05 Thread Joerg Roedel
This flag will show whether the interrupt is remapped in a way that works for VT-d and AMD-Vi. Cc: x...@kernel.org Cc: Yinghai Lu ying...@kernel.org Cc: Suresh Siddha suresh.b.sid...@intel.com Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/hw_irq.h |1 + arch

[PATCH 05/28] iommu/amd: Split out PCI related parts of IOMMU initialization

2012-07-05 Thread Joerg Roedel
-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu_init.c | 224 +-- drivers/iommu/amd_iommu_types.h |5 +- 2 files changed, 121 insertions(+), 108 deletions(-) diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c

[PATCH 11/28] iommu/amd: Convert iommu initialization to state machine

2012-07-05 Thread Joerg Roedel
This step makes it very easy to keep track about the current intialization state of the iommu driver. With this change we can initialize the IOMMU hardware to a point where it can remap interrupts and later resume the initializion to enable dma remapping. Signed-off-by: Joerg Roedel joerg.roe

[PATCH 27/28] iommu/amd: Print message to system log when irq remapping is enabled

2012-07-05 Thread Joerg Roedel
Print an indicator to dmesg to easily find out if interrupt remapping is enabled of a given system. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu_init.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu

[PATCH 04/28] iommu/amd: Use acpi_get_table instead of acpi_table_parse

2012-07-05 Thread Joerg Roedel
This makes it easier to propagate errors while parsing the IVRS table and makes the amd_iommu_init_err hack obsolete. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu_init.c | 118 ++-- 1 file changed, 66 insertions(+), 52

[PATCH 17/28] iommu/amd: Split device table initialization into irq and dma part

2012-07-05 Thread Joerg Roedel
When the IOMMU is enabled very early (as with irq-remapping) some devices are still in BIOS hand. When dma is blocked early this can cause lots of IO_PAGE_FAULTs. So delay the DMA initialization and do it right before the dma_ops are initialized. Signed-off-by: Joerg Roedel joerg.roe...@amd.com

[PATCH 19/28] iommu/amd: Add IRTE invalidation routine

2012-07-05 Thread Joerg Roedel
Add routine to invalidate the IOMMU cache for interupt translations. Also include the IRTE caches when flushing all IOMMU caches. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c | 27 +++ drivers/iommu/amd_iommu_types.h |1 + 2

[PATCH 15/28] iommu/amd: Check if IOAPIC information is correct

2012-07-05 Thread Joerg Roedel
When the IOAPIC information provided in the IVRS table is not correct or not complete the system may not boot at all when interrupt remapping is enabled. So check if this information is correct and print out a firmware bug message when it is not. Signed-off-by: Joerg Roedel joerg.roe...@amd.com

[PATCH 26/28] iommu/irq: Use amd_iommu_irq_ops if supported

2012-07-05 Thread Joerg Roedel
Finally enable interrupt remapping for AMD systems. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/irq_remapping.c |5 + drivers/iommu/irq_remapping.h |1 + 2 files changed, 6 insertions(+) diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu

[PATCH 22/28] iommu/amd: Implement MSI routines for interrupt remapping

2012-07-05 Thread Joerg Roedel
Add routines to setup interrupt remapping for MSI interrupts. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c | 74 + 1 file changed, 74 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c

[PATCH 21/28] iommu/amd: Add IOAPIC remapping routines

2012-07-05 Thread Joerg Roedel
Add the routine to setup interrupt remapping for ioapic interrupts. Also add a routine to change the affinity of an irq and to free an irq allocation for interrupt remapping. The last two functions will also be used for MSI interrupts. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers

[PATCH 20/28] iommu/amd: Add routines to manage irq remapping tables

2012-07-05 Thread Joerg Roedel
Add routines to: * Alloc remapping tables and single entries from these tables * Change entries in the tables * Free entries in the table Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c | 230 + 1 file changed, 230

[PATCH 23/28] iommu/amd: Add call-back routine for HPET MSI

2012-07-05 Thread Joerg Roedel
Add a routine to setup a HPET MSI interrupt for remapping. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index ee10f30..fed1395

[PATCH 28/28] iommu/amd: Report irq remapping through IOMMU-API

2012-07-05 Thread Joerg Roedel
Report the availability of irq remapping through the IOMMU-API to allow KVM device passthrough again without additional module parameter overrides. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

Re: [PATCH 06/28] iommu/amd: Move informational prinks out of iommu_enable

2012-07-06 Thread Joerg Roedel
Hi Joe, On Thu, Jul 05, 2012 at 09:08:38PM -0700, Joe Perches wrote: On Thu, 2012-07-05 at 14:36 +0200, Joerg Roedel wrote: + static const char * const feat_str[] = { + PreF, PPR, X2APIC, NX, GT, [5], + IA, GA, HE, PC, NULL + }; + struct amd_iommu *iommu

Re: [PATCH 03/28] x86/irq: Use irq_remap specific print_IO_APIC paths only on Intel

2012-07-06 Thread Joerg Roedel
On Fri, Jul 06, 2012 at 10:50:36AM +0200, Ingo Molnar wrote: * Joerg Roedel joerg.roe...@amd.com wrote: extern int irq_remapping_enabled; +extern int intel_irq_remap_debug; Instead of yet another set of global flags thrown around the kernel please properly factor out this code, its

Re: [PATCH 17/28] iommu/amd: Split device table initialization into irq and dma part

2012-07-06 Thread Joerg Roedel
On Thu, Jul 05, 2012 at 02:36:37PM +0200, Joerg Roedel wrote: When the IOMMU is enabled very early (as with irq-remapping) some devices are still in BIOS hand. When dma is blocked early this can cause lots of IO_PAGE_FAULTs. So delay the DMA initialization and do it right before the dma_ops

[PATCH 5/7] iommu/msm: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-07-11 Thread Joerg Roedel
Implement the attribute for the MSM IOMMU driver. Acked-by: David Brown dav...@codeaurora.org Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/msm_iommu.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index

[PATCH 3/7] iommu/vt-d: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-07-11 Thread Joerg Roedel
Implement the attribute for the Intel IOMMU driver. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/intel-iommu.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b12af2f..6cb0791 100644 --- a/drivers

[PATCH 2/7] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-07-11 Thread Joerg Roedel
Implement the attribute itself and add the code for the AMD IOMMU driver. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |4 drivers/iommu/iommu.c | 19 --- include/linux/iommu.h |8 3 files changed, 28 insertions

[PATCH 4/7] iommu/omap: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-07-11 Thread Joerg Roedel
Implement the attribute for the OMAP IOMMU driver. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/omap-iommu.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index e70ee2b..d0b1234 100644 --- a/drivers/iommu

[PATCH 6/7] iommu/tegra: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-07-11 Thread Joerg Roedel
From: Hiroshi DOYU hd...@nvidia.com Implement the attribute for the Tegra IOMMU drivers. Signed-off-by: Hiroshi DOYU hd...@nvidia.com Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/tegra-gart.c |5 + drivers/iommu/tegra-smmu.c |5 + 2 files changed, 10

Re: Tegra-DRM: Tegra30: DMA mapping API

2012-07-11 Thread Joerg Roedel
Hi, On Tue, Jul 10, 2012 at 01:26:39PM +0300, Hiroshi Doyu wrote: http://lists.linuxfoundation.org/pipermail/iommu/2012-January/003531.html Do you have any plan to merge the above IOMMU: Make IOMMU-API ready for GART-like hardware? Tegra DRM seems to need that feature eventually. I just

Re: [PATCH 2/7] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute

2012-07-11 Thread Joerg Roedel
Hi Sethi, On Wed, Jul 11, 2012 at 11:47:39AM +, Sethi Varun-B16395 wrote: I am currently working on upstreaming the Freescale IOMMU driver. As discussed (with Scott Wood) a while back, this representation of the GEOMETRY attribute doesn't go well with our IOMMU implementation. Our

[PATCH 01/27] x86/irq: Add data structure to keep AMD specific irq remapping information

2012-07-11 Thread Joerg Roedel
Add a data structure to store information the IOMMU driver can use to get from a 'struct irq_cfg' to the remapping entry. Cc: x...@kernel.org Cc: Yinghai Lu ying...@kernel.org Cc: Suresh Siddha suresh.b.sid...@intel.com Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm

[PATCH 06/27] iommu/amd: Move informational prinks out of iommu_enable

2012-07-11 Thread Joerg Roedel
This function will be called before the PCI subsystem is initialized. Therefore dev_name doen't work and IOMMU information can't be printed to the klog as before. Move the code to print that information to a later point where PCI initializtion has already happened. Signed-off-by: Joerg Roedel

[PATCH 03/27] iommu/amd: Fix sparse warnings

2012-07-11 Thread Joerg Roedel
A few sparse warnings fire in drivers/iommu/amd_iommu_init.c. Fix most of them with this patch. Also fix the sparse warnings in drivers/iommu/irq_remapping.c while at it. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |2 +- drivers/iommu

[PATCH 14/27] iommu/amd: Allocate data structures to keep track of irq remapping tables

2012-07-11 Thread Joerg Roedel
To easily map device ids to interrupt remapping table entries a new lookup table is necessary. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu_init.c | 16 drivers/iommu/amd_iommu_types.h |9 + 2 files changed, 25 insertions(+) diff

[PATCH 09/27] iommu/amd: Move unmap_flush message to amd_iommu_init_dma_ops()

2012-07-11 Thread Joerg Roedel
The message belongs there anyway, so move it to that function. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |5 + drivers/iommu/amd_iommu_init.c |8 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/iommu

[PATCH 04/27] iommu/amd: Use acpi_get_table instead of acpi_table_parse

2012-07-11 Thread Joerg Roedel
This makes it easier to propagate errors while parsing the IVRS table and makes the amd_iommu_init_err hack obsolete. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu_init.c | 118 ++-- 1 file changed, 66 insertions(+), 52

[PATCH 07/27] iommu/amd: Introduce early_amd_iommu_init routine

2012-07-11 Thread Joerg Roedel
Split out the code to parse the ACPI table and setup relevant data structures into a new function. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |1 - drivers/iommu/amd_iommu_init.c | 38 +++--- 2 files changed, 23

[PATCH 02/27] x86/irq: Introduce irq_cfg-remapped

2012-07-11 Thread Joerg Roedel
This flag will show whether the interrupt is remapped in a way that works for VT-d and AMD-Vi. Cc: x...@kernel.org Cc: Yinghai Lu ying...@kernel.org Cc: Suresh Siddha suresh.b.sid...@intel.com Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/hw_irq.h |1 + arch

[PATCH 16/27] iommu/amd: Split device table initialization into irq and dma part

2012-07-11 Thread Joerg Roedel
irq-remapping is enabled in the system. They will be reenabled on demand later. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu_init.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/amd_iommu_init.c b/drivers

[PATCH 15/27] iommu/amd: Check if IOAPIC information is correct

2012-07-11 Thread Joerg Roedel
When the IOAPIC information provided in the IVRS table is not correct or not complete the system may not boot at all when interrupt remapping is enabled. So check if this information is correct and print out a firmware bug message when it is not. Signed-off-by: Joerg Roedel joerg.roe...@amd.com

[PATCH 11/27] iommu/amd: Convert iommu initialization to state machine

2012-07-11 Thread Joerg Roedel
This step makes it very easy to keep track about the current intialization state of the iommu driver. With this change we can initialize the IOMMU hardware to a point where it can remap interrupts and later resume the initializion to enable dma remapping. Signed-off-by: Joerg Roedel joerg.roe

[PATCH 22/27] iommu/amd: Add call-back routine for HPET MSI

2012-07-11 Thread Joerg Roedel
Add a routine to setup a HPET MSI interrupt for remapping. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 9a24a1b..ac6e731

[PATCH 18/27] iommu/amd: Add IRTE invalidation routine

2012-07-11 Thread Joerg Roedel
Add routine to invalidate the IOMMU cache for interupt translations. Also include the IRTE caches when flushing all IOMMU caches. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c | 27 +++ drivers/iommu/amd_iommu_types.h |1 + 2

[PATCH 26/27] iommu/amd: Print message to system log when irq remapping is enabled

2012-07-11 Thread Joerg Roedel
Print an indicator to dmesg to easily find out if interrupt remapping is enabled of a given system. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu_init.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu

[PATCH 21/27] iommu/amd: Implement MSI routines for interrupt remapping

2012-07-11 Thread Joerg Roedel
Add routines to setup interrupt remapping for MSI interrupts. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c | 74 + 1 file changed, 74 insertions(+) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c

[PATCH 20/27] iommu/amd: Add IOAPIC remapping routines

2012-07-11 Thread Joerg Roedel
Add the routine to setup interrupt remapping for ioapic interrupts. Also add a routine to change the affinity of an irq and to free an irq allocation for interrupt remapping. The last two functions will also be used for MSI interrupts. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers

[PATCH 24/27] iommu/amd: Make sure irq remapping still works on dma init failure

2012-07-11 Thread Joerg Roedel
Do not deinitialize the AMD IOMMU driver completly when interrupt remapping is already in use but the initialization of the DMA layer fails for some reason. Make sure the IOMMU can still be used to remap interrupts. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu

[PATCH 17/27] iommu/amd: Make sure IOMMU is not considered to translate itself

2012-07-11 Thread Joerg Roedel
The IVRS table usually includes the IOMMU device. But the IOMMU does never translate itself, so make sure the IOMMU driver knows this. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu_init.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/iommu

[PATCH 19/27] iommu/amd: Add routines to manage irq remapping tables

2012-07-11 Thread Joerg Roedel
Add routines to: * Alloc remapping tables and single entries from these tables * Change entries in the tables * Free entries in the table Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c | 230 + 1 file changed, 230

[PATCH 27/27] iommu/amd: Report irq remapping through IOMMU-API

2012-07-11 Thread Joerg Roedel
Report the availability of irq remapping through the IOMMU-API to allow KVM device passthrough again without additional module parameter overrides. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

[PATCH 13/27] iommu/amd: Add slab-cache for irq remapping tables

2012-07-11 Thread Joerg Roedel
The irq remapping tables for the AMD IOMMU need to be aligned on a 128 byte boundary. Create a seperate slab-cache to guarantee this alignment. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu.c |2 ++ drivers/iommu/amd_iommu_init.c | 23

Re: [PATCH 01/27] x86/irq: Add data structure to keep AMD specific irq remapping information

2012-07-12 Thread Joerg Roedel
17 00:00:00 2001 From: Joerg Roedel joerg.roe...@amd.com Date: Tue, 19 Jun 2012 16:07:45 +0200 Subject: [PATCH 01/27] x86/irq: Add data structure to keep AMD specific irq remapping information Add a data structure to store information the IOMMU driver can use to get from a 'struct irq_cfg

Re: [v3.6 3/3] iommu/tegra: smmu: Fix unsleepable memory allocation at alloc_pdir()

2012-07-17 Thread Joerg Roedel
00:00:00 2001 From: Joerg Roedel joerg.roe...@amd.com Date: Tue, 17 Jul 2012 11:47:14 +0200 Subject: [PATCH] iommu/tegra: Don't call alloc_pdir with as-lock Instead of taking as-lock before calling alloc_pdir() and releasing it in that function to allocate memory, just take the lock only

Re: [PATCH 0/6] OMAP: iommu: hwmod, reset handling and runtime PM

2012-07-17 Thread Joerg Roedel
On Fri, Jun 15, 2012 at 08:55:58PM -0500, Omar Ramirez Luna wrote: Omar Ramirez Luna (6): ARM: OMAP: iommu: fix including iommu.h without IOMMU_API selected ARM: OMAP3: hwmod data: add mmu data for iva and isp ARM: OMAP4: hwmod data: add mmu hwmod for ipu and dsp ARM: OMAP3/4: iommu:

[PATCH 1/2] iommu/amd: Add missing spin_lock initialization

2012-07-19 Thread Joerg Roedel
Add missing spin_lock initialization in amd_iommu_bind_pasid() function and make lockdep happy again. Cc: sta...@vger.kernel.org # = v3.3 Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- drivers/iommu/amd_iommu_v2.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu

[git pull] IOMMU Updates for v3.6-rc1

2012-07-24 Thread Joerg Roedel
uninitialized var warning Joerg Roedel (21): Merge remote-tracking branch 'pci-bjorn/topic/alex-vfio-prep' into groups iommu: Add domain-attribute handlers iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute iommu/vt-d: Implement DOMAIN_ATTR_GEOMETRY attribute iommu/omap

Re: [PATCH 1/2] iommu: Include linux/types.h

2012-08-03 Thread Joerg Roedel
On Wed, Jul 25, 2012 at 04:24:49PM +0200, Thierry Reding wrote: The linux/iommu.h header uses types defined in linux/types.h but doesn't include it. Signed-off-by: Thierry Reding thierry.red...@avionic-design.de Applied to iommu/fixes, thanks Thierry. -- AMD Operating System Research

  1   2   3   4   5   6   7   8   9   10   >