#include <palacios/vm_guest.h>
-#ifndef DEBUG_NESTED_PAGING
+#ifndef CONFIG_DEBUG_NESTED_PAGING
#undef PrintDebug
#define PrintDebug(fmt, args...)
#endif
}
int v3_reset_passthrough_pts(struct guest_info * info) {
- v3_vm_cpu_mode_t mode = v3_get_cpu_mode(info);
+ v3_cpu_mode_t mode = v3_get_vm_cpu_mode(info);
// Delete the old direct map page tables
switch(mode) {
int v3_handle_passthrough_pagefault(struct guest_info * info, addr_t fault_addr, pf_error_t error_code) {
- v3_vm_cpu_mode_t mode = v3_get_cpu_mode(info);
+ v3_cpu_mode_t mode = v3_get_vm_cpu_mode(info);
switch(mode) {
case REAL:
int v3_handle_nested_pagefault(struct guest_info * info, addr_t fault_addr, pf_error_t error_code) {
- // THIS IS VERY BAD
- v3_vm_cpu_mode_t mode = LONG;
+ v3_cpu_mode_t mode = v3_get_host_cpu_mode();
- PrintDebug("Nested PageFault: fault_addr=%p, error_code=%u\n",(void*)fault_addr, *(uint_t *)&error_code);
+ PrintDebug("Nested PageFault: fault_addr=%p, error_code=%u\n", (void *)fault_addr, *(uint_t *)&error_code);
switch(mode) {
case REAL:
}
int v3_invalidate_passthrough_addr(struct guest_info * info, addr_t inv_addr) {
- v3_vm_cpu_mode_t mode = v3_get_cpu_mode(info);
+ v3_cpu_mode_t mode = v3_get_vm_cpu_mode(info);
switch(mode) {
case REAL:
int v3_invalidate_nested_addr(struct guest_info * info, addr_t inv_addr) {
- v3_vm_cpu_mode_t mode = LONG;
+ v3_cpu_mode_t mode = LONG;
switch(mode) {
case REAL: