hv: mmu: add static paging table allocation for EPT

Add static paging table allocation API for EPT.
Note: must configure SOS/UOS_REAM_SIZE exactly as the platform.

Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1
2018-11-02 02:25:15 +08:00
committed by lijinxia
parent dc9d18a868
commit 9c7c0de08f
5 changed files with 141 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
#define VM_H_
#include <bsp_extern.h>
#include <vpci.h>
#include <page.h>
#ifdef CONFIG_PARTITION_MODE
#include <mptable.h>
@@ -97,6 +98,8 @@ struct vm_arch {
* but Normal World can not access Secure World's memory.
*/
void *sworld_eptp;
struct memory_ops ept_mem_ops;
void *tmp_pg_array; /* Page array for tmp guest paging struct */
struct acrn_vioapic vioapic; /* Virtual IOAPIC base address */
struct acrn_vpic vpic; /* Virtual PIC */

View File

@@ -25,6 +25,7 @@ union pgtable_pages_info {
struct page *pt_base;
} ppt;
struct {
uint64_t top_address_space;
struct page *nworld_pml4_base;
struct page *nworld_pdpt_base;
struct page *nworld_pd_base;
@@ -44,5 +45,6 @@ struct memory_ops {
};
extern const struct memory_ops ppt_mem_ops;
void init_ept_mem_ops(struct vm *vm);
#endif /* PAGE_H */

View File

@@ -12,6 +12,8 @@
#define MMC_PROD_NAME_WITH_PSN_LEN 15U
#define BUP_MKHI_BOOTLOADER_SEED_LEN 64U
#define TRUSTY_RAM_SIZE (16UL * 1024UL * 1024UL) /* 16 MB for now */
/* Trusty EPT rebase gpa: 511G */
#define TRUSTY_EPT_REBASE_GPA (511UL * 1024UL * 1024UL * 1024UL)