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=7863d1929230da04c12cea6598d68a978c29edd9;hb=c06413341bf1dca02f22c0502fa5c2d1c2c11eab;hpb=794a794cec97cecc8c7de7f8b5fe33381a1e02e0 diff --git a/palacios/include/palacios/vmm_lowlevel.h b/palacios/include/palacios/vmm_lowlevel.h index 7863d19..8e85162 100644 --- a/palacios/include/palacios/vmm_lowlevel.h +++ b/palacios/include/palacios/vmm_lowlevel.h @@ -20,36 +20,22 @@ #include -#ifdef __V3_32BIT__ +#define CPUID_FEATURE_IDS 0x00000001 +#define CPUID_EXT_FEATURE_IDS 0x80000001 -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__ ( @@ -92,7 +78,7 @@ static addr_t __inline__ v3_irq_save() { __asm__ __volatile__ ("pushf \n\t" "popl %0 \n\t" "cli \n\t" - :"=g" (x) + :"=g" (state) : :"memory" );