From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5B80A21163DFE for ; Tue, 9 Oct 2018 02:14:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 464D8308213B; Tue, 9 Oct 2018 09:14:13 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-35.rdu2.redhat.com [10.10.120.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3AE8D1001F57; Tue, 9 Oct 2018 09:14:12 +0000 (UTC) To: "Ni, Ruiyu" , Eric Dong , edk2-devel@lists.01.org References: <20181009060100.6984-1-eric.dong@intel.com> <8861ff1a-d42d-3778-a92f-44ae4039968b@redhat.com> <86397fca-fa57-470a-8ca0-31e9ad1204b2@Intel.com> From: Laszlo Ersek Message-ID: <00d98002-fa7e-58a3-3f19-e00f0db4f297@redhat.com> Date: Tue, 9 Oct 2018 11:14:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <86397fca-fa57-470a-8ca0-31e9ad1204b2@Intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 09 Oct 2018 09:14:13 +0000 (UTC) Subject: Re: [Patch v3] UefiCpuPkg/S3Resume2Pei: disable paging before creating new page table. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 09:14:14 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 10/09/18 10:59, Ni, Ruiyu wrote: > On 10/9/2018 4:25 PM, Laszlo Ersek wrote: >> - for clarity, please use ~(UINTN)BIT31 as mask (even though it makes no >>    practical difference). > Actually we could use IA32_CR0 structure to avoid BIT31 usage. That's a great idea. I wish I had known about IA32_CR0 (and IA32_CR4) earlier! Now we have a bunch of ad-hoc bitmask macros around the tree, e.g. CR0_WP, CR0_PG, CR4_PSE, CR4_PAE in "UefiCpuPkg/CpuDxe/CpuPageTable.c". Thanks! Laszlo