X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmx.c;h=b9f99bd04f3e99228eb236aac641932da30a6c67;hb=0c31bb41ac41d04a891a6eeff5bae398fa89b419;hp=e8d32edb296c706730e843e2836d26c894542ad9;hpb=1cd3b14a43f9c550a74c25dff43177e55192ceb1;p=palacios.git diff --git a/palacios/src/palacios/vmx.c b/palacios/src/palacios/vmx.c index e8d32ed..b9f99bd 100644 --- a/palacios/src/palacios/vmx.c +++ b/palacios/src/palacios/vmx.c @@ -341,7 +341,7 @@ static int init_vmcs_bios(struct guest_info * info, struct vmx_data * vmx_state) #define VMXASSIST_GDT 0x10000 addr_t vmxassist_gdt = 0; - if (guest_pa_to_host_va(info, VMXASSIST_GDT, &vmxassist_gdt) == -1) { + if (v3_gpa_to_hva(info, VMXASSIST_GDT, &vmxassist_gdt) == -1) { PrintError("Could not find VMXASSIST GDT destination\n"); return -1; } @@ -375,7 +375,7 @@ static int init_vmcs_bios(struct guest_info * info, struct vmx_data * vmx_state) extern uint8_t v3_vmxassist_end[]; addr_t vmxassist_dst = 0; - if (guest_pa_to_host_va(info, VMXASSIST_START, &vmxassist_dst) == -1) { + if (v3_gpa_to_hva(info, VMXASSIST_START, &vmxassist_dst) == -1) { PrintError("Could not find VMXASSIST destination\n"); return -1; } @@ -494,7 +494,7 @@ static int update_irq_entry_state(struct guest_info * info) { int_info.valid = 1; #ifdef CONFIG_DEBUG_INTERRUPTS - PrintDebug("Injecting exception %d (EIP=%p)\n", int_info.vector, (void *)info->rip); + PrintDebug("Injecting exception %d (EIP=%p)\n", int_info.vector, (void *)(addr_t)info->rip); #endif check_vmcs_write(VMCS_ENTRY_INT_INFO, int_info.value); @@ -536,7 +536,7 @@ static int update_irq_entry_state(struct guest_info * info) { PrintDebug("Injecting Interrupt %d at exit %u(EIP=%p)\n", info->intr_core_state.irq_vector, (uint32_t)info->num_exits, - (void *)info->rip); + (void *)(addr_t)info->rip); #endif check_vmcs_write(VMCS_ENTRY_INT_INFO, ent_int.value); @@ -828,9 +828,9 @@ void v3_init_vmx_cpu(int cpu_id) { ); #elif __V3_32BIT__ __asm__ __volatile__ ( - "movq %%cr4, %%ecx;" - "orq $0x00002000, %%ecx;" - "movq %%ecx, %0;" + "movl %%cr4, %%ecx;" + "orl $0x00002000, %%ecx;" + "movl %%ecx, %0;" : "=m"(ret) : : "%ecx" @@ -838,7 +838,7 @@ void v3_init_vmx_cpu(int cpu_id) { if ((~ret & tmp_msr.value) == 0) { __asm__ __volatile__ ( - "movq %0, %%cr4;" + "movl %0, %%cr4;" : : "q"(ret) ); @@ -848,9 +848,9 @@ void v3_init_vmx_cpu(int cpu_id) { } __asm__ __volatile__ ( - "movq %%cr0, %%ecx; " - "orq $0x00000020,%%ecx; " - "movq %%ecx, %%cr0;" + "movl %%cr0, %%ecx; " + "orl $0x00000020,%%ecx; " + "movl %%ecx, %%cr0;" : : : "%ecx"