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

2014-12-18 Thread Zhang, Yang Z
Wu, Feng wrote on 2014-12-19: > > > Zhang, Yang Z wrote on 2014-12-19: >> Subject: RE: [v3 25/26] KVM: Suppress posted-interrupt when 'SN' is >> set >> >> Wu, Feng wrote on 2014-12-19: >>> >>> >>> Zhang, Yang Z wrote on 2014-12-19: Subject: RE: [v3 25/26] KVM: Suppress posted-interrupt wh

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

2014-12-18 Thread Wu, Feng
> -Original Message- > From: Zhang, Yang Z > Sent: Friday, December 19, 2014 1:26 PM > To: Wu, Feng; Paolo Bonzini; kvm@vger.kernel.org > Cc: io...@lists.linux-foundation.org; linux-ker...@vger.kernel.org; > kvm@vger.kernel.org > Subject: RE: [v3 25/26] KVM: Suppress posted-interrupt when

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

2014-12-18 Thread Zhang, Yang Z
Wu, Feng wrote on 2014-12-19: > > > Zhang, Yang Z wrote on 2014-12-19: >> Subject: RE: [v3 25/26] KVM: Suppress posted-interrupt when 'SN' is >> set >> >> Wu, Feng wrote on 2014-12-19: >>> >>> >>> Zhang, Yang Z wrote on 2014-12-19: Subject: RE: [v3 25/26] KVM: Suppress posted-interrupt wh

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

2014-12-18 Thread Wu, Feng
> -Original Message- > From: Zhang, Yang Z > Sent: Friday, December 19, 2014 12:44 PM > To: Wu, Feng; Paolo Bonzini; kvm@vger.kernel.org > Cc: io...@lists.linux-foundation.org; linux-ker...@vger.kernel.org; > kvm@vger.kernel.org > Subject: RE: [v3 25/26] KVM: Suppress posted-interrupt whe

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

2014-12-18 Thread Zhang, Yang Z
Wu, Feng wrote on 2014-12-19: > > > Zhang, Yang Z wrote on 2014-12-19: >> Subject: RE: [v3 25/26] KVM: Suppress posted-interrupt when 'SN' is >> set >> >> Wu, Feng wrote on 2014-12-19: >>> >>> >>> iommu-boun...@lists.linux-foundation.org wrote on >> mailto:iommu-boun...@lists.linux-foundation.

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

2014-12-18 Thread Wu, Feng
> -Original Message- > From: Zhang, Yang Z > Sent: Friday, December 19, 2014 11:33 AM > To: Wu, Feng; Paolo Bonzini; kvm@vger.kernel.org > Cc: io...@lists.linux-foundation.org; linux-ker...@vger.kernel.org; > kvm@vger.kernel.org > Subject: RE: [v3 25/26] KVM: Suppress posted-interrupt whe

Re: [question] Why newer QEMU may lose irq when doing migration?

2014-12-18 Thread Wincy Van
2014-12-17 18:46 GMT+08:00 Paolo Bonzini : > > > On 17/12/2014 04:46, Wincy Van wrote: >> Hi, all: >> >> The patchset (https://lkml.org/lkml/2014/3/18/309) fixed migration of >> Windows guests, but commit 0bc830b05c667218d703f2026ec866c49df974fc >> (KVM: ioapic: clear IRR for edge-triggered interru

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

2014-12-18 Thread Zhang, Yang Z
Wu, Feng wrote on 2014-12-19: > > > iommu-boun...@lists.linux-foundation.org wrote on > mailto:iommu-boun...@lists.linux-foundation.org] On Behalf Of: >> Cc: io...@lists.linux-foundation.org; linux-ker...@vger.kernel.org; >> kvm@vger.kernel.org >> Subject: RE: [v3 25/26] KVM: Suppress posted-int

[Bug 90081] New: Windows Guest does not resized

