]> git.proxmox.com Git - mirror_edk2.git/commit - UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
UefiCpuPkg/PiSmmCpu: relax superpage protection on page split.
authorJiewen Yao <jiewen.yao@intel.com>
Mon, 28 Nov 2016 13:45:40 +0000 (21:45 +0800)
committerJiewen Yao <jiewen.yao@intel.com>
Wed, 30 Nov 2016 12:12:43 +0000 (20:12 +0800)
commite50f951286d8dbc35404e01dd77b9eacfb16191f
treecba21eee5376fbbeef968c45148c6f6a5a06a08d
parent78c7bce8f5422151c0148d9f40d138fd9007a59a
UefiCpuPkg/PiSmmCpu: relax superpage protection on page split.

PiSmmCpu driver may split page for page attribute request.
Current logic not only propagates the super page attribute to
the leaf page attribut, but also to the directory page attribute.

However, the later might be wrong because we cannot clear protection
without touching directory page attribute.
The effective protection is the strictest combination
across the levels.

We should always clear protection on directory page and set
protection on leaf page for easy clearing later.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c