Changeset 55859 in vbox for trunk/src/VBox/Runtime/r0drv
- Timestamp:
- May 14, 2015 9:20:05 AM (10 years ago)
- Location:
- trunk/src/VBox/Runtime/r0drv/linux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h
r54802 r55859 379 379 #endif 380 380 381 /** @name Macros for preserving EFLAGS.AC on 3.19+/amd64 paranoid. 382 * The AMD 64 switch_to in macro in arch/x86/include/asm/switch_to.h stopped 383 * restoring flags. 384 * @{ */ 385 #ifdef CONFIG_X86_SMAP 386 # define IPRT_X86_EFL_AC RT_BIT(18) 387 # define IPRT_LINUX_SAVE_EFL_AC() RTCCUINTREG fSavedEfl = ASMGetFlags(); 388 # define IPRT_LINUX_RESTORE_EFL_AC() ASMSetFlags(fSavedEfl) 389 # define IPRT_LINUX_RESTORE_EFL_ONLY_AC() ASMSetFlags((ASMGetFlags() & ~IPRT_X86_EFL_AC) | (fSavedEfl & IPRT_X86_EFL_AC)) 390 #else 391 # define IPRT_LINUX_SAVE_EFL_AC() do { } while (0) 392 # define IPRT_LINUX_RESTORE_EFL_AC() do { } while (0) 393 # define IPRT_LINUX_RESTORE_EFL_ONLY_AC() do { } while (0) 394 #endif 395 /** @} */ 396 381 397 /* 382 398 * There are some conflicting defines in iprt/param.h, sort them out here. -
trunk/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c
r48935 r55859 200 200 { 201 201 #ifdef CONFIG_PREEMPT 202 IPRT_LINUX_SAVE_EFL_AC(); /* paranoia */ 202 203 AssertPtr(pState); 203 204 Assert(pState->u32Reserved == 42); 204 205 RT_ASSERT_PREEMPT_CPUID_RESTORE(pState); 205 206 preempt_enable(); 207 IPRT_LINUX_RESTORE_EFL_ONLY_AC(); /* paranoia */ 206 208 207 209 #else
Note:
See TracChangeset
for help on using the changeset viewer.