2014-12-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=90081 Bug ID: 90081 Summary: Windows Guest does not resized Product: Virtualization Version: unspecified Kernel Version: 2.6.32-504.3.3.el6.x86_64 #1 SMP Wed Dec 17 01:55:02 UTC 2014 x8

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

2014-12-18 Thread Wu, Feng
> -Original Message- > From: iommu-boun...@lists.linux-foundation.org > [mailto:iommu-boun...@lists.linux-foundation.org] On Behalf Of Zhang, Yang Z > Sent: Thursday, December 18, 2014 11:10 PM > To: Paolo Bonzini; kvm@vger.kernel.org > Cc: io...@lists.linux-foundation.org; linux-ker...@v

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

2014-12-18 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 4:37 PM > To: linux-ker...@vger.kernel.org > Cc: io...@lists.linux-foundation.org; kvm@vger.kernel.org; > linux-ker.

Re: [PATCH] kvm: x86: remove vmx_vm_has_apicv() outside of hwapic_isr_update()

2014-12-18 Thread Chen, Tiejun
On 2014/12/1 19:43, Paolo Bonzini wrote: On 01/12/2014 10:28, Tiejun Chen wrote: In most cases calling hwapic_isr_update(), actually we always check if kvm_apic_vid_enabled() == 1, and also actually, kvm_apic_vid_enabled() -> kvm_x86_ops->vm_has_apicv() -> vmx_vm_has_apicv() or '

RE: [v3 16/26] KVM: Make struct kvm_irq_routing_table accessible

2014-12-18 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 12:18 AM > To: linux-ker...@vger.kernel.org > Cc: io...@lists.linux-foundation.org; kvm@vger.kernel.org; > linux-ker

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

2014-12-18 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 4:32 PM > To: linux-ker...@vger.kernel.org > Cc: io...@lists.linux-foundation.org; kvm@vger.kernel.org; > linux-ker.

RE: [v3 13/26] KVM: Define a new interface kvm_find_dest_vcpu() for VT-d PI

2014-12-18 Thread Zhang, Yang Z
Wu, Feng wrote on 2014-12-19: > > > Paolo Bonzini wrote on 2014-12-19: >> jiang@linux.intel.com >> Cc: eric.au...@linaro.org; linux-ker...@vger.kernel.org; >> io...@lists.linux-foundation.org; kvm@vger.kernel.org >> Subject: Re: [v3 13/26] KVM: Define a new interface >> kvm_find_dest_vcpu() f

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; >> io...@lists.linux-foundation.org; kvm@vger.kernel.org; Wu, Feng >> Subject: RE: [v3 06/26] iommu, x86: No need to migrating irq for >>

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

2014-12-18 Thread Wu, Feng
> -Original Message- > From: Zhang, Yang Z > Sent: Thursday, December 18, 2014 10:26 PM > To: Wu, Feng; t...@linutronix.de; mi...@redhat.com; h...@zytor.com; > x...@kernel.org; g...@kernel.org; pbonz...@redhat.com; > dw...@infradead.org; j...@8bytes.org; alex.william...@redhat.com; > jian

RE: [v3 13/26] KVM: Define a new interface kvm_find_dest_vcpu() for VT-d PI

2014-12-18 Thread Wu, Feng
> -Original Message- > From: Zhang, Yang Z > Sent: Friday, December 19, 2014 9:14 AM > To: Paolo Bonzini; Wu, Feng; t...@linutronix.de; mi...@redhat.com; > h...@zytor.com; x...@kernel.org; g...@kernel.org; dw...@infradead.org; > j...@8bytes.org; alex.william...@redhat.com; jiang@linux

RE: [v3 13/26] KVM: Define a new interface kvm_find_dest_vcpu() for VT-d PI

2014-12-18 Thread Wu, Feng
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Friday, December 19, 2014 12:58 AM > To: Zhang, Yang Z; Wu, Feng; t...@linutronix.de; mi...@redhat.com; > h...@zytor.com; x...@kernel.org; g...@kernel.org; dw...@infradead.org; > j...@8bytes.org; alex.william.

