Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751873AbeAPTo2 (ORCPT + 1 other); Tue, 16 Jan 2018 14:44:28 -0500 Received: from 8bytes.org ([81.169.241.247]:59446 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751465AbeAPTo0 (ORCPT ); Tue, 16 Jan 2018 14:44:26 -0500 Date: Tue, 16 Jan 2018 20:44:24 +0100 From: Joerg Roedel 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 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: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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