VirtualBox

Ignore:
Timestamp:
Feb 11, 2015 3:11:55 PM (10 years ago)
Author:
vboxsync
Message:

HostDrivers/Support/linux: don't prevent VBox R0 code from touching R3 code as a workaround for SMAP in Broadwell+ CPUs (thanks to Mathias Krause!)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r53396 r54144  
    4848# include <iprt/power.h>
    4949# define VBOX_WITH_SUSPEND_NOTIFICATION
     50#endif
     51#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0)
     52# include <asm/smap.h>
     53#else
     54static inline void clac(void) { }
     55static inline void stac(void) { }
    5056#endif
    5157
     
    649655{
    650656    PSUPDRVSESSION pSession = (PSUPDRVSESSION)pFilp->private_data;
     657    int rc;
    651658
    652659    /*
     
    659666                      || uCmd == SUP_IOCTL_FAST_DO_NOP)
    660667                  && pSession->fUnrestricted == true))
    661         return supdrvIOCtlFast(uCmd, ulArg, &g_DevExt, pSession);
     668    {
     669        stac();
     670        rc = supdrvIOCtlFast(uCmd, ulArg, &g_DevExt, pSession);
     671        clac();
     672        return rc;
     673    }
    662674    return VBoxDrvLinuxIOCtlSlow(pFilp, uCmd, ulArg, pSession);
    663675
    664676#else   /* !HAVE_UNLOCKED_IOCTL */
    665 
    666     int rc;
    667677    unlock_kernel();
    668678    if (RT_LIKELY(   (   uCmd == SUP_IOCTL_FAST_DO_RAW_RUN
     
    742752     * Process the IOCtl.
    743753     */
     754    stac();
    744755    rc = supdrvIOCtl(uCmd, &g_DevExt, pSession, pHdr, cbBuf);
     756    clac();
    745757
    746758    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette