Changeset 85776 in vbox for trunk/src/VBox
- Timestamp:
- Aug 14, 2020 8:05:40 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c
r85698 r85776 758 758 { 759 759 #if RTLNX_VER_MIN(5,8,0) 760 RTCCUINTREG const uOld = __read_cr4(); 761 #elif RTLNX_VER_MIN(3,20,0) 760 unsigned long fSavedFlags; 761 local_irq_save(fSavedFlags); 762 RTCCUINTREG const uOld = cr4_read_shadow(); 763 cr4_update_irqsoff(fOrMask, ~fAndMask); /* Same as this function, only it is not returning the old value. */ 764 AssertMsg(cr4_read_shadow() == ((uOld & fAndMask) | fOrMask), 765 ("fOrMask=%#RTreg fAndMask=%#RTreg uOld=%#RTreg; new cr4=%#llx\n", fOrMask, fAndMask, uOld, cr4_read_shadow())); 766 local_irq_restore(fSavedFlags); 767 #else 768 # if RTLNX_VER_MIN(3,20,0) 762 769 RTCCUINTREG const uOld = this_cpu_read(cpu_tlbstate.cr4); 763 # else770 # else 764 771 RTCCUINTREG const uOld = ASMGetCR4(); 765 # endif772 # endif 766 773 RTCCUINTREG const uNew = (uOld & fAndMask) | fOrMask; 767 774 if (uNew != uOld) 768 775 { 769 #if RTLNX_VER_MIN(5,8,0) 770 ASMSetCR4(uNew); 771 #elif RTLNX_VER_MIN(3,20,0) 776 # if RTLNX_VER_MIN(3,20,0) 772 777 this_cpu_write(cpu_tlbstate.cr4, uNew); 773 778 __write_cr4(uNew); 774 # else779 # else 775 780 ASMSetCR4(uNew); 776 #endif 777 } 781 # endif 782 } 783 #endif 778 784 return uOld; 779 785 }
Note:
See TracChangeset
for help on using the changeset viewer.