Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 07 Aug 2018 00:15:18 -0000 Received: from mga09.intel.com ([134.134.136.24]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fmpee-0001Kr-Rf for speck@linutronix.de; Tue, 07 Aug 2018 02:15:17 +0200 Date: Mon, 6 Aug 2018 17:15:13 -0700 From: Andi Kleen Subject: [MODERATED] Re: [PATCH 1/4] INVERTv1 1 Message-ID: <20180807001513.GM4238@tassilo.jf.intel.com> References: <28c729945075a54142c9838408287e333e8fde4b.1533597855.git.ak@linux.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 Mon, Aug 06, 2018 at 04:36:29PM -0700, speck for Linus Torvalds wrote: > > > On Mon, 6 Aug 2018, speck for Andi Kleen wrote: > > > > For kernel mappings PAGE_PROTNONE is not necessarily set for > > non present mapping. To enable PTE inversion for those mappings > > enable it for any non present mapping, not just prot_none. > > Your patch does not match your description. > > > static inline bool __pte_needs_invert(u64 val) > > { > > - return (val & (_PAGE_PRESENT|_PAGE_PROTNONE)) == _PAGE_PROTNONE; > > + return (val & (_PAGE_PRESENT|_PAGE_PROTNONE)) == 0; > > } > > That patch now makes it *not* trigger for _PAGE_PROTNONE pages. > > Did you perhaps mean > > return !(val & _PAGE_PRESENT); > > instead? Yes you're right of course. Putting on the brown paperbag. That's what you get from last minute changes :/ Will send a new version. Thanks, -Andi