X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..060df5ea7c632b1ac8cc8aac1fb59758165c2084:/osfmk/i386/vmx/vmx_asm.h diff --git a/osfmk/i386/vmx/vmx_asm.h b/osfmk/i386/vmx/vmx_asm.h index 78722ec86..bd0de4688 100644 --- a/osfmk/i386/vmx/vmx_asm.h +++ b/osfmk/i386/vmx/vmx_asm.h @@ -35,10 +35,6 @@ #include #include -#ifndef DEBUG -#include -#endif - #define VMX_FAIL_INVALID -1 #define VMX_FAIL_VALID -2 #define VMX_SUCCEED 0 @@ -61,7 +57,7 @@ static inline void enter_compat_mode(void) { ".word %P0 \n\t" ".code32 \n\t" "5:" - :: "i" (KERNEL_CS) + :: "i" (KERNEL32_CS) ); } @@ -99,6 +95,9 @@ static inline int __vmxoff(void) { int result; +#if defined (__x86_64__) + __VMXOFF(result); +#else if (ml_is64bit()) { /* don't put anything between these lines! */ enter_64bit_mode(); @@ -107,6 +106,7 @@ __vmxoff(void) } else { __VMXOFF(result); } +#endif return result; } @@ -118,6 +118,9 @@ __vmxoff(void) __vmxon(addr64_t *v) { int result; +#if defined (__x86_64__) + __VMXON(v, result); +#else if (ml_is64bit()) { /* don't put anything between these lines! */ enter_64bit_mode(); @@ -126,6 +129,7 @@ __vmxon(addr64_t *v) } else { __VMXON(v, result); } +#endif return result; }