[lkml]   [2018]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v6 0/5] KVM: Expose speculation control feature to guests
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 used by Intel processors to
indicate RDCL_NO and IBRS_ALL.

Keep in mind that the SVM part of the patch is unchanged this time. Mostly to
get feedback/confirmation about the nested handling for VMX first, once this is
done I will update SVM as well.

- Do not penalize (save/restore IBRS) all L2 guests when anyone of them starts
using the SPEC_CTRL.

- svm: add PRED_CMD and SPEC_CTRL to direct_access_msrs list.
- vmx: check also for X86_FEATURE_SPEC_CTRL for msr reads and writes.
- vmx: Use MSR_TYPE_W instead of MSR_TYPE_R for the nested IBPB MSR
- rewrite commit message for IBPB patch [2/5] (Ashok)

- Add IBRS passthrough for SVM (5/5).
- Handle nested guests properly.
- expose F(IBRS) in kvm_cpuid_8000_0008_ebx_x86_features

Ashok Raj (1):
KVM: x86: Add IBPB support

KarimAllah Ahmed (4):
KVM: x86: Update the reverse_cpuid list to include CPUID_7_EDX
KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL
KVM: SVM: Allow direct access to MSR_IA32_SPEC_CTRL

arch/x86/kvm/cpuid.c | 22 ++++--
arch/x86/kvm/cpuid.h | 1 +
arch/x86/kvm/svm.c | 87 +++++++++++++++++++++++
arch/x86/kvm/vmx.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++++++-
arch/x86/kvm/x86.c | 1 +
5 files changed, 299 insertions(+), 8 deletions(-)

Cc: Andi Kleen <>
Cc: Andrea Arcangeli <>
Cc: Andy Lutomirski <>
Cc: Arjan van de Ven <>
Cc: Ashok Raj <>
Cc: Asit Mallick <>
Cc: Borislav Petkov <>
Cc: Dan Williams <>
Cc: Dave Hansen <>
Cc: David Woodhouse <>
Cc: Greg Kroah-Hartman <>
Cc: H. Peter Anvin <>
Cc: Ingo Molnar <>
Cc: Janakarajan Natarajan <>
Cc: Joerg Roedel <>
Cc: Jun Nakajima <>
Cc: Laura Abbott <>
Cc: Linus Torvalds <>
Cc: Masami Hiramatsu <>
Cc: Paolo Bonzini <>
Cc: Peter Zijlstra <>
Cc: Radim Krčmář <>
Cc: Thomas Gleixner <>
Cc: Tim Chen <>
Cc: Tom Lendacky <>


 \ /
  Last update: 2018-02-01 23:01    [W:0.208 / U:3.060 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site