From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id 1C1156B0290 for ; Tue, 16 Jan 2018 14:44:26 -0500 (EST) Received: by mail-wm0-f70.google.com with SMTP id a80so1052317wme.2 for ; Tue, 16 Jan 2018 11:44:26 -0800 (PST) Received: from theia.8bytes.org (8bytes.org. [2a01:238:4383:600:38bc:a715:4b6d:a889]) by mx.google.com with ESMTPS id d8si2458730edn.329.2018.01.16.11.44.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 11:44:25 -0800 (PST) Date: Tue, 16 Jan 2018 20:44:24 +0100 From: Joerg Roedel Subject: Re: [PATCH 12/16] x86/mm/pae: Populate the user page-table with user pgd's Message-ID: <20180116194424.GE28161@8bytes.org> References: <1516120619-1159-1-git-send-email-joro@8bytes.org> <1516120619-1159-13-git-send-email-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Dave Hansen Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waiman Long , jroedel@suse.de On Tue, Jan 16, 2018 at 10:11:14AM -0800, Dave Hansen wrote: > > Ugh. The ghosts of PAE have come back to haunt us. :-) Yeah, PAE caused the most trouble for me while getting this running. > > Could we do: > > static inline bool pgd_supports_nx(unsigned long) > { > #ifdef CONFIG_X86_64 > return (__supported_pte_mask & _PAGE_NX); > #else > /* No 32-bit page tables support NX at PGD level */ > return 0; > #endif > } > > Nobody will ever spot the #ifdef the way you laid it out. Right, thats a better way to do it. I'll change it in the next version. Thanks, Joerg -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org