Return-path: Received: from mga11.intel.com ([192.55.52.93]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fGup4-00060d-Kc for speck@linutronix.de; Fri, 11 May 2018 01:18:07 +0200 Date: Thu, 10 May 2018 16:18:04 -0700 From: Andi Kleen Subject: [MODERATED] Re: [PATCH v4 1/8] L1TFv4 1 Message-ID: <20180510231804.GJ13616@tassilo.jf.intel.com> References: <0c2eb2235d5476b216693f1e9ec8394d58af20b3.1525900921.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: > > -/* 44=32+12, the limit we can fit into an unsigned long pfn */ > > -#define __PHYSICAL_MASK_SHIFT 44 > > +/* > > + * This is beyond the 44 bit limit imposed by the 32bit long pfns, > > + * but we need the full mask to make sure inverted PROT_NONE > > + * entries have all the host bits set in a guest. > > + * The real limit is still 44 bits. > > + */ > > +#define __PHYSICAL_MASK_SHIFT 52 > > #define __VIRTUAL_MASK_SHIFT 32 > > Are you really sure that this does not have unwanted side effects in any > (indirect) user of __PHYSICAL_MASK_SHIFT ? If yes, please indicate so in > the changelog. Yes I did an audit. Will indicate. It's safe because these bits can never be set to non 0 because all PTEs are created from unsigned long PFNs. -Andi