Changeset 54650 in vbox for trunk/src/VBox/HostDrivers/Support/linux
- Timestamp:
- Mar 5, 2015 1:42:10 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r54581 r54650 69 69 # define SUPDRV_LINUX_HAS_SAFE_MSR_API 70 70 # include <asm/msr.h> 71 # include <iprt/asm-amd64-x86.h>72 # endif71 #endif 72 #include <iprt/asm-amd64-x86.h> 73 73 74 74 … … 823 823 824 824 825 RTCCUINTREG VBOXCALL supdrvOSChangeCR4(RTCCUINTREG fOrMask, RTCCUINTREG fAndMask) 826 { 827 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0) 828 RTCCUINTREG uOld = this_cpu_read(cpu_tlbstate.cr4); 829 RTCCUINTREG uNew = (uOld & fAndMask) | fOrMask; 830 if (uNew != uOld) 831 { 832 this_cpu_write(cpu_tlbstate.cr4, uNew); 833 __write_cr4(uNew); 834 } 835 #else 836 RTCCUINTREG uOld = ASMGetCR4(); 837 RTCCUINTREG uNew = (uOld & fAndMask) | fOrMask; 838 if (uNew != uOld) 839 ASMSetCR4(uNew); 840 #endif 841 return uOld; 842 } 843 844 825 845 void VBOXCALL supdrvOSCleanupSession(PSUPDRVDEVEXT pDevExt, PSUPDRVSESSION pSession) 826 846 {
Note:
See TracChangeset
for help on using the changeset viewer.