Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread Dave Hansen
On 01/30/2018 04:16 PM, Paolo Bonzini wrote: > On 30/01/2018 18:48, Raj, Ashok wrote: >>> Certainly not every vmexit! But doing it on every userspace vmexit and >>> every sched_out would not be *that* bad. >> Right.. agreed. We discussed the different scenarios that doing IBPB >> on VMexit would

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread Dave Hansen
On 01/30/2018 04:16 PM, Paolo Bonzini wrote: > On 30/01/2018 18:48, Raj, Ashok wrote: >>> Certainly not every vmexit! But doing it on every userspace vmexit and >>> every sched_out would not be *that* bad. >> Right.. agreed. We discussed the different scenarios that doing IBPB >> on VMexit would

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread David Woodhouse
On Tue, 2018-01-30 at 19:16 -0500, Paolo Bonzini wrote: > On 30/01/2018 18:48, Raj, Ashok wrote: > > > > > > > > Certainly not every vmexit!  But doing it on every userspace vmexit and > > > every sched_out would not be *that* bad. > > Right.. agreed. We discussed the different scenarios that

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread David Woodhouse
On Tue, 2018-01-30 at 19:16 -0500, Paolo Bonzini wrote: > On 30/01/2018 18:48, Raj, Ashok wrote: > > > > > > > > Certainly not every vmexit!  But doing it on every userspace vmexit and > > > every sched_out would not be *that* bad. > > Right.. agreed. We discussed the different scenarios that

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread Paolo Bonzini
On 30/01/2018 18:48, Raj, Ashok wrote: >> Certainly not every vmexit! But doing it on every userspace vmexit and >> every sched_out would not be *that* bad. > Right.. agreed. We discussed the different scenarios that doing IBPB > on VMexit would help, and decided its really not required on every

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread Paolo Bonzini
On 30/01/2018 18:48, Raj, Ashok wrote: >> Certainly not every vmexit! But doing it on every userspace vmexit and >> every sched_out would not be *that* bad. > Right.. agreed. We discussed the different scenarios that doing IBPB > on VMexit would help, and decided its really not required on every

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread Raj, Ashok
On Tue, Jan 30, 2018 at 06:36:20PM -0500, Paolo Bonzini wrote: > On 30/01/2018 04:00, David Woodhouse wrote: > > I believe Ashok sent you a change which made us do IBPB on *every* > > vmexit; I don't think we need that. It's currently done in vcpu_load() > > which means we'll definitely have done

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread Raj, Ashok
On Tue, Jan 30, 2018 at 06:36:20PM -0500, Paolo Bonzini wrote: > On 30/01/2018 04:00, David Woodhouse wrote: > > I believe Ashok sent you a change which made us do IBPB on *every* > > vmexit; I don't think we need that. It's currently done in vcpu_load() > > which means we'll definitely have done

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread Paolo Bonzini
On 30/01/2018 04:00, David Woodhouse wrote: > I believe Ashok sent you a change which made us do IBPB on *every* > vmexit; I don't think we need that. It's currently done in vcpu_load() > which means we'll definitely have done it between running one vCPU and > the next, and when vCPUs are pinned

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread Paolo Bonzini
On 30/01/2018 04:00, David Woodhouse wrote: > I believe Ashok sent you a change which made us do IBPB on *every* > vmexit; I don't think we need that. It's currently done in vcpu_load() > which means we'll definitely have done it between running one vCPU and > the next, and when vCPUs are pinned

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread KarimAllah Ahmed
On 01/30/2018 10:00 AM, David Woodhouse wrote: On Tue, 2018-01-30 at 01:10 +0100, KarimAllah Ahmed wrote: Add direct access to speculation control MSRs for KVM guests. This allows the guest to protect itself against Spectre V2 using IBRS+IBPB instead of a retpoline+IBPB based approach. It

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread KarimAllah Ahmed
On 01/30/2018 10:00 AM, David Woodhouse wrote: On Tue, 2018-01-30 at 01:10 +0100, KarimAllah Ahmed wrote: Add direct access to speculation control MSRs for KVM guests. This allows the guest to protect itself against Spectre V2 using IBRS+IBPB instead of a retpoline+IBPB based approach. It

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread David Woodhouse
On Tue, 2018-01-30 at 01:10 +0100, KarimAllah Ahmed wrote: > Add direct access to speculation control MSRs for KVM guests. This allows the > guest to protect itself against Spectre V2 using IBRS+IBPB instead of a > retpoline+IBPB based approach. > > It also exposes the ARCH_CAPABILITIES MSR

Re: [PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-30 Thread David Woodhouse
On Tue, 2018-01-30 at 01:10 +0100, KarimAllah Ahmed wrote: > Add direct access to speculation control MSRs for KVM guests. This allows the > guest to protect itself against Spectre V2 using IBRS+IBPB instead of a > retpoline+IBPB based approach. > > It also exposes the ARCH_CAPABILITIES MSR

[PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-29 Thread KarimAllah Ahmed
Add direct access to speculation control MSRs for KVM guests. This allows the guest to protect itself against Spectre V2 using IBRS+IBPB instead of a retpoline+IBPB based approach. It also exposes the ARCH_CAPABILITIES MSR which is going to be used by future Intel processors to indicate RDCL_NO

[PATCH v3 0/4] KVM: Expose speculation control feature to guests

2018-01-29 Thread KarimAllah Ahmed
Add direct access to speculation control MSRs for KVM guests. This allows the guest to protect itself against Spectre V2 using IBRS+IBPB instead of a retpoline+IBPB based approach. It also exposes the ARCH_CAPABILITIES MSR which is going to be used by future Intel processors to indicate RDCL_NO