On Thu, 2012-07-12 at 11:33 +0800, Hiroshi Doyu wrote:
> On Thu, 12 Jul 2012 05:04:33 +0200
> markz wrote:
>
> > On Wed, 2012-07-11 at 19:42 +0800, Hiroshi Doyu wrote:
> > > Hi Joerg,
> > >
> > > On Wed, 11 Jul 2012 12:58:27 +0200
> > > Joerg Roedel wrote:
> > >
> > > > Hi,
> > > >
> > > > On
On Thu, 12 Jul 2012 05:04:33 +0200
markz wrote:
> On Wed, 2012-07-11 at 19:42 +0800, Hiroshi Doyu wrote:
> > Hi Joerg,
> >
> > On Wed, 11 Jul 2012 12:58:27 +0200
> > Joerg Roedel wrote:
> >
> > > Hi,
> > >
> > > On Tue, Jul 10, 2012 at 01:26:39PM +0300, Hiroshi Doyu wrote:
> > > > > http://li
On Wed, 2012-07-11 at 19:42 +0800, Hiroshi Doyu wrote:
> Hi Joerg,
>
> On Wed, 11 Jul 2012 12:58:27 +0200
> Joerg Roedel wrote:
>
> > Hi,
> >
> > On Tue, Jul 10, 2012 at 01:26:39PM +0300, Hiroshi Doyu wrote:
> > > > http://lists.linuxfoundation.org/pipermail/iommu/2012-January/003531.html
> > >
On Wed, Jul 11, 2012 at 6:38 AM, Joerg Roedel wrote:
> 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
> Cc: Suresh Siddha
> Signed-off-by: Joerg Roedel
> ---
> arch/x86/inclu
> -Original Message-
> From: Joerg Roedel [mailto:joerg.roe...@amd.com]
> Sent: Wednesday, July 11, 2012 5:47 PM
> To: Sethi Varun-B16395
> Cc: iommu@lists.linux-foundation.org; linux-ker...@vger.kernel.org
> Subject: Re: [PATCH 2/7] iommu/amd: Implement DOMAIN_ATTR_GEOMETRY
> attribute
>
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
---
drivers/iommu/amd_iommu.c |2 ++
drivers/iommu/amd_iommu_init.c | 23 +++
drivers/iommu
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
---
drivers/iommu/amd_iommu.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/amd_iommu.c b/drive
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
---
drivers/iommu/amd_iommu.c | 230 +
1 file changed, 230 insertions(+)
diff --g
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
---
drivers/iommu/amd_iommu_init.c |7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/iommu/amd_iommu_init.c b/dri
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
---
drivers/iommu/amd_iommu_init.c | 40 ++
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
---
drivers/iommu/amd_iommu.c |
Add routines to setup interrupt remapping for MSI
interrupts.
Signed-off-by: Joerg Roedel
---
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
index 713f84c..9a24a1
Print an indicator to dmesg to easily find out if interrupt
remapping is enabled of a given system.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu_init.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 8140fd
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
---
drivers/iommu/amd_iommu.c | 27 +++
drivers/iommu/amd_iommu_types.h |1 +
2 files changed, 28 inse
For interrupt remapping the relevant IOMMU initialization
needs to run earlier at boot when the PCI subsystem is not
yet initialized. To support that this patch splits the parts
of IOMMU initialization which need PCI accesses out of the
initial setup path so that this can be done later.
Signed-off
Add a routine to setup a HPET MSI interrupt for remapping.
Signed-off-by: Joerg Roedel
---
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 100644
--- a/drivers
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
---
drivers/
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
---
drivers/iommu/Kco
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
---
drivers/iommu/amd_iommu.c |3 ++
drivers/iomm
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.
To be secure, block all interrupts by default when i
Split the enable_iommus() routine so that a part of it can
run in early code.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu_init.c | 21 ++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.
Add the six routines required to setup interrupt remapping
with the AMD IOMMU. Also put it all together into the AMD
specific irq_remap_ops.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 18 +
drivers/iommu/amd_iommu_init.c | 42 ++
This function will initialize everthing necessary so that
devices can do DMA. This includes dma_ops and iommu_ops.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu_init.c | 27 ---
1 file changed, 20 insertions(+), 7 deletions(-)
diff --git a/drivers/iommu/amd_i
Split out the code to parse the ACPI table and setup
relevant data structures into a new function.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c |1 -
drivers/iommu/amd_iommu_init.c | 38 +++---
2 files changed, 23 insertions(+), 16 deletion
Finally enable interrupt remapping for AMD systems.
Signed-off-by: Joerg Roedel
---
drivers/iommu/irq_remapping.c |5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
index 9276996..92ce0c7 100644
--- a/drivers/iommu/irq_remapp
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
---
drivers/iommu/amd_iommu_init.c | 118 ++--
1 file changed, 66 insertions(+), 52 deletions(-)
diff --git a/dr
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
Cc: Suresh Siddha
Signed-off-by: Joerg Roedel
---
arch/x86/include/asm/hw_irq.h |1 +
arch/x86/kernel/apic/io_apic.c |2 +-
drivers/iommu/intel_i
The message belongs there anyway, so move it to that
function.
Signed-off-by: Joerg Roedel
---
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/amd_iommu.c b/drivers/iommu/amd
To easily map device ids to interrupt remapping table
entries a new lookup table is necessary.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu_init.c | 16
drivers/iommu/amd_iommu_types.h |9 +
2 files changed, 25 insertions(+)
diff --git a/drivers/iommu/
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
---
drivers/iommu/amd_iommu.c |2 +-
drivers/iommu/amd_iommu_init.c | 16 +--
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
---
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
Cc: Suresh Siddha
Signed-off-by: Joerg Roedel
---
arch/x86/include/asm/hw_irq.h | 14 +-
arch/x86/kernel/apic/io_apic
Hi,
here is the second and revised patch-set to add interrupt remapping
support to the AMD IOMMU driver.
Changes v1->v2:
* Improved print_iommu_info() function as suggested by Joe
Perches
* Fixed all five problems reported by Fengguang Wu from Intel,
thanks ag
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
> repr
> -Original Message-
> From: iommu-boun...@lists.linux-foundation.org [mailto:iommu-
> boun...@lists.linux-foundation.org] On Behalf Of Joerg Roedel
> Sent: Wednesday, July 11, 2012 4:19 PM
> To: iommu@lists.linux-foundation.org
> Cc: linux-ker...@vger.kernel.org
> Subject: [PATCH 2/7] io
Hi Joerg,
On Wed, 11 Jul 2012 12:58:27 +0200
Joerg Roedel wrote:
> 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
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.
Implement the attribute for the Samsung Exynos IOMMU driver.
Signed-off-by: Joerg Roedel
---
drivers/iommu/exynos-iommu.c |4
1 file changed, 4 insertions(+)
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c
index 9a114b9..5c40937 100644
--- a/drivers/iommu/exyno
From: Hiroshi DOYU
Implement the attribute for the Tegra IOMMU drivers.
Signed-off-by: Hiroshi DOYU
Signed-off-by: Joerg Roedel
---
drivers/iommu/tegra-gart.c |5 +
drivers/iommu/tegra-smmu.c |5 +
2 files changed, 10 insertions(+)
diff --git a/drivers/iommu/tegra-gart.c b/dr
Implement the attribute for the OMAP IOMMU driver.
Signed-off-by: Joerg Roedel
---
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/omap-iommu.c
+++ b/dr
Implement the attribute itself and add the code for the
AMD IOMMU driver.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c |4
drivers/iommu/iommu.c | 19 ---
include/linux/iommu.h |8
3 files changed, 28 insertions(+), 3 deletions(-)
dif
Implement the attribute for the Intel IOMMU driver.
Signed-off-by: Joerg Roedel
---
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/iommu/intel-iommu.c
+++
Implement the attribute for the MSM IOMMU driver.
Acked-by: David Brown
Signed-off-by: Joerg Roedel
---
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 cee307e..6a8870a 100644
--- a/drivers/iommu/m
This patch introduces an extension to the iommu-api to get
and set attributes for an iommu_domain. Two functions are
introduced for this:
* iommu_domain_get_attr()
* iommu_domain_set_attr()
These functions will be used to make the iommu-api suitable
for GART-like IOMMUs and to imp
Hi,
here is finally a new version of this patch-set. Changes to the previous
version include:
* Rebased to v3.5-rc6
* Added missing Acked-by's
The potential issue with type-safety still exists. But since people are
desperatly waiting for the functionality of this patch-set I thin
45 matches
Mail list logo