- Timestamp:
- Nov 29, 2008 3:24:36 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r14798 r14805 844 844 SUPR0DECL(int) SUPR0NativeEnableHwVirtExt(PSUPDRVSESSION pSession, bool fEnable); 845 845 846 /** @name Absolute symbols 847 * Take the address of these, don't try call them. 848 * @{ */ 849 SUPR0DECL(void) SUPR0AbsIs64bit(void); 850 SUPR0DECL(void) SUPR0Abs64bitKernelCS(void); 851 SUPR0DECL(void) SUPR0Abs64bitKernelSS(void); 852 SUPR0DECL(void) SUPR0Abs64bitKernelDS(void); 853 SUPR0DECL(void) SUPR0AbsKernelCS(void); 854 SUPR0DECL(void) SUPR0AbsKernelSS(void); 855 SUPR0DECL(void) SUPR0AbsKernelDS(void); 856 SUPR0DECL(void) SUPR0AbsKernelES(void); 857 SUPR0DECL(void) SUPR0AbsKernelFS(void); 858 SUPR0DECL(void) SUPR0AbsKernelGS(void); 859 /** @} */ 846 860 847 861 /** -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r14804 r14805 824 824 825 825 /* Selector registers. */ 826 #ifdef VBOX_WITH_HYBIRD_32BIT_KERNEL 827 if (VMX_IS_64BIT_HOST_MODE()) 828 { 829 cs = (RTSEL)(uintptr_t)&SUPR0Abs64bitKernelCS; 830 ss = (RTSEL)(uintptr_t)&SUPR0Abs64bitKernelSS; 831 } 832 else 833 { 834 /* sysenter loads LDT cs & ss, VMX doesn't like this. Load the GDT ones (safe). */ 835 cs = (RTSEL)(uintptr_t)&SUPR0AbsKernelCS; 836 ss = (RTSEL)(uintptr_t)&SUPR0AbsKernelSS; 837 } 838 #else 826 839 cs = ASMGetCS(); 827 840 ss = ASMGetSS(); 828 #ifdef RT_OS_DARWIN829 /* VMX doesn't like LDT cs and ss, so switch to the GDT ones. Weird kernel. */830 if (cs == 0x04) /* SYSENTER_CS & ~3 */831 cs = 0x08; /* KERNEL_CS */832 if (ss == 0x0c) /* (SYSENTER_CS & ~3) + 8 */833 ss = 0x10; /* KERNEL_DS */834 if (VMX_IS_64BIT_HOST_MODE())835 {836 cs = 0x80; /* KERNEL64_CS - fixme */837 ss = 0x88; /* KERNEL64_CS - fixme */838 }839 841 #endif 840 842 rc = VMXWriteVMCS(VMX_VMCS16_HOST_FIELD_CS, cs);
Note:
See TracChangeset
for help on using the changeset viewer.