euleros inclusion category: feature feature: etmem bugzilla: 48246
-------------------------------------------------
Function ept_pgd_range does not work for vm has 4 level page table. Call ept_p4d_range instead to fix this.
Signed-off-by: Kemeng Shi shikemeng@huawei.com --- fs/proc/etmem_scan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/proc/etmem_scan.c b/fs/proc/etmem_scan.c index cdc8f341af67..b4655c85f8c5 100644 --- a/fs/proc/etmem_scan.c +++ b/fs/proc/etmem_scan.c @@ -557,9 +557,8 @@ static int ept_page_range(struct page_idle_ctrl *pic,
ept_root = __va(mmu->root_hpa);
- // walk start at p4d when host enable 5 level table pages but - // vm only get 4 level table pages - if (mmu->shadow_root_level == 4 + (!!pgtable_l5_enabled())) + // Walk start at p4d when vm get 4 level table pages + if (mmu->shadow_root_level != 4) err = ept_pgd_range(pic, (pgd_t *)ept_root, addr, end, walk); else err = ept_p4d_range(pic, (p4d_t *)ept_root, addr, end, walk);