Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 07 Jul 2018 03:06:03 -0000 Received: from mga17.intel.com ([192.55.52.151]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fbdXu-0001xl-Fh for speck@linutronix.de; Sat, 07 Jul 2018 05:06:02 +0200 Date: Fri, 6 Jul 2018 20:05:59 -0700 From: Andi Kleen Subject: [MODERATED] Re: [PATCH 1/1] SMTDOC 0 Message-ID: <20180707030559.GJ25550@tassilo.jf.intel.com> References: <20180705223129.9552-1-andi@firstfloor.org> <20180706205241.csbqflxqv4vym62v@treble> <20180706221128.GI25550@tassilo.jf.intel.com> MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Sat, Jul 07, 2018 at 01:00:59AM +0200, speck for Jiri Kosina wrote: > On Fri, 6 Jul 2018, speck for Andi Kleen wrote: > > > What?!? Of course L1 flushing in KVM be always enabled. Why would you > > ever want to disable it? > > Well, you don't want the flushes if you trust the VMs not to snoop on each > other (and the hypervisor). That's *exactly the same* argument why we are > not disabling HT by default, isn't it? HT off can be very expensive, L1 flush on entry is not. So the trade offs are very different here. iirc the flush overhead was low enough that it's probably ok to just have it on by default, Maybe an obscure tuanble somewhere to turn it off if someone is extremely sensitive to performance. But most users probably don't need to bother with that. > If the VMs are not trusted, enabling conditionally just half of the > mitigations doesn't bring any additional security. Everything helps, it slows down attackers and since the L1 cache is very transistent it may well make things impossible. -Andi