Changeset 57254 in vbox for trunk/src/VBox/HostDrivers/Support/darwin
- Timestamp:
- Aug 9, 2015 2:26:51 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 102008
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r57252 r57254 645 645 * SMAP check. 646 646 */ 647 #ifdef VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV648 647 RTCCUINTREG fSavedEfl = ASMAddFlags(X86_EFL_AC); 649 #else 650 RTCCUINTREG fSavedEfl = ASMGetFlags(); 651 ASMSetAC(); 648 649 int rc = VBoxDrvDarwinIOCtl(Dev, iCmd, pData, fFlags, pProcess); 650 651 #if defined(VBOX_STRICT) || defined(VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV) 652 /* 653 * Before we restore AC and the rest of EFLAGS, check if the IOCtl handler code 654 * accidentially modified it or some other important flag. 655 */ 656 if (RT_UNLIKELY( (ASMGetFlags() & (X86_EFL_AC | X86_EFL_IF | X86_EFL_DF | X86_EFL_IOPL)) 657 != ((fSavedEfl & (X86_EFL_AC | X86_EFL_IF | X86_EFL_DF | X86_EFL_IOPL)) | X86_EFL_AC) )) 658 { 659 char szTmp[48]; 660 RTStrPrintf(szTmp, sizeof(szTmp), "iCmd=%#x: %#x->%#x!", iCmd, (uint32_t)fSavedEfl, (uint32_t)ASMGetFlags()); 661 supdrvBadContext(&g_DevExt, "SUPDrv-darwin.cpp", __LINE__, szTmp); 662 } 652 663 #endif 653 664 654 int rc = VBoxDrvDarwinIOCtl(Dev, iCmd, pData, fFlags, pProcess);655 656 #if defined(VBOX_STRICT) || defined(VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV)657 if (RT_UNLIKELY(!(ASMGetFlags() & X86_EFL_AC)))658 {659 char szTmp[32];660 RTStrPrintf(szTmp, sizeof(szTmp), "iCmd=%#x!", iCmd);661 supdrvBadContext(&g_DevExt, "SUPDrv-darwin.cpp", __LINE__, szTmp);662 }663 #endif664 665 ASMSetFlags(fSavedEfl); 665 666 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.