X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_lowlevel.h;h=b7f46fafe2214800457a2ed94a1ab945d2e39de9;hb=39849abeb743c4e6b669a790c307979fa8d51884;hp=ea32b2308ade96424f54e587a87962aba941f7fd;hpb=04977d080b9850506ced2523b6130abc517b61df;p=palacios.git diff --git a/palacios/include/palacios/vmm_lowlevel.h b/palacios/include/palacios/vmm_lowlevel.h index ea32b23..b7f46fa 100644 --- a/palacios/include/palacios/vmm_lowlevel.h +++ b/palacios/include/palacios/vmm_lowlevel.h @@ -23,40 +23,40 @@ #ifdef __V3_32BIT__ 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; + __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__ void __inline__ v3_cpuid(uint_t target, addr_t * eax, addr_t * ebx, addr_t * ecx, addr_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) - ); - return; + __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) + ); + return; } #endif void __inline__ v3_set_msr(uint_t msr, uint_t high_byte, uint_t low_byte) { - __asm__ __volatile__ ( - "wrmsr" - : - : "c" (msr), "d" (high_byte), "a" (low_byte) - ); + __asm__ __volatile__ ( + "wrmsr" + : + : "c" (msr), "d" (high_byte), "a" (low_byte) + ); } @@ -64,20 +64,20 @@ void __inline__ v3_set_msr(uint_t msr, uint_t high_byte, uint_t low_byte) { void __inline__ v3_get_msr(uint_t msr, uint_t * high_byte, uint_t * low_byte) { - __asm__ __volatile__ ( - "rdmsr" - : "=d" (*high_byte), "=a" (*low_byte) - : "c" (msr) - ); + __asm__ __volatile__ ( + "rdmsr" + : "=d" (*high_byte), "=a" (*low_byte) + : "c" (msr) + ); } void __inline__ v3_enable_ints() { - __asm__ __volatile__ ("sti"); + __asm__ __volatile__ ("sti"); } void __inline__ v3_disable_ints() { - __asm__ __volatile__ ("cli"); + __asm__ __volatile__ ("cli"); }