Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1923590ybb; Sat, 21 Mar 2020 08:42:23 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtzXnjoxVqnHZoMyDcmeTQHxwRWNf4+Gxrl67m/BCuNsKezC8g0vlgiuGPkY55zMoUTCvd8 X-Received: by 2002:aca:5d8a:: with SMTP id r132mr9300703oib.129.1584805343600; Sat, 21 Mar 2020 08:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584805343; cv=none; d=google.com; s=arc-20160816; b=IH7LTHmh/3/6N0zgTGnzxs9NKPHvX1K2ni6SgwiVOzC+HhnBhvmXLurqSNqhsXq2ly jvK1Rk8iCkZPJE3Age02xuo5XT/Rvbx8yfFeLs2W5KP7cxwAhVW8tz/VqReMYHvJew+g t0onMYlR3lIadx5JP01wEQKIO33M4HEEXoYPAK5mw2BP0P5R6psD1OxJYp+IHnwqSGUY uItPgoY8vj+8AcfSDZTMV751+Cj3W52oAaUF9rg/BGaVR1kF+xaUPwSp/oa4BDYTnQ2T czFy2cjhzxqjZnghQ8j3YgRBZv/8CJIkovu/0H3oxnDbbi2g68Wx2hemQBKhVX2sXkGs NUTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=eZQ9JzN/QV5sj3/AHYPRCFeSAA5PNqhe5o+TwPGtQV0=; b=wm4N2L0T7tbM3sVRtkpuPjfcR2ea9Ox8ueCVxp6l5U3EbQawc8duecg3JcJ6FMfzP/ YLi6pACrXHY35tmQThl3NVvNxjlnXKtz7crF2EofAqFxnYOsBVbZVdZzo86RgDgI0/Za MWxNy+lu2Pkkc82MHda5RCRHjeoSa2yKOBpcRI9dANYOab1b9VL885zZERZGe2ZXXl5r Zw7Dtj9FiX5IOio7RvKTYzHr7hGRJLUaUhLfYOdChQN1pIlGW8dOZHT4upTirAxp6/Sz VGQxY3KVc/CmE3zuf7EXlI0plRALSG1X2W5F4gQJ+qOF0H4FPwFkwJjY081p63etsTaQ snqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n190si4784231oig.207.2020.03.21.08.42.08; Sat, 21 Mar 2020 08:42:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727433AbgCUPkg (ORCPT + 99 others); Sat, 21 Mar 2020 11:40:36 -0400 Received: from 8bytes.org ([81.169.241.247]:54940 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726607AbgCUPkf (ORCPT ); Sat, 21 Mar 2020 11:40:35 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id B99B33D3; Sat, 21 Mar 2020 16:40:33 +0100 (CET) Date: Sat, 21 Mar 2020 16:40:31 +0100 From: Joerg Roedel To: Dave Hansen Cc: David Rientjes , x86@kernel.org, hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Thomas Hellstrom , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, Joerg Roedel Subject: Re: [PATCH 21/70] x86/boot/compressed/64: Add function to map a page unencrypted Message-ID: <20200321154031.GN5122@8bytes.org> References: <20200319091407.1481-1-joro@8bytes.org> <20200319091407.1481-22-joro@8bytes.org> <8a50c19f-aaf8-90bd-a415-0e3b71e5a010@intel.com> <20200320221213.GK5122@8bytes.org> <9b69d49f-969c-5720-5723-f89ff0e000c0@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9b69d49f-969c-5720-5723-f89ff0e000c0@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 20, 2020 at 03:26:09PM -0700, Dave Hansen wrote: > In any case, I thought this all came through initialize_identity_maps(), > which does, for instance: > > mapping_info.page_flag = __PAGE_KERNEL_LARGE_EXEC | sme_me_mask; > > Where: > > #define __PAGE_KERNEL_LARGE_EXEC (__PP|__RW| 0|___A| 0|___D|_PSE|___G) > > That looks like it has the Global bit set. Does that not apply here > somehow? No, as the value of %cr4 at boot is 0x00000020, so PGE is not set and global pages are not enabled. It wouldn't make sense anyhow, as global pages only make sense when there are more than one address space, which is not the case that early in boot. Regards, Joerg