Re: [PATCH 8/9] KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-15 Thread Jim Mattson
On Tue, Feb 6, 2018 at 9:29 AM, David Woodhouse wrote: > @@ -8946,6 +9017,27 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu > *vcpu) > #endif > ); > > + /* > +* We do not use IBRS in the kernel. If this vCPU has used the > +*

Re: [PATCH 8/9] KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-15 Thread Jim Mattson
On Tue, Feb 6, 2018 at 9:29 AM, David Woodhouse wrote: > @@ -8946,6 +9017,27 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu > *vcpu) > #endif > ); > > + /* > +* We do not use IBRS in the kernel. If this vCPU has used the > +* SPEC_CTRL MSR it may have

Re: [PATCH 8/9] KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-15 Thread Jim Mattson
On Tue, Feb 6, 2018 at 9:29 AM, David Woodhouse wrote: > @@ -8828,6 +8890,15 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu > *vcpu) > > vmx_arm_hv_timer(vcpu); > > + /* > +* If this vCPU has touched SPEC_CTRL, restore the guest's value if > +

Re: [PATCH 8/9] KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-15 Thread Jim Mattson
On Tue, Feb 6, 2018 at 9:29 AM, David Woodhouse wrote: > @@ -8828,6 +8890,15 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu > *vcpu) > > vmx_arm_hv_timer(vcpu); > > + /* > +* If this vCPU has touched SPEC_CTRL, restore the guest's value if > +* it's

[PATCH 8/9] KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-06 Thread David Woodhouse
From: KarimAllah Ahmed [ Based on a patch from Ashok Raj ] Add direct access to MSR_IA32_SPEC_CTRL for guests. This is needed for guests that will only mitigate Spectre V2 through IBRS+IBPB and will not be using a retpoline+IBPB based approach. To

[PATCH 8/9] KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-06 Thread David Woodhouse
From: KarimAllah Ahmed [ Based on a patch from Ashok Raj ] Add direct access to MSR_IA32_SPEC_CTRL for guests. This is needed for guests that will only mitigate Spectre V2 through IBRS+IBPB and will not be using a retpoline+IBPB based approach. To avoid the overhead of saving and restoring