-
/*
* This file is part of the Palacios Virtual Machine Monitor developed
* by the V3VEE Project with funding from the United States National
int status;
// Call arch-independent handler
- if ((status = v3_handle_efer_write(core, msr, src, priv_data)) != 0)
+ if ((status = v3_handle_efer_write(core, msr, src, priv_data)) != 0) {
return status;
+ }
// SVM-specific code
- if (core->shdw_pg_mode == NESTED_PAGING) {
+ {
// Ensure that hardware visible EFER.SVME bit is set (SVM Enable)
struct efer_64 * hw_efer = (struct efer_64 *)&(core->ctrl_regs.efer);
hw_efer->svme = 1;
v3_time_enter_vm(info);
guest_ctrl->TSC_OFFSET = v3_tsc_host_offset(&info->time_state);
+ if(info->core_move_state == CORE_MOVE_PENDING) {
+ v3_stgi();
+
+ if(V3_MOVE_THREAD_TO_CPU(info->target_pcpu_id, info->core_thread) != 0){
+ PrintError("Failed to move Vcore %d to CPU %d\n",
+ info->vcpu_id,
+ info->target_pcpu_id);
+ } else {
+ info->pcpu_id = info->target_pcpu_id;
+ V3_Print("Core move done, vcore %d is running on CPU %d now\n",
+ info->vcpu_id,
+ V3_Get_CPU());
+ }
+
+ info->core_move_state = CORE_MOVE_DONE;
+
+ /* disable global interrupts,
+ * NOTE now it is being running on a different CPU
+ */
+ v3_clgi();
+ }
+
+
+
//V3_Print("Calling v3_svm_launch\n");
v3_svm_launch((vmcb_t *)V3_PAddr(info->vmm_data), &(info->vm_regs), (vmcb_t *)host_vmcbs[V3_Get_CPU()]);