Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 03 Jul 2018 01:33:38 -0000 Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1faACH-0008Ef-HN for speck@linutronix.de; Tue, 03 Jul 2018 03:33:37 +0200 Received: by mail-pf0-x22e.google.com with SMTP id y24-v6so161001pfe.12 for ; Mon, 02 Jul 2018 18:33:37 -0700 (PDT) Received: from i7.lan (c-73-11-52-149.hsd1.or.comcast.net. [73.11.52.149]) by smtp.gmail.com with ESMTPSA id j13-v6sm25876524pgq.73.2018.07.02.18.33.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jul 2018 18:33:29 -0700 (PDT) Sender: Linus Torvalds Date: Mon, 2 Jul 2018 18:33:29 -0700 (PDT) From: Linus Torvalds Subject: [MODERATED] Re: ***UNCHECKED*** [patch V5 05/10] KVM magic # 5 In-Reply-To: <3740a705-86f3-8644-4a4b-bc88880b2202@citrix.com> Message-ID: References: <20180702154426.910579106@linutronix.de> <20180702160528.906801335@linutronix.de> <3740a705-86f3-8644-4a4b-bc88880b2202@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: speck@linutronix.de List-ID: On Tue, 3 Jul 2018, speck for Andrew Cooper wrote: > > We are still investigating, but the block side of things is a very > unattractive.  OTOH, I remain to be convinced by the "we're only taking > interrupts and the prefetch isn't pulling in anything interesting" > argument, because its a bit too woolly for my liking, especially in the > presence of next-page-prefetch on Haswell and later. I think the whole argument that "we're only taking an interrupt" is pure BS. The interrupt code fundamentally brings in a lot of the really core kernel data structures into the L1 cache. Do a wakeup (and what interrupt doesn't?) and you bring in core task structure data and scheduler stuff etc. Maybe you can say that there is no PIO, and that a disk interrupt won't have any of the actual disk data in the caches. Maybe that's true, and maybe it isn't. Sure, an interrupt may not touch keys and other super-sekrit stuff (although is it clear that a network interrupt won't?), but what is the argument that this all is protecting against? Maybe somebody like Amazon cloud really considers the host almost entirely uninteresting, and the only thing that matters is whether it ran another VM? Regardless, I think the "only interrupts" is a pure garbage argument that makes no sense at all. I think it's purely wishful thinking on the parts of people who want lower overhead, but don't actually have a real reason for why the L1 doesn't need flushing. A *real* reason would be "we don't care about random host kernel internal data leaking, so we only want to flush if we've scheduled to something else". That is still a somewhat suspect argument, but it's a hell of a lot more believable than some "interrupts-shminterrupts" handwaving. Linus