Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


moved VM runstate settings to avoid race condition
Jack Lange [Tue, 1 Nov 2011 23:42:35 +0000 (19:42 -0400)]
palacios/src/palacios/svm.c
palacios/src/palacios/vmm.c
palacios/src/palacios/vmx.c

index 95d9e6c..ce6fe5d 100644 (file)
@@ -673,7 +673,6 @@ int v3_start_svm_guest(struct guest_info * info) {
 
     if (info->vcpu_id == 0) {
        info->core_run_state = CORE_RUNNING;
-       info->vm_info->run_state = VM_RUNNING;
     } else  { 
        PrintDebug("SVM core %u (on %u): Waiting for core initialization\n", info->vcpu_id, info->pcpu_id);
 
index afc8c1c..5420759 100644 (file)
@@ -270,6 +270,8 @@ int v3_start_vm(struct v3_vm_info * vm, unsigned int cpu_mask) {
        return -1;
     }
 
+    vm->run_state = VM_RUNNING;
+
     // Spawn off threads for each core. 
     // We work backwards, so that core 0 is always started last.
     for (i = 0, vcore_id = vm->num_cores - 1; (i < MAX_CORES) && (vcore_id >= 0); i++) {
index bc45c9b..5746e93 100644 (file)
@@ -820,8 +820,6 @@ int v3_vmx_enter(struct guest_info * info) {
 
     if (vmx_info->state == VMX_UNLAUNCHED) {
        vmx_info->state = VMX_LAUNCHED;
-
-       info->vm_info->run_state = VM_RUNNING;
        ret = v3_vmx_launch(&(info->vm_regs), info, &(info->ctrl_regs));
     } else {
        V3_ASSERT(vmx_info->state != VMX_UNLAUNCHED);
@@ -914,7 +912,6 @@ int v3_start_vmx_guest(struct guest_info * info) {
 
     if (info->vcpu_id == 0) {
        info->core_run_state = CORE_RUNNING;
-       info->vm_info->run_state = VM_RUNNING;
     } else {
 
         PrintDebug("VMX core %u: Waiting for core initialization\n", info->vcpu_id);