]> xenbits.xensource.com Git - ovmf.git/commitdiff
UefiCpuPkg/CpuPageTableLib:Clear PageSize bit(Bit7) for non-leaf
authorDun Tan <dun.tan@intel.com>
Mon, 20 Mar 2023 01:40:01 +0000 (09:40 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 27 Mar 2023 08:21:58 +0000 (08:21 +0000)
Clear PageSize bit(Bit7) for non-leaf entry in PageTableLibSetPnle.
This function is used to set non-leaf entry attributes so it should
make sure that the PageSize bit of the entry should be 0.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c

index b94ef07c56be870e9ae0c0bc825c0dfa1fd90971..57f1db203b9adf058092ade29bdf307d7dddf298 100644 (file)
@@ -202,7 +202,8 @@ PageTableLibSetPnle (
     Pnle->Bits.Nx = Attribute->Bits.Nx;\r
   }\r
 \r
-  Pnle->Bits.Accessed = 0;\r
+  Pnle->Bits.Accessed   = 0;\r
+  Pnle->Bits.MustBeZero = 0;\r
 \r
   //\r
   // Set the attributes (WT, CD, A) to 0.\r