From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 167FD9410B7 for ; Wed, 10 Jan 2024 05:43:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=gGqPNmk1z2liJVLHXMLmkmU1glLo6qUi5kEC4Xwvw90=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1704865408; v=1; b=fzJj+OkG4tEU6eWZQZAAm+32BOhJwaTg69TvhgERqznSeEksDW4EFpxBwhfTQOTTLiZ+i75Z 24eq7E6NM3N+tj8PhZHREP2ZAc8qM37fQH1hHfs6AXlvFyNQ7ntKUxWgXv7qeUMm7Qxtp4ZaE/d CuzDm+hlA6EsK/qs6btSRGbY= X-Received: by 127.0.0.2 with SMTP id LXPVYY7687511xyuXSubP8l2; Tue, 09 Jan 2024 21:43:28 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.6028.1704865407694700882 for ; Tue, 09 Jan 2024 21:43:28 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10947"; a="462700194" X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="462700194" X-Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 21:43:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,184,1695711600"; d="scan'208";a="16520155" X-Received: from shwdesfp01.ccr.corp.intel.com ([10.239.158.151]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2024 21:43:25 -0800 From: "Zhiguang Liu" To: devel@edk2.groups.io Cc: Zhiguang Liu , Ray Ni , Laszlo Ersek , Rahul Kumar , Gerd Hoffmann Subject: [edk2-devel] [PATCH] UefiCpuPkg/CpuMpPei: Don't write CR3 in ConvertMemoryPageToNotPresent Date: Wed, 10 Jan 2024 13:43:18 +0800 Message-Id: <20240110054318.997-1-zhiguang.liu@intel.com> MIME-Version: 1.0 Precedence: Bulk 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,zhiguang.liu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: aZGdveGwsfHfg9hkR9lwL18qx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=fzJj+OkG; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io After ConvertMemoryPageToNotPresent, there is always a flush TLB function. So, to improve performance, there is no need to write CR3 inside ConvertMemoryPageToNotPresent Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Zhiguang Liu --- UefiCpuPkg/CpuMpPei/CpuPaging.c | 1 - 1 file changed, 1 deletion(-) diff --git a/UefiCpuPkg/CpuMpPei/CpuPaging.c b/UefiCpuPkg/CpuMpPei/CpuPaging.c index 15c7015fb8..c6894458f7 100644 --- a/UefiCpuPkg/CpuMpPei/CpuPaging.c +++ b/UefiCpuPkg/CpuMpPei/CpuPaging.c @@ -167,7 +167,6 @@ ConvertMemoryPageToNotPresent ( } ASSERT_EFI_ERROR (Status); - AsmWriteCr3 (PageTable); return Status; } -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113514): https://edk2.groups.io/g/devel/message/113514 Mute This Topic: https://groups.io/mt/103636435/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-