RE: [v3 24/26] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked

2014-12-17 Thread Wu, Feng
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > Behalf Of Paolo Bonzini > Sent: Thursday, December 18, 2014 1:10 AM > To: Wu, Feng; Thomas Gleixner; Ingo Molnar; H. Peter Anvin; x...@kernel.org; > Gleb Natapov; Paolo Bonzini; dw...@infradead.

RE: [v3 23/26] KVM: Update Posted-Interrupts Descriptor when vCPU is preempted

2014-12-17 Thread Wu, Feng
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Thursday, December 18, 2014 1:11 AM > To: Wu, Feng; Thomas Gleixner; Ingo Molnar; H. Peter Anvin; x...@kernel.org; > Gleb Natapov; Paolo Bonzini; dw...@infradead.org; j...@8byt

RE: [v3 25/26] KVM: Suppress posted-interrupt when 'SN' is set

2014-12-17 Thread Wu, Feng
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org > [mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Paolo Bonzini > Sent: Thursday, December 18, 2014 1:43 AM > To: Wu, Feng; Thomas Gleixner; Ingo Molnar; H. Peter Anvin; x...@kernel.org; > Gleb Natapov; Paolo Bonzini

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-17 Thread Rafael J. Wysocki
On Wednesday, December 17, 2014 02:15:31 AM Laurent Pinchart wrote: > Hi Tomasz, > > On Tuesday 16 December 2014 11:18:33 Tomasz Figa wrote: > > On Tue, Dec 16, 2014 at 4:53 AM, Laurent Pinchart wrote: > > > On Monday 15 December 2014 11:39:01 Tomasz Figa wrote: > > >> On Sat, Dec 13, 2014 at 5:47

Re: [Linaro-mm-sig] [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall

2014-12-17 Thread Laurent Pinchart
Hi Arnd, On Wednesday 17 December 2014 22:58:47 Arnd Bergmann wrote: > On Wednesday 17 December 2014 18:02:51 Laurent Pinchart wrote: > > On Wednesday 17 December 2014 16:41:33 Arnd Bergmann wrote: > >> On Wednesday 17 December 2014 16:39:02 Laurent Pinchart wrote: > >>> On Wednesday 17 December 2

Re: [Linaro-mm-sig] [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall

2014-12-17 Thread Arnd Bergmann
On Wednesday 17 December 2014 18:02:51 Laurent Pinchart wrote: > On Wednesday 17 December 2014 16:41:33 Arnd Bergmann wrote: > > On Wednesday 17 December 2014 16:39:02 Laurent Pinchart wrote: > > > On Wednesday 17 December 2014 15:27:36 Arnd Bergmann wrote: > > > > On Wednesday 17 December 2014 01:

Re: [PATCH 2/2] iommu/vt-d: Remove dead code in device_notifier

2014-12-17 Thread Jerry Hoemann
On Wed, Dec 17, 2014 at 11:43:37AM +0100, Joerg Roedel wrote: > From: Joerg Roedel > > This code only runs when action == BUS_NOTIFY_REMOVED_DEVICE, > so it can't be BUS_NOTIFY_DEL_DEVICE. > > Signed-off-by: Joerg Roedel > --- > drivers/iommu/intel-iommu.c | 8 > 1 file changed, 8 del

Re: [PATCH 1/2] iommu/vt-d: Fix dmar_domain leak in iommu_attach_device

2014-12-17 Thread Jerry Hoemann
On Wed, Dec 17, 2014 at 11:43:36AM +0100, Joerg Roedel wrote: > From: Joerg Roedel > > Since commit 1196c2f a domain is only destroyed in the > notifier path if it is hot-unplugged. This caused a > domain leakage in iommu_attach_device when a driver was > unbound from the device and bound to VFIO

Re: [PATCH v6 6/8] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-12-17 Thread Arnd Bergmann
On Wednesday 17 December 2014 17:17:52 Will Deacon wrote: > > > > I would hope that PCI is the only case we need to worry about for a > > > > while. > > > > This means we just need to come up with another property or a set of > > > > properties > > > > that we can put into a PCI host controller d

Re: [v3 25/26] KVM: Suppress posted-interrupt when 'SN' is set

2014-12-17 Thread Paolo Bonzini
On 12/12/2014 16:14, Feng Wu wrote: > Currently, we don't support urgent interrupt, all interrupts > are recognized as non-urgent interrupt, so we cannot send > posted-interrupt when 'SN' is set. Can this happen? If the vcpu is in guest mode, it cannot have been scheduled out, and that's the on

Re: [v3 17/26] KVM: make kvm_set_msi_irq() public

2014-12-17 Thread Paolo Bonzini
On 12/12/2014 16:14, Feng Wu wrote: > Make kvm_set_msi_irq() public, we can use this function outside. > > Signed-off-by: Feng Wu > --- > include/linux/kvm_host.h | 2 ++ > virt/kvm/irq_comm.c | 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/include/linux/kvm_ho

Re: [PATCH v6 6/8] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-12-17 Thread Will Deacon
On Wed, Dec 17, 2014 at 03:38:22PM +, Arnd Bergmann wrote: > On Wednesday 17 December 2014 15:01:58 Will Deacon wrote: > > On Wed, Dec 17, 2014 at 02:27:30PM +, Robin Murphy wrote: > > > I thoroughly dislike the idea, but one /could/ simply abuse the generic > > > bindings well within the

Re: [PATCH v6 6/8] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-12-17 Thread Will Deacon
On Wed, Dec 17, 2014 at 03:35:29PM +, Arnd Bergmann wrote: > On Wednesday 17 December 2014 14:45:18 Will Deacon wrote: > > On Wed, Dec 17, 2014 at 02:15:12PM +, Arnd Bergmann wrote: > > > On Wednesday 17 December 2014 12:09:49 Will Deacon wrote: > > The icky part is that an ARM SMMU can hav

Re: [v3 23/26] KVM: Update Posted-Interrupts Descriptor when vCPU is preempted

2014-12-17 Thread Paolo Bonzini
On 12/12/2014 16:14, Feng Wu wrote: > + if (irq_remapping_cap(IRQ_POSTING_CAP)) { > + struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); > + struct pi_desc old, new; > + unsigned int dest; > + > + memset(&old, 0, sizeof(old)); > + mems

Re: [v3 24/26] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked

2014-12-17 Thread Paolo Bonzini
On 12/12/2014 16:14, Feng Wu wrote: > This patch updates the Posted-Interrupts Descriptor when vCPU > is blocked. > > pre-block: > - Add the vCPU to the blocked per-CPU list > - Clear 'SN' Should SN be already clear (and NV set to POSTED_INTR_VECTOR)? Can it happen that you go from sched-out t

Re: [Linaro-mm-sig] [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall

2014-12-17 Thread Laurent Pinchart
Hi Arnd, On Wednesday 17 December 2014 16:41:33 Arnd Bergmann wrote: > On Wednesday 17 December 2014 16:39:02 Laurent Pinchart wrote: > > On Wednesday 17 December 2014 15:27:36 Arnd Bergmann wrote: > > > On Wednesday 17 December 2014 01:24:42 Laurent Pinchart wrote: > > > > If we forbid the IOMMU

Re: [Linaro-mm-sig] [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall

2014-12-17 Thread Arnd Bergmann
On Wednesday 17 December 2014 15:53:25 Lucas Stach wrote: > Am Mittwoch, den 17.12.2014, 15:27 +0100 schrieb Arnd Bergmann: > > On Wednesday 17 December 2014 01:24:42 Laurent Pinchart wrote: > > > > > > If we forbid the IOMMU driver from being compiled as a module can't we > > > just > > > rely

Re: [Linaro-mm-sig] [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall

2014-12-17 Thread Arnd Bergmann
On Wednesday 17 December 2014 16:39:02 Laurent Pinchart wrote: > > On Wednesday 17 December 2014 15:27:36 Arnd Bergmann wrote: > > On Wednesday 17 December 2014 01:24:42 Laurent Pinchart wrote: > > > If we forbid the IOMMU driver from being compiled as a module can't we > > > just rely on deferred

Re: [PATCH v6 6/8] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-12-17 Thread Arnd Bergmann
On Wednesday 17 December 2014 15:01:58 Will Deacon wrote: > On Wed, Dec 17, 2014 at 02:27:30PM +, Robin Murphy wrote: > > On 17/12/14 12:09, Will Deacon wrote: > > > I think that's a slightly different case. The `grouping' in the DT, is on > > > a > > > per-master basis where a master may have

Re: [PATCH v6 6/8] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-12-17 Thread Arnd Bergmann
On Wednesday 17 December 2014 14:45:18 Will Deacon wrote: > On Wed, Dec 17, 2014 at 02:15:12PM +, Arnd Bergmann wrote: > > On Wednesday 17 December 2014 12:09:49 Will Deacon wrote: > > > On Tue, Dec 16, 2014 at 12:08:15PM +, Arnd Bergmann wrote: > > > > On Monday 15 December 2014 18:09:33 W

Re: [Linaro-mm-sig] [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall

2014-12-17 Thread Lucas Stach
Am Mittwoch, den 17.12.2014, 15:27 +0100 schrieb Arnd Bergmann: > On Wednesday 17 December 2014 01:24:42 Laurent Pinchart wrote: > > > > If we forbid the IOMMU driver from being compiled as a module can't we just > > rely on deferred probing ? The bus master driver will just be reprobed > > afte

Re: [PATCH v6 6/8] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-12-17 Thread Will Deacon
On Wed, Dec 17, 2014 at 02:27:30PM +, Robin Murphy wrote: > On 17/12/14 12:09, Will Deacon wrote: > > On Tue, Dec 16, 2014 at 12:08:15PM +, Arnd Bergmann wrote: > >> On Monday 15 December 2014 18:09:33 Will Deacon wrote: > Using a single domain is a bit of a waste of resources in my ca

Re: [PATCH v6 6/8] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-12-17 Thread Will Deacon
On Wed, Dec 17, 2014 at 02:15:12PM +, Arnd Bergmann wrote: > On Wednesday 17 December 2014 12:09:49 Will Deacon wrote: > > On Tue, Dec 16, 2014 at 12:08:15PM +, Arnd Bergmann wrote: > > > On Monday 15 December 2014 18:09:33 Will Deacon wrote: > > > > > Using a single domain is a bit of a wa

Re: [Linaro-mm-sig] [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall

2014-12-17 Thread Laurent Pinchart
Hi Arnd, On Wednesday 17 December 2014 15:27:36 Arnd Bergmann wrote: > On Wednesday 17 December 2014 01:24:42 Laurent Pinchart wrote: > > If we forbid the IOMMU driver from being compiled as a module can't we > > just rely on deferred probing ? The bus master driver will just be > > reprobed after

Re: [Linaro-mm-sig] [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall

2014-12-17 Thread Arnd Bergmann
On Wednesday 17 December 2014 01:24:42 Laurent Pinchart wrote: > > If we forbid the IOMMU driver from being compiled as a module can't we just > rely on deferred probing ? The bus master driver will just be reprobed after > the IOMMU gets probed, like for other devices. > > This could fail in c

Re: [PATCH v6 6/8] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-12-17 Thread Robin Murphy
Hi Will, On 17/12/14 12:09, Will Deacon wrote: On Tue, Dec 16, 2014 at 12:08:15PM +, Arnd Bergmann wrote: On Monday 15 December 2014 18:09:33 Will Deacon wrote: Using a single domain is a bit of a waste of resources in my case, so an evolution would be to create four domains and assign dev

Re: [PATCH v6 6/8] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-12-17 Thread Arnd Bergmann
On Wednesday 17 December 2014 12:09:49 Will Deacon wrote: > On Tue, Dec 16, 2014 at 12:08:15PM +, Arnd Bergmann wrote: > > On Monday 15 December 2014 18:09:33 Will Deacon wrote: > > > > Using a single domain is a bit of a waste of resources in my case, so > > > > an > > > > evolution would be

Re: [PATCH v6 6/8] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-12-17 Thread Will Deacon
On Tue, Dec 16, 2014 at 12:08:15PM +, Arnd Bergmann wrote: > On Monday 15 December 2014 18:09:33 Will Deacon wrote: > > > Using a single domain is a bit of a waste of resources in my case, so an > > > evolution would be to create four domains and assign devices to them > > > based on > > > a

Re: [PATCH v6 6/8] dma-mapping: detect and configure IOMMU in of_dma_configure

2014-12-17 Thread Will Deacon
On Wed, Dec 17, 2014 at 12:19:45AM +, Laurent Pinchart wrote: > On Monday 15 December 2014 11:32:52 Will Deacon wrote: > > On Sun, Dec 14, 2014 at 03:51:13PM +, Laurent Pinchart wrote: > > > On Monday 01 December 2014 16:57:12 Will Deacon wrote: > > > > + of_dma_configure(&dev->dev);

[PATCH 1/2] iommu/vt-d: Fix dmar_domain leak in iommu_attach_device

2014-12-17 Thread Joerg Roedel
From: Joerg Roedel Since commit 1196c2f a domain is only destroyed in the notifier path if it is hot-unplugged. This caused a domain leakage in iommu_attach_device when a driver was unbound from the device and bound to VFIO. In this case the device is attached to a new domain and unlinked from th

[PATCH 2/2] iommu/vt-d: Remove dead code in device_notifier

2014-12-17 Thread Joerg Roedel
From: Joerg Roedel This code only runs when action == BUS_NOTIFY_REMOVED_DEVICE, so it can't be BUS_NOTIFY_DEL_DEVICE. Signed-off-by: Joerg Roedel --- drivers/iommu/intel-iommu.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.