Re: [PATCH v4] KVM: nVMX: nested TPR shadow/threshold emulation

2014-08-20 Thread Wanpeng Li
Hi Paolo, On Tue, Aug 19, 2014 at 10:34:20AM +0200, Paolo Bonzini wrote: Il 19/08/2014 10:30, Wanpeng Li ha scritto: +if (vmx-nested.virtual_apic_page) +nested_release_page(vmx-nested.virtual_apic_page); +vmx-nested.virtual_apic_page = +

Re: [PATCH v4] KVM: nVMX: nested TPR shadow/threshold emulation

2014-08-20 Thread Paolo Bonzini
Il 20/08/2014 08:59, Wanpeng Li ha scritto: + /* + * Failing the vm entry is _not_ what the processor does + * but it's basically the only possibility we have. * We could still enter the guest if CR8 load exits are * enabled, CR8 store exits are enabled, and

[PATCH v4] KVM: nVMX: nested TPR shadow/threshold emulation

2014-08-19 Thread Wanpeng Li
This patch fix bug https://bugzilla.kernel.org/show_bug.cgi?id=61411 TPR shadow/threshold feature is important to speed up the Windows guest. Besides, it is a must feature for certain VMM. We map virtual APIC page address and TPR threshold from L1 VMCS. If TPR_BELOW_THRESHOLD VM exit is

Re: [PATCH v4] KVM: nVMX: nested TPR shadow/threshold emulation

2014-08-19 Thread Paolo Bonzini
Il 19/08/2014 10:30, Wanpeng Li ha scritto: + if (vmx-nested.virtual_apic_page) + nested_release_page(vmx-nested.virtual_apic_page); + vmx-nested.virtual_apic_page = +nested_get_page(vcpu, vmcs12-virtual_apic_page_addr); +