From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f67.google.com ([209.85.218.67]:36078 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727604AbeHOUIZ (ORCPT ); Wed, 15 Aug 2018 16:08:25 -0400 Received: by mail-oi0-f67.google.com with SMTP id n21-v6so3192067oig.3 for ; Wed, 15 Aug 2018 10:15:25 -0700 (PDT) From: Guenter Roeck To: Greg Kroah-Hartman Cc: stable@vger.kernel.org, Guenter Roeck , Meelis Roos , Paolo Bonzini , Thomas Gleixner , Linus Torvalds Subject: [PATCH v4.{9,14,17,18}] x86/l1tf: Fix build error seen if CONFIG_KVM_INTEL is disabled Date: Wed, 15 Aug 2018 10:15:21 -0700 Message-Id: <1534353321-21206-1-git-send-email-linux@roeck-us.net> Sender: stable-owner@vger.kernel.org List-ID: commit 1eb46908b35dfbac0ec1848d4b1e39667e0187e9 upstream 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 Signed-off-by: Guenter Roeck --- arch/x86/kernel/cpu/bugs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 5229eaf73828..ac67a76550bd 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -647,10 +647,9 @@ void x86_spec_ctrl_setup_ap(void) enum l1tf_mitigations l1tf_mitigation __ro_after_init = 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 l1tf_select_mitigation(void) { -- 2.7.4