[v9 9/9] iommu, x86: Properly handler PI for IOMMU hotplug

2015-06-04 Thread Feng Wu
Return error when inserting a new IOMMU which doesn't support PI if PI is currently in use. Signed-off-by: Feng Wu --- drivers/iommu/intel_irq_remapping.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c index 554e2

[v9 8/9] iommu, x86: define irq_remapping_cap()

2015-06-04 Thread Feng Wu
This patch adds a new interface irq_remapping_cap() to detect whether irq remapping supports new features, such as VT-d Posted-Interrupts. We export this function out, so that KVM code can check this and use this mechanism properly. Signed-off-by: Feng Wu Reviewed-by: Jiang Liu --- arch/x86/inc

[v9 7/9] iommu, x86: Setup Posted-Interrupts capability for Intel iommu

2015-06-04 Thread Feng Wu
Set Posted-Interrupts capability for Intel iommu when IR is enabled, clear it when IR is disabled. Signed-off-by: Feng Wu --- drivers/iommu/intel_irq_remapping.c | 30 ++ drivers/iommu/irq_remapping.c | 2 ++ drivers/iommu/irq_remapping.h | 3 +++ 3 file

[v9 5/9] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2015-06-04 Thread Feng Wu
We don't need to migrate the irqs for VT-d Posted-Interrupts here. When 'pst' is set in IRTE, the associated irq will be posted to guests instead of interrupt remapping. The destination of the interrupt is set in Posted-Interrupts Descriptor, and the migration happens during vCPU scheduling. Howev

[v9 2/9] iommu: dmar: Extend struct irte for VT-d Posted-Interrupts

2015-06-04 Thread Feng Wu
From: Thomas Gleixner The IRTE (Interrupt Remapping Table Entry) is either an entry for remapped or for posted interrupts. The hardware distiguishes between remapped and posted entries by bit 15 in the low 64 bit of the IRTE. If cleared the entry is remapped, if set it's posted. The entries have

[v9 6/9] iommu, x86: Add cap_pi_support() to detect VT-d PI capability

2015-06-04 Thread Feng Wu
Add helper function to detect VT-d Posted-Interrupts capability. Signed-off-by: Feng Wu Reviewed-by: Jiang Liu Acked-by: David Woodhouse --- include/linux/intel-iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index 0af9b03..

[v9 3/9] iommu, x86: Implement irq_set_vcpu_affinity for intel_ir_chip

2015-06-04 Thread Feng Wu
Implement irq_set_vcpu_affinity for intel_ir_chip. Signed-off-by: Feng Wu Reviewed-by: Jiang Liu Acked-by: David Woodhouse --- arch/x86/include/asm/irq_remapping.h | 5 + drivers/iommu/intel_irq_remapping.c | 43 2 files changed, 48 insertions(+) dif

[v9 4/9] iommu, x86: Save the mode (posted or remapped) of an IRTE

2015-06-04 Thread Feng Wu
This patch adds a new field in struct irq_2_iommu, which can capture whether the entry is in posted mode or remapped mode. Signed-off-by: Feng Wu Suggested-by: Thomas Gleixner --- drivers/iommu/intel_irq_remapping.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/iommu/inte

[v9 1/9] iommu: Add new member capability to struct irq_remap_ops

2015-06-04 Thread Feng Wu
This patch adds a new member capability to struct irq_remap_ops, this new function ops can be used to check whether some features are supported, such as VT-d Posted-Interrupts. Signed-off-by: Feng Wu Reviewed-by: Jiang Liu --- arch/x86/include/asm/irq_remapping.h | 4 drivers/iommu/irq_rem

[v9 0/9] Add VT-d Posted-Interrupts support - IOMMU part

2015-06-04 Thread Feng Wu
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM intervention when guest is running in non-root mode. You can find the VT-d Posted-Interrtups Spec. in

Re: Master-aware devices and sideband ID data

2015-06-04 Thread Chalamarla, Tirumalesh
> On Jun 1, 2015, at 3:22 AM, Mark Rutland wrote: > > On Fri, May 29, 2015 at 06:46:07PM +0100, Chalamarla, Tirumalesh wrote: >> >>> On May 27, 2015, at 10:39 AM, Mark Rutland wrote: >>> >>> On Tue, May 26, 2015 at 11:20:59PM +0100, Chalamarla, Tirumalesh wrote: This is some thing we als

Re: [iommu:x86/vt-d 6/11] drivers/iommu/intel-iommu.c:5079:2-8: preceding lock on line 5061

2015-06-04 Thread Joerg Roedel
On Thu, Jun 04, 2015 at 07:16:18PM +0200, Julia Lawall wrote: > It looks suspicious. Please take a look. Yes, thanks for the report. Dan already sent a patch to fix this, I applied it and then dropped it again and replaced it by a bigger rework of the whole patch-set, as it has a lot of other iss

Re: [iommu:x86/vt-d 6/11] drivers/iommu/intel-iommu.c:5079:2-8: preceding lock on line 5061

2015-06-04 Thread Julia Lawall
It looks suspicious. Please take a look. julia On Fri, 5 Jun 2015, kbuild test robot wrote: > TO: "Li, Zhen-Hua" > CC: Joerg Roedel > CC: Bill Sumner > CC: iommu@lists.linux-foundation.org > > tree: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git x86/vt-d > head: 79400f4610f

Re: [PATCH v2 1/3] drm/exynos: fimd: ensure proper hw state in fimd_clear_channel()

2015-06-04 Thread Inki Dae
On 2015년 06월 04일 22:08, Inki Dae wrote: > Hi Marek, > > On 2015년 06월 03일 17:26, Marek Szyprowski wrote: >> One should not do any assumptions on the stare of the fimd hardware >> during driver initialization, so to properly reset fimd before enabling >> IOMMU, one should ensure that all power domai

Re: [PATCH v2 1/3] drm/exynos: fimd: ensure proper hw state in fimd_clear_channel()

2015-06-04 Thread Inki Dae
Hi Marek, On 2015년 06월 03일 17:26, Marek Szyprowski wrote: > One should not do any assumptions on the stare of the fimd hardware > during driver initialization, so to properly reset fimd before enabling > IOMMU, one should ensure that all power domains and clocks are really > enabled. This patch ad