X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_lowlevel.h;h=8e85162fcf9a8f77e8425df7844c60b412af8b99;hp=109c6d20c51409f4f8690acb5bc8e72a04124e51;hb=c06413341bf1dca02f22c0502fa5c2d1c2c11eab;hpb=50dd6f837443d6f5a8cfb2410f1f8d95e8367b6a diff --git a/palacios/include/palacios/vmm_lowlevel.h b/palacios/include/palacios/vmm_lowlevel.h index 109c6d2..8e85162 100644 --- a/palacios/include/palacios/vmm_lowlevel.h +++ b/palacios/include/palacios/vmm_lowlevel.h @@ -24,36 +24,18 @@ #define CPUID_EXT_FEATURE_IDS 0x80000001 -#ifdef __V3_32BIT__ - -static void __inline__ v3_cpuid(uint_t target, addr_t * eax, addr_t * ebx, addr_t * ecx, addr_t * edx) { - __asm__ __volatile__ ( - "pushl %%ebx\n\t" - "cpuid\n\t" - "movl %%ebx, %%esi\n\t" - "popl %%ebx\n\t" - : "=a" (*eax), "=S" (*ebx), "=c" (*ecx), "=d" (*edx) - : "a" (target) - ); - return; -} - -#elif __V3_64BIT__ -static void __inline__ v3_cpuid(uint_t target, addr_t * eax, addr_t * ebx, addr_t * ecx, addr_t * edx) { +static void __inline__ v3_cpuid(uint32_t target, + uint32_t * eax, uint32_t * ebx, + uint32_t * ecx, uint32_t * edx) { __asm__ __volatile__ ( - "pushq %%rbx\n\t" "cpuid\n\t" - "movq %%rbx, %%rsi\n\t" - "popq %%rbx\n\t" : "=a" (*eax), "=S" (*ebx), "=c" (*ecx), "=d" (*edx) - : "a" (target) + : "0" (target), "2" (*ecx) ); return; } -#endif - static void __inline__ v3_set_msr(uint_t msr, uint_t high_byte, uint_t low_byte) { __asm__ __volatile__ (