X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_paging.h;h=9b95d1b29c8474567e6f2cc46622be47f405f4cf;hb=4454a172129d12e97793c9c353339b85d3335af4;hp=ff396858b30dbb811b7adbcfda6046b0277d9633;hpb=9b4bfeefac09294a6f0ae12dbadf102eb547f5ec;p=palacios.git diff --git a/palacios/include/palacios/vmm_paging.h b/palacios/include/palacios/vmm_paging.h index ff39685..9b95d1b 100644 --- a/palacios/include/palacios/vmm_paging.h +++ b/palacios/include/palacios/vmm_paging.h @@ -92,7 +92,6 @@ the host state in the vmcs before entering the guest. - #define MAX_PDE32_ENTRIES 1024 #define MAX_PTE32_ENTRIES 1024 @@ -134,12 +133,14 @@ typedef enum {PAGE_4KB, PAGE_2MB, PAGE_4MB, PAGE_1GB, #define PAGE_BASE_ADDR_2MB(x) ((x) >> 21) #define PAGE_BASE_ADDR_4MB(x) ((x) >> 22) #define PAGE_BASE_ADDR_1GB(x) ((x) >> 30) +#define PAGE_BASE_ADDR_512GB(x) ((x) >> 39) #define BASE_TO_PAGE_ADDR(x) (((addr_t)x) << 12) #define BASE_TO_PAGE_ADDR_4KB(x) (((addr_t)x) << 12) #define BASE_TO_PAGE_ADDR_2MB(x) (((addr_t)x) << 21) #define BASE_TO_PAGE_ADDR_4MB(x) (((addr_t)x) << 22) #define BASE_TO_PAGE_ADDR_1GB(x) (((addr_t)x) << 30) +#define BASE_TO_PAGE_ADDR_512GB(x) (((addr_t)x) << 39) /* *** */ @@ -167,6 +168,7 @@ typedef enum {PAGE_4KB, PAGE_2MB, PAGE_4MB, PAGE_1GB, #define PAGE_SIZE_2MB (4096 * 512) #define PAGE_SIZE_4MB (4096 * 1024) #define PAGE_SIZE_1GB 0x40000000 +#define PAGE_SIZE_512GB (512ULL * PAGE_SIZE_1GB) /* *** */ @@ -186,13 +188,6 @@ typedef enum {PAGE_4KB, PAGE_2MB, PAGE_4MB, PAGE_1GB, - -/* Page Table Flag Values */ -#define PT32_HOOK 0x1 -#define V3_LARGE_PG 0x2 - - - /* We'll use the general form for now.... typedef enum {PDE32_ENTRY_NOT_PRESENT, PDE32_ENTRY_PTE32, PDE32_ENTRY_LARGE_PAGE} pde32_entry_type_t; typedef enum {PTE32_ENTRY_NOT_PRESENT, PTE32_ENTRY_PAGE} pte32_entry_type_t; @@ -212,6 +207,9 @@ typedef enum {PT_ENTRY_NOT_PRESENT, PT_ENTRY_LARGE_PAGE, PT_ENTRY_PAGE} pt_entry typedef enum {PT_ACCESS_OK, PT_ACCESS_NOT_PRESENT, PT_ACCESS_WRITE_ERROR, PT_ACCESS_USER_ERROR} pt_access_status_t; +/* Page table flag values */ +#define V3_LARGE_PG 0x2 + typedef struct gen_pt { uint_t present : 1; @@ -576,7 +574,7 @@ pml4e64_t * create_passthrough_pts_64(struct guest_info * info); void delete_page_tables_32(pde32_t * pde); -void delete_page_tables_32PAE(pdpe32pae_t * pdpe); +void delete_page_tables_32pae(pdpe32pae_t * pdpe); void delete_page_tables_64(pml4e64_t * pml4); @@ -586,7 +584,7 @@ const uchar_t * v3_page_type_to_str(page_type_t type); void PrintPTEntry(struct guest_info * info, page_type_t type, addr_t vaddr, void * entry); -void PrintHostPageTables(struct guest_info * info, addr_t cr3); +void PrintHostPageTables(struct guest_info * info, v3_cpu_mode_t cpu_mode, addr_t cr3); void PrintGuestPageTables(struct guest_info * info, addr_t cr3); void PrintHostPageTree(struct guest_info * info, addr_t virtual_addr, addr_t cr3); void PrintGuestPageTree(struct guest_info * info, addr_t virtual_addr, addr_t cr3);