Changeset 54872 in vbox
- Timestamp:
- Mar 20, 2015 2:16:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/threadctxhooks-r0drv-linux.c
r54866 r54872 5 5 6 6 /* 7 * Copyright (C) 2013 Oracle Corporation7 * Copyright (C) 2013-2015 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 72 72 /** The reference count for this object. */ 73 73 uint32_t volatile cRefs; 74 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 19) && defined(RT_ARCH_AMD64) 75 /** Starting with 3.1.19, the linux kernel doesn't restore kernel RFLAGS during 76 * task switch, so we have to do that ourselves. (x86 code is not affected.) */ 77 RTCCUINTREG fSavedRFlags; 78 #endif 74 79 } RTTHREADCTXINT, *PRTTHREADCTXINT; 75 80 … … 101 106 102 107 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 103 clac();104 108 ASMSetFlags(fSavedEFlags); 109 # if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 19) && defined(RT_ARCH_AMD64) 110 pThis->fSavedRFlags = fSavedEFlags; 111 # endif 105 112 #endif 106 113 } … … 128 135 Assert(pThis->fRegistered); 129 136 130 131 137 pThis->pfnThreadCtxHook(RTTHREADCTXEVENT_RESUMED, pThis->pvUser); 132 138 133 139 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 134 clac(); 140 # if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 1, 19) && defined(RT_ARCH_AMD64) 141 fSavedEFlags &= ~RT_BIT_64(18) /*X86_EFL_AC*/; 142 fSavedEFlags |= pThis->fSavedRFlags & RT_BIT_64(18) /*X86_EFL_AC*/; 143 # endif 135 144 ASMSetFlags(fSavedEFlags); 136 145 #endif
Note:
See TracChangeset
for help on using the changeset viewer.