Changeset 57229 in vbox for trunk/src/VBox/HostDrivers/Support/darwin
- Timestamp:
- Aug 6, 2015 11:34:04 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101982
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r57220 r57229 79 79 #endif 80 80 81 /* Temporary debugging. */ 81 /* The following macros are duplicated in the-darwin-kernel.h. */ 82 #define IPRT_DARWIN_SAVE_EFL_AC() RTCCUINTREG const fSavedEfl = ASMGetFlags(); 83 #define IPRT_DARWIN_RESTORE_EFL_AC() ASMSetFlags(fSavedEfl) 84 #define IPRT_DARWIN_RESTORE_EFL_ONLY_AC() ASMChangeFlags(~X86_EFL_AC, fSavedEfl & X86_EFL_AC) 85 86 87 /* Temporary debugging - very temporary... */ 82 88 #define VBOX_PROC_SELFNAME_LEN (20) 83 #define VBOX_RETRIEVE_CUR_PROC_NAME(_name) 84 89 #define VBOX_RETRIEVE_CUR_PROC_NAME(_name) char _name[VBOX_PROC_SELFNAME_LEN]; \ 90 proc_selfname(pszProcName, VBOX_PROC_SELFNAME_LEN) 85 91 86 92 … … 586 592 PSUPDRVSESSION pSession; 587 593 594 #ifdef VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV 595 /* 596 * Refuse all I/O control calls if we've ever detected EFLAGS.AC being cleared. 597 * 598 * This isn't a problem, as there is absolutely nothing in the kernel context that 599 * depend on user context triggering cleanups. That would be pretty wild, right? 600 */ 601 if (RT_UNLIKELY(g_DevExt.cBadContextCalls > 0)) 602 { 603 SUPR0Printf("VBoxDrvDarwinIOCtl: EFLAGS.AC=0 detected %u times, refusing all I/O controls!\n", g_DevExt.cBadContextCalls); 604 return EDEVERR; 605 } 606 #endif 607 588 608 /* 589 609 * Find the session. … … 651 671 #if defined(VBOX_STRICT) || defined(VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV) 652 672 if (RT_UNLIKELY(!(ASMGetFlags() & X86_EFL_AC))) 653 SUPR0Printf("VBoxDrvDarwinIOCtlSMAP: someone cleared AC handling iCmd=%#lx\n", iCmd);673 supdrvBadContext(&g_DevExt, "SUPDrv-darwin.cpp", __LINE__, "VBoxDrvDarwinIOCtlSMAP"); 654 674 #endif 655 675 ASMSetFlags(fSavedEfl); … … 1435 1455 RTDECL(int) SUPR0Printf(const char *pszFormat, ...) 1436 1456 { 1457 IPRT_DARWIN_SAVE_EFL_AC(); 1437 1458 va_list va; 1438 1459 char szMsg[512]; … … 1444 1465 1445 1466 printf("%s", szMsg); 1467 1468 IPRT_DARWIN_RESTORE_EFL_AC(); 1446 1469 return 0; 1447 1470 }
Note:
See TracChangeset
for help on using the changeset viewer.