hv: remove the constraint "MMU and EPT must both support large page or not"

There're some virtual platform which doesn't meet this constraint. So remove
this constraint.

Tracked-On: #6329
Signed-off-by: Fei Li <fei1.li@intel.com>
This commit is contained in:
Fei Li 2021-07-29 10:30:51 +08:00 committed by wenlingz
parent e1da33b031
commit 481e9fba9d
2 changed files with 2 additions and 6 deletions

View File

@ -430,11 +430,6 @@ static int32_t check_vmx_mmu_cap(void)
} else if (!pcpu_has_vmx_ept_vpid_cap(VMX_EPT_2MB_PAGE)) {
printf("%s, ept not support 2MB large page\n", __func__);
ret = -ENODEV;
} else if (pcpu_has_vmx_ept_vpid_cap(VMX_EPT_1GB_PAGE) !=
pcpu_has_cap(X86_FEATURE_PAGE1GB)) {
/* This just for simple large_page_support in arch/x86/page.c */
ret = -ENODEV;
printf("%s ept support 1GB large page while mmu is not or opposite\n", __func__);
} else {
/* No other state currently, do nothing */
}

View File

@ -29,6 +29,7 @@
#include <types.h>
#include <asm/lib/atomic.h>
#include <asm/cpufeatures.h>
#include <asm/pgtable.h>
#include <asm/cpu_caps.h>
#include <asm/mmu.h>
@ -72,7 +73,7 @@ static inline bool ppt_large_page_support(enum _page_table_level level, __unused
if (level == IA32E_PD) {
support = true;
} else if (level == IA32E_PDPT) {
support = pcpu_has_vmx_ept_vpid_cap(VMX_EPT_1GB_PAGE);
support = pcpu_has_cap(X86_FEATURE_PAGE1GB);
} else {
support = false;
}