Changeset 82818 in vbox for trunk/src/VBox
- Timestamp:
- Jan 22, 2020 10:49:51 AM (5 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/Makefile.kmk
r82741 r82818 644 644 VBoxDrv_ASDEFS += VBOX_WITH_HARDENING 645 645 endif 646 if ($(VBOX_VERSION_BUILD) % 2) == 1 646 ifdef VBOX_WITH_RAM_IN_KERNEL 647 VBoxDrv_DEFS += VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV IPRT_WITHOUT_EFLAGS_AC_PRESERVING 648 else if ($(VBOX_VERSION_BUILD) % 2) == 1 647 649 VBoxDrv_DEFS += VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV IPRT_WITH_EFLAGS_AC_PRESERVING 648 650 endif -
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp
r76553 r82818 111 111 static int VBoxDrvDarwinClose(dev_t Dev, int fFlags, int fDevType, struct proc *pProcess); 112 112 static int VBoxDrvDarwinIOCtl(dev_t Dev, u_long iCmd, caddr_t pData, int fFlags, struct proc *pProcess); 113 #ifndef VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV 113 114 static int VBoxDrvDarwinIOCtlSMAP(dev_t Dev, u_long iCmd, caddr_t pData, int fFlags, struct proc *pProcess); 115 #endif 114 116 static int VBoxDrvDarwinIOCtlSlow(PSUPDRVSESSION pSession, u_long iCmd, caddr_t pData, struct proc *pProcess); 115 117 … … 264 266 #endif 265 267 268 /** SUPKERNELFEATURES_XXX */ 269 static uint32_t g_fKernelFeatures = 0; 266 270 267 271 /** … … 300 304 if (vboxdrvDarwinCpuHasSMAP()) 301 305 { 306 g_fKernelFeatures |= SUPKERNELFEATURES_SMAP; 307 #ifndef VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV 302 308 LogRel(("disabling SMAP for VBoxDrvDarwinIOCtl\n")); 303 309 g_DevCW.d_ioctl = VBoxDrvDarwinIOCtlSMAP; 310 #endif 304 311 } 305 312 … … 726 733 727 734 735 #ifndef VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV 728 736 /** 729 737 * Alternative Device I/O Control entry point on hosts with SMAP support. … … 746 754 int rc = VBoxDrvDarwinIOCtl(Dev, iCmd, pData, fFlags, pProcess); 747 755 748 # if defined(VBOX_STRICT) || defined(VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV)756 # if defined(VBOX_STRICT) || defined(VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV) 749 757 /* 750 758 * Before we restore AC and the rest of EFLAGS, check if the IOCtl handler code … … 758 766 supdrvBadContext(&g_DevExt, "SUPDrv-darwin.cpp", __LINE__, szTmp); 759 767 } 760 # endif768 # endif 761 769 762 770 ASMSetFlags(fSavedEfl); 763 771 return rc; 764 772 } 773 #endif /* VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV */ 765 774 766 775 … … 1993 2002 SUPR0DECL(uint32_t) SUPR0GetKernelFeatures(void) 1994 2003 { 1995 uint32_t fFlags = 0; 1996 if (g_DevCW.d_ioctl == VBoxDrvDarwinIOCtlSMAP) 1997 fFlags |= SUPKERNELFEATURES_SMAP; 1998 else 1999 Assert(!(ASMGetCR4() & X86_CR4_SMAP)); 2000 return fFlags; 2004 return g_fKernelFeatures; 2001 2005 } 2002 2006
Note:
See TracChangeset
for help on using the changeset viewer.