KVM: x86/mmu: Allocate pml4_root for guest PAE mode shadowing
Intel inclusion category: bugfix bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8UBIZ CVE: NA ---------------------------------------------------------------------- Add the missing allocation for pml4_root. Current mmu_alloc_special_roots() is broken, when - L0 host is an AMD CPU, running in 64-bit mode && - L1 VMM is running in 32-bit/PAE mode && - L1 VMM is trying to create L2 guest using NPT. The error is caused by a mistake when trying to solve the conflict, to backport the upstreaming commit 748e52b9 ("KVM: x86/mmu: Allocate pae_root and lm_root pages in dedicated helper"). Fix it by adding the missing allocation of pml4_root. Note: this error shall NOT affect any Intel platform, because an Intel host does not need any special root: - when EPT is disabled/un-supported, 64-bit host will use PAE shadow page table for 32-bit guest; - when EPT is enabled, its level is either 4-level or 5-level, regardless of the guest/host paging mode, no need to allocate any special root either. Fixes: cd414417 ("KVM: x86/mmu: Allocate pae_root and lm_root pages in dedicated helper") Signed-off-by:Yu Zhang <yu.c.zhang@linux.intel.com>
Loading
Please sign in to comment