RE: [v3 13/26] KVM: Define a new interface kvm_find_dest_vcpu() for VT-d PI

2014-12-18 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2014-12-19: > > > On 18/12/2014 15:49, Zhang, Yang Z wrote: Here, we introduce a similar way with 'apic_arb_prio' to handle guest lowest priority interrtups when VT-d PI is used. Here is the ideas: - Each vCPU has a counter 'round_robin_counter'. - When

RE: [v3 21/26] x86, irq: Define a global vector for VT-d Posted-Interrupts

2014-12-18 Thread Wu, Feng
> -Original Message- > From: Zhang, Yang Z > Sent: Thursday, December 18, 2014 10:55 PM > To: Wu, Feng; t...@linutronix.de; mi...@redhat.com; h...@zytor.com; > x...@kernel.org; g...@kernel.org; pbonz...@redhat.com; > dw...@infradead.org; j...@8bytes.org; alex.william...@redhat.com; > jian

Re: [v3 13/26] KVM: Define a new interface kvm_find_dest_vcpu() for VT-d PI

2014-12-18 Thread Paolo Bonzini
On 18/12/2014 15:49, Zhang, Yang Z wrote: >>> Here, we introduce a similar way with 'apic_arb_prio' to handle >>> guest lowest priority interrtups when VT-d PI is used. Here is >>> the ideas: - Each vCPU has a counter 'round_robin_counter'. - >>> When guests sets an interrupts to lowest priority,

RE: [v3 12/26] KVM: Initialize VT-d Posted-Interrupts Descriptor

2014-12-18 Thread Zhang, Yang Z
Feng Wu wrote on 2014-12-12: > This patch initializes the VT-d Posted-Interrupts Descriptor. > > Signed-off-by: Feng Wu > --- > arch/x86/kvm/vmx.c | 27 +++ > 1 file changed, 27 insertions(+) > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index > 0b1383e..66ca275

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

2014-12-18 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2014-12-18: > > > On 18/12/2014 04:14, Wu, Feng wrote: >> >> >> linux-kernel-ow...@vger.kernel.org wrote on >> mailto:linux-kernel-ow...@vger.kernel.org] On Behalf Of Paolo: >>> x...@kernel.org; Gleb Natapov; Paolo Bonzini; dw...@infradead.org; >>> joro-zlv9swrftaidnm+yr

RE: [v3 21/26] x86, irq: Define a global vector for VT-d Posted-Interrupts

2014-12-18 Thread Zhang, Yang Z
Feng Wu wrote on 2014-12-12: > Currently, we use a global vector as the Posted-Interrupts > Notification Event for all the vCPUs in the system. We need to > introduce another global vector for VT-d Posted-Interrtups, which will > be used to wakeup the sleep vCPU when an external interrupt from a >

RE: [v3 13/26] KVM: Define a new interface kvm_find_dest_vcpu() for VT-d PI

2014-12-18 Thread Zhang, Yang Z
Feng Wu wrote on 2014-12-12: > This patch defines a new interface kvm_find_dest_vcpu for > VT-d PI, which can returns the destination vCPU of the > interrupt for guests. > > Since VT-d PI cannot handle broadcast/multicast interrupt, > Here we only handle Fixed and Lowest priority interrupts. > >

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

Re: [patch 2/3] KVM: x86: add option to advance tscdeadline hrtimer expiration

2014-12-18 Thread Marcelo Tosatti
On Wed, Dec 17, 2014 at 08:36:27PM +0100, Radim Krcmar wrote: > 2014-12-17 15:41-0200, Marcelo Tosatti: > > On Wed, Dec 17, 2014 at 03:58:13PM +0100, Radim Krcmar wrote: > > > 2014-12-16 09:08-0500, Marcelo Tosatti: > > > > + tsc_deadline = apic->lapic_timer.expired_tscdeadline; > > > > +

[PULL] vhost: cleanups and fixes

