#include <palacios/vmx.h>
#include <palacios/vmm_ctrl_regs.h>
-#ifndef CONFIG_DEBUG_VMX
+#ifndef V3_CONFIG_DEBUG_VMX
#undef PrintDebug
#define PrintDebug(fmt, args...)
#endif
-#define VMXASSIST_GDT 0x10000
-#define VMXASSIST_TSS 0x40000
-#define VMXASSIST_START 0xd0000
-#define VMXASSIST_1to1_PT 0xde000 // We'll shove this at the end, and pray to god VMXASSIST doesn't mess with it
+
#define VMXASSIST_MAGIC 0x17101966
return -1;
}
- if (vmx_info->assist_state == VMXASSIST_DISABLED) {
+ if (vmx_info->assist_state == VMXASSIST_OFF) {
/* Save the old Context */
vmx_save_world_ctx(info, old_ctx);
/* restore new context, vmxassist should launch the bios the first time */
vmx_restore_world_ctx(info, new_ctx);
- vmx_info->assist_state = VMXASSIST_ENABLED;
+ vmx_info->assist_state = VMXASSIST_ON;
- } else if (vmx_info->assist_state == VMXASSIST_ENABLED) {
+ } else if (vmx_info->assist_state == VMXASSIST_ON) {
/* restore old context */
vmx_restore_world_ctx(info, old_ctx);
- vmx_info->assist_state = VMXASSIST_DISABLED;
+ vmx_info->assist_state = VMXASSIST_OFF;
}
return 0;
((struct cr0_32 *)&(core->shdw_pg_state.guest_cr0))->pe = 1;
((struct cr0_32 *)&(core->shdw_pg_state.guest_cr0))->wp = 1;
+ ((struct cr0_32 *)&(core->shdw_pg_state.guest_cr0))->ne = 1;
// Setup segment registers
memcpy((void *)vmxassist_dst, v3_vmxassist_start, v3_vmxassist_end - v3_vmxassist_start);
- vmx_state->assist_state = VMXASSIST_DISABLED;
+ vmx_state->assist_state = VMXASSIST_OFF;
}