X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_lowlevel.h;h=eec0d91a29bda138054e1c64fc3a8d813ba19d88;hp=af1f8209caf98526fcafb0e8d4f3ce7138164333;hb=2cb41f7db5b9f89113432d6b3daff4807ba8e5f2;hpb=c0ecfba627c1d6c3f46d59bd4e5e6f883a494dc4 diff --git a/palacios/include/palacios/vmm_lowlevel.h b/palacios/include/palacios/vmm_lowlevel.h index af1f820..eec0d91 100644 --- a/palacios/include/palacios/vmm_lowlevel.h +++ b/palacios/include/palacios/vmm_lowlevel.h @@ -70,9 +70,14 @@ static void __inline__ v3_cpuid(uint32_t target, uint32_t * eax, uint32_t * ebx, uint32_t * ecx, uint32_t * edx) { #ifdef __V3_64BIT__ + // avoid rbx on -FPIC - gcc likes to own rbx even on 64 bit PIC code __asm__ __volatile__ ( + "pushq %%rbx\n\t" + "movq %%rdi, %%rbx\n\t" "cpuid\n\t" - : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx) + "movq %%rbx, %%rdi\n\t" + "popq %%rbx\n\t" + : "=a" (*eax), "=D" (*ebx), "=c" (*ecx), "=d" (*edx) : "0" (target), "2" (*ecx) ); #elif __V3_32BIT__