Re: [PATCH v5 6/6] KVM: nVMX: Enable nested posted interrupt processing

2015-02-03 Thread Wincy Van
On Tue, Feb 3, 2015 at 10:02 PM, Paolo Bonzini wrote: > > > On 03/02/2015 10:17, Wincy Van wrote: >> +static int vmx_accomp_nested_posted_interrupt(struct kvm_vcpu *vcpu) > > Replace accomp with complete. Will do. > >> +{ >> + struct vcpu_vmx *vmx = to_vmx(vcpu); >> + int max_irr; >>

Re: [PATCH v5 6/6] KVM: nVMX: Enable nested posted interrupt processing

2015-02-03 Thread Paolo Bonzini
On 03/02/2015 10:17, Wincy Van wrote: > +static int vmx_accomp_nested_posted_interrupt(struct kvm_vcpu *vcpu) Replace accomp with complete. > +{ > + struct vcpu_vmx *vmx = to_vmx(vcpu); > + int max_irr; > + void *vapic_page; > + u16 status; > + > + if (vmx->nested.

[PATCH v5 6/6] KVM: nVMX: Enable nested posted interrupt processing

2015-02-03 Thread Wincy Van
If vcpu has a interrupt in vmx non-root mode, we will kick that vcpu to inject interrupt timely. With posted interrupt processing, the kick intr is not needed, and interrupts are fully taken care of by hardware. In nested vmx, this feature avoids much more vmexits than non-nested vmx. This patch