Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 25 Jul 2018 14:36:48 -0000 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1fiKop-0008J4-R1 for speck@linutronix.de; Wed, 25 Jul 2018 16:31:12 +0200 Received: by mail-wm0-x22c.google.com with SMTP id s12-v6so3005570wmc.0 for ; Wed, 25 Jul 2018 07:31:11 -0700 (PDT) Received: from donizetti.redhat.com (nat-pool-mxp-t.redhat.com. [149.6.153.186]) by smtp.gmail.com with ESMTPSA id w8-v6sm13922118wrp.72.2018.07.25.07.31.05 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Jul 2018 07:31:05 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Subject: [MODERATED] [PATCH v2 2/4] L1TF KVM ARCH_CAPABILITIES #2 Date: Wed, 25 Jul 2018 16:30:58 +0200 Message-Id: <20180725143100.16309-3-pbonzini@redhat.com> In-Reply-To: <20180725143100.16309-1-pbonzini@redhat.com> References: <20180725143100.16309-1-pbonzini@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 To: speck@linutronix.de List-ID: If EPT is disabled, L1TF cannot be exploited even across threads on the same core, and SMT is irrelevant. If mitigation is completely disabled, L1TF can be exploited even within a single thread, so SMT is again irrelevant. Reflect this in the sysfs file. Signed-off-by: Paolo Bonzini --- arch/x86/kernel/cpu/bugs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index d63cb1501784..912eb015949f 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -753,6 +753,11 @@ static ssize_t l1tf_show_state(char *buf) if (l1tf_vmx_mitigation == VMENTER_L1D_FLUSH_AUTO) return sprintf(buf, "%s\n", L1TF_DEFAULT_MSG); + if (l1tf_vmx_mitigation == VMENTER_L1D_FLUSH_EPT_DISABLED || + l1tf_vmx_mitigation == VMENTER_L1D_FLUSH_NEVER) + return sprintf(buf, "%s; VMX: %s\n", L1TF_DEFAULT_MSG, + l1tf_vmx_states[l1tf_vmx_mitigation]); + return sprintf(buf, "%s; VMX: SMT %s, L1D %s\n", L1TF_DEFAULT_MSG, cpu_smt_control == CPU_SMT_ENABLED ? "vulnerable" : "disabled", l1tf_vmx_states[l1tf_vmx_mitigation]); -- 2.17.1