From: Guenter Roeck Date: Wed, 15 Aug 2018 15:38:33 +0000 (-0700) Subject: x86/l1tf: Fix build error seen if CONFIG_KVM_INTEL is disabled X-Git-Tag: v4.1.12-124.31.3~549 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1775c1b9fb179a8b1a5f0a24a6593b61318a7bf7;p=users%2Fjedix%2Flinux-maple.git x86/l1tf: Fix build error seen if CONFIG_KVM_INTEL is disabled allmodconfig+CONFIG_INTEL_KVM=n results in the following build error. ERROR: "l1tf_vmx_mitigation" [arch/x86/kvm/kvm.ko] undefined! Fixes: 5b76a3cff011 ("KVM: VMX: Tell the nested hypervisor to skip L1D flush on vmentry") Reported-by: Meelis Roos Cc: Meelis Roos Cc: Paolo Bonzini Cc: Thomas Gleixner Signed-off-by: Guenter Roeck Signed-off-by: Linus Torvalds (cherry picked from commit 1eb46908b35dfbac0ec1848d4b1e39667e0187e9) Orabug: 28488808 CVE: CVE-2018-3620 Signed-off-by: Mihai Carabas Reviewed-by: Liam Merwick Reviewed-by: Darren Kenny Signed-off-by: Brian Maly Conflicts: arch/x86/kernel/cpu/bugs.c Contextual: bugs_64.c was modified instead of bugs.c Signed-off-by: Brian Maly --- diff --git a/arch/x86/kernel/cpu/bugs_64.c b/arch/x86/kernel/cpu/bugs_64.c index 51869be5584f..0338e6e858ab 100644 --- a/arch/x86/kernel/cpu/bugs_64.c +++ b/arch/x86/kernel/cpu/bugs_64.c @@ -957,10 +957,9 @@ void x86_spec_ctrl_setup_ap(void) enum l1tf_mitigations l1tf_mitigation __read_mostly = L1TF_MITIGATION_FLUSH; #if IS_ENABLED(CONFIG_KVM_INTEL) EXPORT_SYMBOL_GPL(l1tf_mitigation); - +#endif enum vmx_l1d_flush_state l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_AUTO; EXPORT_SYMBOL_GPL(l1tf_vmx_mitigation); -#endif static void __init parse_l1tf_cmdline(void) {