#include <palacios/vm_guest_mem.h>
#include <palacios/vmx.h>
+#ifndef CONFIG_DEBUG_VMX
+#undef PrintDebug
+#define PrintDebug(fmt, args...)
+#endif
+
static void vmx_save_world_ctx(struct guest_info * info, struct vmx_assist_context * ctx);
static void vmx_restore_world_ctx(struct guest_info * info, struct vmx_assist_context * ctx);
return -1;
}
- if (vmx_info->state == VMXASSIST_DISABLED) {
+ if (vmx_info->assist_state == VMXASSIST_DISABLED) {
/* 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->state = VMXASSIST_ENABLED;
+ vmx_info->assist_state = VMXASSIST_ENABLED;
- } else if (vmx_info->state == VMXASSIST_ENABLED) {
+ } else if (vmx_info->assist_state == VMXASSIST_ENABLED) {
/* restore old context */
vmx_restore_world_ctx(info, old_ctx);
- vmx_info->state = VMXASSIST_DISABLED;
+ vmx_info->assist_state = VMXASSIST_DISABLED;
}
return 0;