From nobody Mon Feb 9 12:28:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+88124+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+88124+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1648455033; cv=none; d=zohomail.com; s=zohoarc; b=khYJEOxxuenk2t1SaA37tAExMBmiHXaltJpskAfxsDN8OWKwbGmG/eUtthroE26gsd8AfMYRV3zV/hCu+U8eZzCSwBq7XVbbazJc6Hgx7UVHgeRmaKX8PadiO4XQ0hdsPq/WrX8mza/Lfpe6o5nFxLUBAVnhQZK7IzozL7wr+H0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648455033; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=gkgFS6ZHQvmrXTImA5okoq5nUJaO1RFXNTHdIBewJFE=; b=I+5D7dxeQWjQOyjolwP+yb3EIee6eZ7pCfn3OdX6yk/npfZEMTKvtDNevBxiCYgut7WgEyKVgy4SQGAAfMb9xvHKfts79ZKCg/7YTSjJ3xMIf/+dOS8y15FSd9lyuH+5yJAusPUZPym96AEAUO5c6sXMjUrFUnsFfuabWGGK8Dw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+88124+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1648455033801972.0787496110847; Mon, 28 Mar 2022 01:10:33 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fHilYY1788612xjwhBSaNicC; Mon, 28 Mar 2022 01:10:32 -0700 X-Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web12.8487.1648455017030517745 for ; Mon, 28 Mar 2022 01:10:31 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10299"; a="257771326" X-IronPort-AV: E=Sophos;i="5.90,216,1643702400"; d="scan'208";a="257771326" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2022 01:10:31 -0700 X-IronPort-AV: E=Sophos;i="5.90,216,1643702400"; d="scan'208";a="563428433" X-Received: from mxu9-mobl1.ccr.corp.intel.com ([10.249.175.167]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2022 01:10:28 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Jian J Wang , Hao A Wu , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky , Gerd Hoffmann Subject: [edk2-devel] [PATCH V11 35/47] MdeModulePkg: Skip setting IA32_ERER.NXE if it has already been set Date: Mon, 28 Mar 2022 16:08:14 +0800 Message-Id: <042a1d527354cad1c245a48b20d02292c687859d.1648454441.git.min.m.xu@intel.com> In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,min.m.xu@intel.com X-Gm-Message-State: TZiKQSpYrfY457A4yJUU0Jonx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1648455032; bh=U+hGFzcFLlIlXkmB7fxzLiKLqQsVR5Wo58g0+eDxxWg=; h=Cc:Date:From:Reply-To:Subject:To; b=kMUHw7JsDtxqgS7FtSEM9L5UUuPql2YSjIp6I4EQgWusLPUsL+A2Zvnk9EfmdSW6q9o thgHCekPzhUu8tunJbd9QpgTsSxAr9lOVPsoq9lF48hPdaY5JmS9BheUZhtAX5kzG7ZMc gXq8uWf/uEZ01u1591hdujzE5FCNYEhNVyo= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1648455035900100002 Content-Type: text/plain; charset="utf-8" RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3429 If IA32_ERER.NXE has already been set, skip setting it again. Cc: Jian J Wang Cc: Hao A Wu Cc: Brijesh Singh Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Cc: Gerd Hoffmann Acked-by: Gerd Hoffmann Reviewed-by: Jian J Wang Signed-off-by: Min Xu --- MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c b/MdeModulePk= g/Core/DxeIplPeim/X64/VirtualMemory.c index 1ebab2782010..a451ca160408 100644 --- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c +++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c @@ -179,9 +179,11 @@ EnableExecuteDisableBit ( { UINT64 MsrRegisters; =20 - MsrRegisters =3D AsmReadMsr64 (0xC0000080); - MsrRegisters |=3D BIT11; - AsmWriteMsr64 (0xC0000080, MsrRegisters); + MsrRegisters =3D AsmReadMsr64 (0xC0000080); + if ((MsrRegisters & BIT11) =3D=3D 0) { + MsrRegisters |=3D BIT11; + AsmWriteMsr64 (0xC0000080, MsrRegisters); + } } =20 /** --=20 2.29.2.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#88124): https://edk2.groups.io/g/devel/message/88124 Mute This Topic: https://groups.io/mt/90080012/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-