Re: [PATCH v6 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL

2019-07-11 Thread Tao Xu
On 7/11/2019 9:25 PM, Paolo Bonzini wrote: On 21/06/19 07:57, Tao Xu wrote: + if (guest_cpuid_has(vcpu, X86_FEATURE_WAITPKG)) + atomic_switch_umwait_control_msr(vmx); + guest_cpuid_has is slow. Please replace it with a test on secondary_exec_controls_get(vmx). Thank you

Re: [PATCH v6 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL

2019-07-11 Thread Paolo Bonzini
On 21/06/19 07:57, Tao Xu wrote: > + if (guest_cpuid_has(vcpu, X86_FEATURE_WAITPKG)) > + atomic_switch_umwait_control_msr(vmx); > + guest_cpuid_has is slow. Please replace it with a test on secondary_exec_controls_get(vmx). Are you going to look into nested virtualization

Re: [PATCH v6 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL

2019-07-02 Thread Tao Xu
Ping ;) On 6/21/2019 1:57 PM, Tao Xu wrote: UMWAIT and TPAUSE instructions use IA32_UMWAIT_CONTROL at MSR index E1H to determines the maximum time in TSC-quanta that the processor can reside in either C0.1 or C0.2. This patch emulates MSR IA32_UMWAIT_CONTROL in guest and differentiate

[PATCH v6 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL

2019-06-21 Thread Tao Xu
UMWAIT and TPAUSE instructions use IA32_UMWAIT_CONTROL at MSR index E1H to determines the maximum time in TSC-quanta that the processor can reside in either C0.1 or C0.2. This patch emulates MSR IA32_UMWAIT_CONTROL in guest and differentiate IA32_UMWAIT_CONTROL between host and guest. The