Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread Konrad Rzeszutek Wilk
On Fri, Feb 02, 2018 at 06:05:54PM +, David Woodhouse wrote: > On Fri, 2018-02-02 at 12:53 -0500, Konrad Rzeszutek Wilk wrote: > > .snip.. > > > > > > @@ -1913,6 +1914,29 @@ static void update_exception_bitmap(struct > > > kvm_vcpu *vcpu) > > >  } > > >   > > >  /* > > > + * Check if MSR is

Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread Konrad Rzeszutek Wilk
On Fri, Feb 02, 2018 at 06:05:54PM +, David Woodhouse wrote: > On Fri, 2018-02-02 at 12:53 -0500, Konrad Rzeszutek Wilk wrote: > > .snip.. > > > > > > @@ -1913,6 +1914,29 @@ static void update_exception_bitmap(struct > > > kvm_vcpu *vcpu) > > >  } > > >   > > >  /* > > > + * Check if MSR is

Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread David Woodhouse
On Fri, 2018-02-02 at 12:53 -0500, Konrad Rzeszutek Wilk wrote: > .snip.. > > > > @@ -1913,6 +1914,29 @@ static void update_exception_bitmap(struct > > kvm_vcpu *vcpu) > >  } > >   > >  /* > > + * Check if MSR is intercepted for currently loaded MSR bitmap. > > + */ > > +static bool

Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread David Woodhouse
On Fri, 2018-02-02 at 12:53 -0500, Konrad Rzeszutek Wilk wrote: > .snip.. > > > > @@ -1913,6 +1914,29 @@ static void update_exception_bitmap(struct > > kvm_vcpu *vcpu) > >  } > >   > >  /* > > + * Check if MSR is intercepted for currently loaded MSR bitmap. > > + */ > > +static bool

Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread Konrad Rzeszutek Wilk
.snip.. > @@ -1913,6 +1914,29 @@ static void update_exception_bitmap(struct kvm_vcpu > *vcpu) > } > > /* > + * Check if MSR is intercepted for currently loaded MSR bitmap. > + */ > +static bool msr_write_intercepted(struct kvm_vcpu *vcpu, u32 msr) > +{ > + unsigned long *msr_bitmap; > +

Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread Konrad Rzeszutek Wilk
.snip.. > @@ -1913,6 +1914,29 @@ static void update_exception_bitmap(struct kvm_vcpu > *vcpu) > } > > /* > + * Check if MSR is intercepted for currently loaded MSR bitmap. > + */ > +static bool msr_write_intercepted(struct kvm_vcpu *vcpu, u32 msr) > +{ > + unsigned long *msr_bitmap; > +

Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread Jim Mattson
On Thu, Feb 1, 2018 at 1:59 PM, KarimAllah Ahmed wrote: > [ 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

Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread Jim Mattson
On Thu, Feb 1, 2018 at 1:59 PM, KarimAllah Ahmed wrote: > [ 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

Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread David Woodhouse
On Thu, 2018-02-01 at 22:59 +0100, KarimAllah Ahmed wrote: > [ 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

Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread David Woodhouse
On Thu, 2018-02-01 at 22:59 +0100, KarimAllah Ahmed wrote: > [ 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. > >

Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread Darren Kenny
On Thu, Feb 01, 2018 at 10:59:45PM +0100, KarimAllah Ahmed wrote: [ 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

Re: [PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-02 Thread Darren Kenny
On Thu, Feb 01, 2018 at 10:59:45PM +0100, KarimAllah Ahmed wrote: [ 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 v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread 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 the

[PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread 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 the MSR_IA32_SPEC_CTRL for