1 #ifndef __VMM_SHADOW_PAGING_H
2 #define __VMM_SHADOW_PAGING_H
6 #include <palacios/vmm_util.h>
7 #include <palacios/vmm_paging.h>
9 struct shadow_page_state {
11 // these two reflect the top-level page directory
12 // of the guest page table
13 paging_mode_t guest_mode;
14 ullong_t guest_cr3; // points to guest's current page table
16 // Should this be here??
19 // these two reflect the top-level page directory
20 // of the shadow page table
21 paging_mode_t shadow_mode;
35 int init_shadow_page_state(struct shadow_page_state * state);
38 addr_t create_new_shadow_pt32(struct guest_info * info);
40 addr_t setup_shadow_pt32(struct guest_info * info, addr_t virt_cr3);
41 addr_t setup_shadow_pte32(struct guest_info * info, addr_t pt_host_addr);
43 int handle_shadow_pagefault(struct guest_info * info, addr_t fault_addr, pf_error_t error_code);
44 int handle_shadow_pagefault32(struct guest_info * info, addr_t fault_addr, pf_error_t error_code);
46 int handle_shadow_pde32_fault(struct guest_info * info,
48 pf_error_t error_code,
53 int handle_shadow_pte32_fault(struct guest_info* info,
55 pf_error_t error_code,
61 int handle_shadow_invlpg(struct guest_info * info);