Re: [PATCH v7 1/3] KVM: x86: add support for user wait instructions

2019-07-14 Thread Tao Xu
On 7/12/2019 11:13 PM, Sean Christopherson wrote: On Fri, Jul 12, 2019 at 04:29:05PM +0800, Tao Xu wrote: diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index 46af3a5e9209..a4d5da34b306 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -2048,6 +2048,7

Re: [PATCH v7 1/3] KVM: x86: add support for user wait instructions

2019-07-12 Thread Sean Christopherson
On Fri, Jul 12, 2019 at 04:29:05PM +0800, Tao Xu wrote: > diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c > index 46af3a5e9209..a4d5da34b306 100644 > --- a/arch/x86/kvm/vmx/nested.c > +++ b/arch/x86/kvm/vmx/nested.c > @@ -2048,6 +2048,7 @@ static void prepare_vmcs02_early(struct

[PATCH v7 1/3] KVM: x86: add support for user wait instructions

2019-07-12 Thread Tao Xu
UMONITOR, UMWAIT and TPAUSE are a set of user wait instructions. This patch adds support for user wait instructions in KVM. Availability of the user wait instructions is indicated by the presence of the CPUID feature flag WAITPKG CPUID.0x07.0x0:ECX[5]. User wait instructions may be executed at any