From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753123AbdKUHGA (ORCPT ); Tue, 21 Nov 2017 02:06:00 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:43830 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752834AbdKUHF6 (ORCPT ); Tue, 21 Nov 2017 02:05:58 -0500 X-Google-Smtp-Source: AGs4zMbsfytREQ2Tj9mk2ydDBhMWUsUIh036oW0cew78mY3L5TLb50pjPMypwnyZK0Id+UR2RgpKDA== Date: Tue, 21 Nov 2017 08:05:53 +0100 From: Ingo Molnar To: Thomas Gleixner Cc: Dave Hansen , linux-kernel@vger.kernel.org, linux-mm@kvack.org, moritz.lipp@iaik.tugraz.at, daniel.gruss@iaik.tugraz.at, michael.schwarz@iaik.tugraz.at, richard.fellner@student.tugraz.at, luto@kernel.org, torvalds@linux-foundation.org, keescook@google.com, hughd@google.com, x86@kernel.org Subject: Re: [PATCH 09/30] x86, kaiser: only populate shadow page tables for userspace Message-ID: <20171121070553.ocar3maqbwofvj7t@gmail.com> References: <20171110193058.BECA7D88@viggo.jf.intel.com> <20171110193113.E35BC3BF@viggo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Thomas Gleixner wrote: > > + */ > > +static inline bool pgd_userspace_access(pgd_t pgd) > > +{ > > + return (pgd.pgd & _PAGE_USER); > > +} Also a nit: the parentheses are superfluous - these aren't macros. Thanks, Ingo