Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751117AbeAPVPX (ORCPT + 1 other); Tue, 16 Jan 2018 16:15:23 -0500 Received: from mga09.intel.com ([134.134.136.24]:61883 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbeAPVPV (ORCPT ); Tue, 16 Jan 2018 16:15:21 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,369,1511856000"; d="scan'208";a="193860920" Subject: Re: [PATCH 12/16] x86/mm/pae: Populate the user page-table with user pgd's To: Thomas Gleixner , Joerg Roedel References: <1516120619-1159-1-git-send-email-joro@8bytes.org> <1516120619-1159-13-git-send-email-joro@8bytes.org> Cc: 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 From: Dave Hansen Message-ID: Date: Tue, 16 Jan 2018 13:15:21 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/16/2018 01:10 PM, Thomas Gleixner wrote: > > static inline pteval_t supported_pgd_mask(void) > { > if (IS_ENABLED(CONFIG_X86_64)) > return __supported_pte_mask; > return __supported_pte_mask & ~_PAGE_NX); > } > > and get rid of the ifdeffery completely. Heh, that's an entertaining way to do it. Joerg, if you go do it this way, it would be nice to add all the other gunk that we don't allow to be set in the PAE pgd.