From: Patrick G. Bridges Date: Thu, 3 Nov 2011 18:27:19 +0000 (-0600) Subject: Merge branch 'devel' of ssh://newskysaw.cs.northwestern.edu/home/palacios/palacios... X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=4802f102fc2df8435399eb26cebd34e681cb41ad;hp=840121eda3c81889ddeba5374bd5bd2005e572ed Merge branch 'devel' of ssh://newskysaw.cs.northwestern.edu/home/palacios/palacios into devel --- diff --git a/linux_module/iface-file.c b/linux_module/iface-file.c index 96a2477..5489764 100644 --- a/linux_module/iface-file.c +++ b/linux_module/iface-file.c @@ -204,9 +204,12 @@ static void * palacios_file_open(const char * path, int mode, void * private_dat } + pfile->mode |= O_LARGEFILE; + + pfile->filp = filp_open(path, pfile->mode, 0); - if (pfile->filp == NULL) { + if (IS_ERR(pfile->filp)) { printk("Cannot open file: %s\n", path); return NULL; } diff --git a/palacios/include/palacios/vmm_instr_decoder.h b/palacios/include/palacios/vmm_instr_decoder.h index 53831c4..ce494e7 100644 --- a/palacios/include/palacios/vmm_instr_decoder.h +++ b/palacios/include/palacios/vmm_instr_decoder.h @@ -681,7 +681,6 @@ static int decode_rm_operand32(struct guest_info * core, } if (has_sib_byte) { - instr_cursor += 1; struct sib_byte * sib = (struct sib_byte *)(instr_cursor); int scale = 0x1 << sib->scale; @@ -736,6 +735,9 @@ static int decode_rm_operand32(struct guest_info * core, case 5: if (modrm->mod != 0) { base_addr += ADDR_MASK(gprs->rbp, 4); + } else { + mod_mode = DISP32; + base_addr = 0; } break; case 6: @@ -888,7 +890,6 @@ int decode_rm_operand64(struct guest_info * core, uint8_t * modrm_instr, } if (has_sib_byte) { - instr_cursor += 1; struct sib_byte * sib = (struct sib_byte *)(instr_cursor); int scale = 0x1 << sib->scale; uint8_t index_val = sib->index; @@ -972,6 +973,9 @@ int decode_rm_operand64(struct guest_info * core, uint8_t * modrm_instr, case 5: if (modrm->mod != 0) { base_addr += gprs->rbp; + } else { + mod_mode = DISP32; + base_addr = 0; } break; case 6: diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index 95d9e6c..ce6fe5d 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -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); diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index afc8c1c..5420759 100644 --- a/palacios/src/palacios/vmm.c +++ b/palacios/src/palacios/vmm.c @@ -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++) { diff --git a/palacios/src/palacios/vmx.c b/palacios/src/palacios/vmx.c index bc45c9b..5746e93 100644 --- a/palacios/src/palacios/vmx.c +++ b/palacios/src/palacios/vmx.c @@ -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);