Re: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2015-01-28 Thread David Woodhouse
On Fri, 2014-12-12 at 23:14 +0800, Feng Wu wrote: > 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

Re: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-23 Thread Jiang Liu
On 2014/12/24 10:32, Zhang, Yang Z wrote: > Jiang Liu wrote on 2014-12-24: >> On 2014/12/24 9:38, Zhang, Yang Z wrote: >>> Paolo Bonzini wrote on 2014-12-23: On 23/12/2014 10:07, Wu, Feng wrote: >> On 23/12/2014 01:37, Zhang, Yang Z wrote: >>> I don't quite understand it. If

RE: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-23 Thread Zhang, Yang Z
Wu, Feng wrote on 2014-12-24: > > > Zhang, Yang Z wrote on 2014-12-24: >> Cc: iommu@lists.linux-foundation.org; linux-ker...@vger.kernel.org; >> KVM list; Eric Auger >> Subject: RE: [v3 06/26] iommu, x86: No need to migrating irq for >> VT-d Posted-Interrupts >

RE: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-23 Thread Wu, Feng
iamson > Cc: iommu@lists.linux-foundation.org; linux-ker...@vger.kernel.org; KVM list; > Eric Auger > Subject: RE: [v3 06/26] iommu, x86: No need to migrating irq for VT-d > Posted-Interrupts > > Jiang Liu wrote on 2014-12-24: > > On 2014/12/24 9:38, Zhang, Yang Z wro

RE: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-23 Thread Zhang, Yang Z
Jiang Liu wrote on 2014-12-24: > On 2014/12/24 9:38, Zhang, Yang Z wrote: >> Paolo Bonzini wrote on 2014-12-23: >>> >>> >>> On 23/12/2014 10:07, Wu, Feng wrote: > On 23/12/2014 01:37, Zhang, Yang Z wrote: >> I don't quite understand it. If user set an interrupt's affinity >> to a CPU,

Re: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-23 Thread Jiang Liu
On 2014/12/24 9:38, Zhang, Yang Z wrote: > Paolo Bonzini wrote on 2014-12-23: >> >> >> On 23/12/2014 10:07, Wu, Feng wrote: On 23/12/2014 01:37, Zhang, Yang Z wrote: > I don't quite understand it. If user set an interrupt's affinity > to a CPU, but he still see the interrupt delivers t

RE: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-23 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2014-12-23: > > > On 23/12/2014 10:07, Wu, Feng wrote: >>> On 23/12/2014 01:37, Zhang, Yang Z wrote: I don't quite understand it. If user set an interrupt's affinity to a CPU, but he still see the interrupt delivers to other CPUs in host. Do you think it is a

Re: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-23 Thread Paolo Bonzini
On 23/12/2014 10:07, Wu, Feng wrote: >> On 23/12/2014 01:37, Zhang, Yang Z wrote: >>> I don't quite understand it. If user set an interrupt's affinity to a >>> CPU, but he still see the interrupt delivers to other CPUs in host. >>> Do you think it is a right behavior? >> >> No, the interrupt is n

RE: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-23 Thread Wu, Feng
; Gleb Natapov; dw...@infradead.org; > j...@8bytes.org; Alex Williamson; Jiang Liu > Cc: iommu@lists.linux-foundation.org; linux-ker...@vger.kernel.org; KVM list; > Eric Auger > Subject: Re: [v3 06/26] iommu, x86: No need to migrating irq for VT-d > Posted-Interrupts > > > > On

Re: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-23 Thread Paolo Bonzini
On 23/12/2014 01:37, Zhang, Yang Z wrote: > I don't quite understand it. If user set an interrupt's affinity to a > CPU, but he still see the interrupt delivers to other CPUs in host. > Do you think it is a right behavior? No, the interrupt is not delivered at all in the host. Normally you'd ha

RE: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-22 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2014-12-19: > > > On 19/12/2014 02:46, Zhang, Yang Z wrote: >>> If the IRQ is posted, its affinity is controlled by guest (irq >>> <---> vCPU <> pCPU), it has no effect when host changes its affinity. >> >> That's the problem: User is able to changes it in host but it

Re: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-19 Thread Paolo Bonzini
On 19/12/2014 02:46, Zhang, Yang Z wrote: >> If the IRQ is posted, its affinity is controlled by guest (irq <---> >> vCPU <> pCPU), it has no effect when host changes its affinity. > > That's the problem: User is able to changes it in host but it never > takes effect since it is actually con

RE: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-18 Thread Zhang, Yang Z
Wu, Feng wrote on 2014-12-19: > > > Zhang, Yang Z wrote on 2014-12-18: >> jiang@linux.intel.com >> Cc: eric.au...@linaro.org; linux-ker...@vger.kernel.org; >> iommu@lists.linux-foundation.org; k...@vger.kernel.org; Wu, Feng >> Subject: RE: [v3 06/26] iommu,

RE: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-18 Thread Wu, Feng
liam...@redhat.com; > jiang@linux.intel.com > Cc: eric.au...@linaro.org; linux-ker...@vger.kernel.org; > iommu@lists.linux-foundation.org; k...@vger.kernel.org; Wu, Feng > Subject: RE: [v3 06/26] iommu, x86: No need to migrating irq for VT-d > Posted-Interrupts > > Feng Wu wr

RE: [v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-18 Thread Zhang, Yang Z
Feng Wu wrote on 2014-12-12: > 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 h

[v3 06/26] iommu, x86: No need to migrating irq for VT-d Posted-Interrupts

2014-12-12 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