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

2019-06-17 Thread Tao Xu
On 6/17/2019 11:32 AM, Xiaoyao Li wrote: On 6/16/2019 5:55 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

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

2019-06-17 Thread Tao Xu
On 6/17/2019 11:50 PM, Radim Krčmář wrote: 2019-06-17 14:31+0800, Xiaoyao Li: On 6/17/2019 11:32 AM, Xiaoyao Li wrote: On 6/16/2019 5:55 PM, Tao Xu wrote: +    if (vmx->msr_ia32_umwait_control != host_umwait_control) +    add_atomic_switch_msr(vmx, MSR_IA32_UMWAIT_CONTROL, +   

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

2019-06-17 Thread Xiaoyao Li
On 6/17/2019 11:50 PM, Radim Krčmář wrote: 2019-06-17 14:31+0800, Xiaoyao Li: On 6/17/2019 11:32 AM, Xiaoyao Li wrote: On 6/16/2019 5:55 PM, Tao Xu wrote: +    if (vmx->msr_ia32_umwait_control != host_umwait_control) +    add_atomic_switch_msr(vmx, MSR_IA32_UMWAIT_CONTROL, +

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

2019-06-17 Thread Radim Krčmář
2019-06-17 14:31+0800, Xiaoyao Li: > On 6/17/2019 11:32 AM, Xiaoyao Li wrote: > > On 6/16/2019 5:55 PM, Tao Xu wrote: > > > +    if (vmx->msr_ia32_umwait_control != host_umwait_control) > > > +    add_atomic_switch_msr(vmx, MSR_IA32_UMWAIT_CONTROL, > > > + 

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

2019-06-17 Thread Xiaoyao Li
On 6/17/2019 11:32 AM, Xiaoyao Li wrote: On 6/16/2019 5:55 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

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

2019-06-16 Thread Xiaoyao Li
On 6/16/2019 5:55 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 RESEND v3 2/3] KVM: vmx: Emulate MSR IA32_UMWAIT_CONTROL

2019-06-16 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