From: Jack Lange Date: Thu, 13 Aug 2009 23:46:33 +0000 (-0500) Subject: minor build fixes for i386 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=696946489be862ccd0399804557971879bec120d minor build fixes for i386 --- diff --git a/Makefile.i386 b/Makefile.i386 index 121d1bd..1d82a31 100644 --- a/Makefile.i386 +++ b/Makefile.i386 @@ -5,5 +5,5 @@ # -mpreferred-stack-boundary=2 is essential in preventing gcc 4.2.x # from aligning stack to 16 bytes. (Which is gcc's way of supporting SSE). CFLAGS += $(call cc-option,-m32,) -D__V3_32BIT__ +AFLAGS += $(call cc-option,-m32,) -D__V3_32BIT__ LDFLAGS += -melf_i386 -AFLAGS += -D__V3_32BIT__ diff --git a/Makefile.x86_64 b/Makefile.x86_64 index 7937c1e..d070ae7 100644 --- a/Makefile.x86_64 +++ b/Makefile.x86_64 @@ -5,5 +5,5 @@ # -mpreferred-stack-boundary=2 is essential in preventing gcc 4.2.x # from aligning stack to 16 bytes. (Which is gcc's way of supporting SSE). CFLAGS += $(call cc-option,-m64,) -D__V3_64BIT__ -AFLAGS += -D__V3_64BIT__ +AFLAGS += $(call cc-option,-m64,) -D__V3_64BIT__ LDFLAGS += -melf_x86_64 diff --git a/palacios/src/palacios/vmx.c b/palacios/src/palacios/vmx.c index ed3fe92..14f6bdc 100644 --- a/palacios/src/palacios/vmx.c +++ b/palacios/src/palacios/vmx.c @@ -522,9 +522,9 @@ static int init_vmx_guest(struct guest_info * info, struct v3_vm_config * config /* Print Control MSRs */ v3_get_msr(VMX_CR0_FIXED0_MSR, &(tmp_msr.hi), &(tmp_msr.lo)); - PrintDebug("CR0 MSR: %p\n", (void*)tmp_msr.value); + PrintDebug("CR0 MSR: %p\n", (void *)(addr_t)tmp_msr.value); v3_get_msr(VMX_CR4_FIXED0_MSR, &(tmp_msr.hi), &(tmp_msr.lo)); - PrintDebug("CR4 MSR: %p\n", (void*)tmp_msr.value); + PrintDebug("CR4 MSR: %p\n", (void *)(addr_t)tmp_msr.value); #define GUEST_CR0 0x80000031 @@ -615,10 +615,10 @@ static int init_vmx_guest(struct guest_info * info, struct v3_vm_config * config info->segments.gdtr.base = VMXASSIST_GDT; #define VMXASSIST_TSS 0x40000 - addr_t vmxassist_tss = VMXASSIST_TSS; + uint64_t vmxassist_tss = VMXASSIST_TSS; gdt[0x08 / sizeof(gdt[0])] |= - ((vmxassist_tss & 0xFF000000) << (56-24)) | - ((vmxassist_tss & 0x00FF0000) << (32-16)) | + ((vmxassist_tss & 0xFF000000) << (56 - 24)) | + ((vmxassist_tss & 0x00FF0000) << (32 - 16)) | ((vmxassist_tss & 0x0000FFFF) << (16)) | (8392 - 1); @@ -651,7 +651,7 @@ static int init_vmx_guest(struct guest_info * info, struct v3_vm_config * config vmx_ret |= check_vmcs_write(VMCS_GUEST_DR7, 0x400); - vmx_ret |= check_vmcs_write(VMCS_LINK_PTR, 0xffffffffffffffff); + vmx_ret |= check_vmcs_write(VMCS_LINK_PTR, (addr_t)0xffffffffffffffffULL); if(v3_update_vmcs_ctrl_fields(info)) { PrintError("Could not write control fields!\n");