#include <palacios/vmm_direct_paging.h>
-#ifndef DEBUG_SHADOW_PAGING
+#ifdef CONFIG_SYMBIOTIC_SWAP
+#include <palacios/vmm_sym_swap.h>
+#endif
+
+#ifndef CONFIG_DEBUG_SHADOW_PAGING
#undef PrintDebug
#define PrintDebug(fmt, args...)
#endif
static int inject_guest_pf(struct guest_info * info, addr_t fault_addr, pf_error_t error_code) {
+
+#ifdef CONFIG_PROFILE_VMM
if (info->enable_profiler) {
info->profiler.guest_pf_cnt++;
}
+#endif
info->ctrl_regs.cr2 = fault_addr;
+
return v3_raise_exception_with_error(info, PF_EXCEPTION, *(uint_t *)&error_code);
}
return 1;
}
- if ((shadow_access == PT_ACCESS_NOT_PRESENT) &&
- (guest_access == PT_ACCESS_NOT_PRESENT)) {
+ /*
+ if ((shadow_access == PT_ACCESS_NOT_PRESENT) &&
+ (guest_access == PT_ACCESS_NOT_PRESENT)) {
+ // Page tables completely blank, handle guest first
+ return 1;
+ }
+ */
+
+ if (guest_access == PT_ACCESS_NOT_PRESENT) {
// Page tables completely blank, handle guest first
return 1;
}
-
+
// Otherwise we'll handle the guest fault later...?
}