Changeset 14805 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Nov 29, 2008 3:24:36 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.