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

2015-01-28 Thread Paolo Bonzini
On 28/01/2015 06:54, Wincy Van wrote: > Why? L1 may config these features seperately, we should check them one by one. > e.g. L1 may enable posted interrupt processing and virtual interrupt > delivery, but leaving virtualize x2apic mode disabled, then > nested_cpu_has_virt_x2apic_mode will return

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

2015-01-27 Thread Wincy Van
On Wed, Jan 28, 2015 at 5:55 AM, Paolo Bonzini wrote: > > > On 24/01/2015 11:24, Wincy Van wrote: >> if (!nested_cpu_has_virt_x2apic_mode(vmcs12) && >> !nested_cpu_has_apic_reg_virt(vmcs12) && >> - !nested_cpu_has_vid(vmcs12)) >> + !nested_cpu_has_vid(vmcs12

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

2015-01-27 Thread Paolo Bonzini
On 24/01/2015 11:24, Wincy Van wrote: > if (!nested_cpu_has_virt_x2apic_mode(vmcs12) && > !nested_cpu_has_apic_reg_virt(vmcs12) && > - !nested_cpu_has_vid(vmcs12)) > + !nested_cpu_has_vid(vmcs12) && > + !nested_cpu_has_posted_intr(vmcs12)) >

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

2015-01-24 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