From mboxrd@z Thu Jan 1 00:00:00 1970 From: KarimAllah Ahmed Subject: [RFC 00/10] Speculation Control feature support Date: Sat, 20 Jan 2018 20:22:51 +0100 Message-ID: <1516476182-5153-1-git-send-email-karahmed@amazon.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: KarimAllah Ahmed , Andi Kleen , Andrea Arcangeli , Andy Lutomirski , Arjan van de Ven , Ashok Raj , Asit Mallick , Borislav Petkov , Dan Williams , Dave Hansen , David Woodhouse , Greg Kroah-Hartman , "H . Peter Anvin" , Ingo Molnar , Janakarajan Natarajan , Joerg Roedel , Jun Nakajima , Laura Abbott , Linus Torvalds , Masami Hiramatsu Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Start using the newly-added microcode features for speculation control on both Intel and AMD CPUs to protect against Spectre v2. This patch series covers interrupts, system calls, context switching between processes, and context switching between VMs. It also exposes Indirect Branch Prediction Barrier MSR, aka IBPB MSR, to KVM guests. TODO: - Introduce a microcode blacklist to disable the feature for broken microcodes. - Restrict/Unrestrict the speculation (by toggling IBRS) around VMExit and VMEnter for KVM and expose IBRS to guests. Ashok Raj (1): x86/kvm: Add IBPB support David Woodhouse (1): x86/speculation: Add basic IBRS support infrastructure KarimAllah Ahmed (1): x86: Simplify spectre_v2 command line parsing Thomas Gleixner (4): x86/speculation: Add basic support for IBPB x86/speculation: Use Indirect Branch Prediction Barrier in context switch x86/speculation: Add inlines to control Indirect Branch Speculation x86/idle: Control Indirect Branch Speculation in idle Tim Chen (3): x86/mm: Only flush indirect branches when switching into non dumpable process x86/enter: Create macros to restrict/unrestrict Indirect Branch Speculation x86/enter: Use IBRS on syscall and interrupts Documentation/admin-guide/kernel-parameters.txt | 1 + arch/x86/entry/calling.h | 73 ++++++++++ arch/x86/entry/entry_64.S | 35 ++++- arch/x86/entry/entry_64_compat.S | 21 ++- arch/x86/include/asm/cpufeatures.h | 2 + arch/x86/include/asm/mwait.h | 14 ++ arch/x86/include/asm/nospec-branch.h | 54 ++++++- arch/x86/kernel/cpu/bugs.c | 183 +++++++++++++++--------- arch/x86/kernel/process.c | 14 ++ arch/x86/kvm/svm.c | 14 ++ arch/x86/kvm/vmx.c | 4 + arch/x86/mm/tlb.c | 21 ++- 12 files changed, 359 insertions(+), 77 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 Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: x86@kernel.org -- 2.7.4