2014-12-18 Thread Michael S. Tsirkin
The following changes since commit f01a2a811ae04124fc9382925038fcbbd2f0b7c8: virtio_ccw: finalize_features error handling (2014-12-09 21:42:06 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes u

Re: [PULL 00/18] ppc patch queue 2014-12-18

2014-12-18 Thread Paolo Bonzini
On 18/12/2014 01:46, Alexander Graf wrote: > Hi Paolo, > > This is my current patch queue for ppc. Please pull. > > After the merge with Linus' tree, e500v2 compilation will be broken because > commit 69111bac42f5 broke it upstream. Could you please take care to apply the > fix I CC'ed you on

Re: [PATCH] KVM: add KVM_CAP_VMX_APICV to advertise hardware apic-v support

2014-12-18 Thread Paolo Bonzini
On 18/12/2014 09:57, Stefan Fritsch wrote: > I think setting the "recommended" bits to be best for the host where the > VM is first started should always be ok. When it migrates to a different > host, performance may not be optimal but otherwise it will work just fine. > After all, non-optimal

[GIT PULL] KVM changes for 3.19

2014-12-18 Thread Paolo Bonzini
Linus, The following changes since commit 0df1f2487d2f0d04703f142813d53615d62a1da4: Linux 3.18-rc3 (2014-11-02 15:01:51 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus for you to fetch changes up to 2c4aa55a6af070262cca425745e8e54

[PATCH] KVM: PPC: E500: Compile fix in this_cpu_write

2014-12-18 Thread Paolo Bonzini
From: Alexander Graf Commit 69111bac42f5 (powerpc: Replace __get_cpu_var uses) introduced compile breakage to the e500 target by introducing invalid automatically created C syntax. Fix up the breakage and make the code compile again. Signed-off-by: Alexander Graf Signed-off-by: Paolo Bonzini

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

2014-12-18 Thread Paolo Bonzini
On 18/12/2014 04:14, Wu, Feng wrote: > > >> -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

Re: [PATCH] KVM: add KVM_CAP_VMX_APICV to advertise hardware apic-v support

2014-12-18 Thread Stefan Fritsch
On Thu, 18 Dec 2014, Paolo Bonzini wrote: > On 18/12/2014 04:37, zhanghailiang wrote: > >> set this bit. But the HV_X64_APIC_ACCESS_RECOMMENDED bit should > >> probably not be set if the host supports apic-v. I havn't done any > > > > That is what this patch want to do ;) > > This would cause a g

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

2014-12-18 Thread Paolo Bonzini
On 18/12/2014 04:16, Wu, Feng wrote: >>> 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)? > > I think the SN bit should be clear here, Adding it here is just to make sure > SN is clear when vCPU is bl

Re: [v2 PATCH] KVM: nVMX: consult PFEC_MASK and PFEC_MATCH when generating #PF VM-exit

2014-12-18 Thread Paolo Bonzini
On 16/12/2014 20:35, Eugene Korenevsky wrote: > When generating #PF VM-exit, check equality: > (PFEC & PFEC_MASK) == PFEC_MATCH > If there is equality, the 14 bit of exception bitmap is used to take decision > about generating #PF VM-exit. If there is inequality, inverted 14 bit is used. > > Sig

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

2014-12-18 Thread Paolo Bonzini
On 18/12/2014 04:15, Wu, Feng wrote: > Thanks for your comments, Paolo! > > If we use u64 new_control, we cannot use new.sn any more. > Maybe we can change the struct pi_desc {} like this: > > typedef struct pid_control{ > u64 on : 1, > sn : 1, > rsvd_1 :

Re: [PATCH] KVM: add KVM_CAP_VMX_APICV to advertise hardware apic-v support

2014-12-18 Thread Paolo Bonzini
On 18/12/2014 04:37, zhanghailiang wrote: >> set this bit. But the HV_X64_APIC_ACCESS_RECOMMENDED bit should >> probably not be set if the host supports apic-v. I havn't done any > > That is what this patch want to do ;) This would cause a guest ABI change upon migration from APICv to non-APICv