hv: ept: build 4KB page mapping in EPT for code pages of rtvm

RTVM is enforced to use 4KB pages to mitigate CVE-2018-12207 and performance jitter,
which may be introduced by splitting large page into 4KB pages on demand. It works
fine in previous hardware platform where the size of address space for the RTVM is
relatively small. However, this is a problem when the platforms support 64 bits
high MMIO space, which could be super large and therefore consumes large # of
EPT page table pages.

This patch optimize it by using large page for purely data pages, such as MMIO spaces,
even for the RTVM.

Signed-off-by: Li Fei1 <fei1.li@intel.com>
Tracked-On: #5788
This commit is contained in:
Li Fei1
2021-03-02 14:51:11 +08:00
committed by wenlingz
parent afe6a67a9f
commit b4a23e6c13
4 changed files with 20 additions and 8 deletions

View File

@@ -68,7 +68,7 @@ struct page_pool {
struct memory_ops {
struct page_pool *pool;
bool (*large_page_support)(enum _page_table_level level);
bool (*large_page_support)(enum _page_table_level level, uint64_t prot);
uint64_t (*get_default_access_right)(void);
uint64_t (*pgentry_present)(uint64_t pte);
void (*clflush_pagewalk)(const void *p);