VirtualBox

Changeset 91688 in vbox for trunk


Ignore:
Timestamp:
Oct 12, 2021 12:21:10 PM (3 years ago)
Author:
vboxsync
Message:

VMM/NEM: Added some more #ifdef'ing to reduce the amount of ioctl probing to what we actually need. bugref:10118

Location:
trunk/src/VBox/VMM
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/NEMAllNativeTemplate-win.cpp.h

    r91580 r91688  
    38333833
    38343834
    3835 #ifdef IN_RING0
     3835#if defined(IN_RING0) && defined(NEM_WIN_WITH_RING0_RUNLOOP)
    38363836/**
    38373837 * Perform an I/O control operation on the partition handle (VID.SYS),
  • trunk/src/VBox/VMM/VMMR0/NEMR0Native-win.cpp

    r91676 r91688  
    808808    AssertRCReturn(rc, rc);
    809809    SUPR0Printf("NEMR0InitVMPart2\n"); LogRel(("2: NEMR0InitVMPart2\n"));
     810#ifdef NEM_WIN_WITH_RING0_RUNLOOP
    810811    Assert(pGVM->nemr0.s.fMayUseRing0Runloop == false);
     812#endif
    811813
    812814    /*
     
    825827    pGVM->nemr0.s.IoCtlGetPartitionProperty = Copy;
    826828
     829#ifdef NEM_WIN_WITH_RING0_RUNLOOP
    827830    pGVM->nemr0.s.fMayUseRing0Runloop = pGVM->nem.s.fUseRing0Runloop;
    828831
     
    855858    if (RT_SUCCESS(rc))
    856859        pGVM->nemr0.s.IoCtlMessageSlotHandleAndGetNext = Copy;
     860#endif
    857861
    858862    if (   RT_SUCCESS(rc)
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-win.cpp

    r91679 r91688  
    178178/** Info about the VidGetPartitionProperty I/O control interface. */
    179179static NEMWINIOCTL g_IoCtlGetPartitionProperty;
     180#if defined(NEM_WIN_WITH_RING0_RUNLOOP) || defined(LOG_ENABLED)
    180181/** Info about the VidStartVirtualProcessor I/O control interface. */
    181182static NEMWINIOCTL g_IoCtlStartVirtualProcessor;
     
    184185/** Info about the VidMessageSlotHandleAndGetNext I/O control interface. */
    185186static NEMWINIOCTL g_IoCtlMessageSlotHandleAndGetNext;
     187#endif
    186188#ifdef LOG_ENABLED
    187189/** Info about the VidMessageSlotMap I/O control interface - for logging. */
     
    843845}
    844846
     847#if defined(NEM_WIN_WITH_RING0_RUNLOOP) || defined(LOG_ENABLED)
    845848
    846849/**
     
    944947}
    945948
     949#endif /* defined(NEM_WIN_WITH_RING0_RUNLOOP) || defined(LOG_ENABLED) */
    946950
    947951#ifdef LOG_ENABLED
     
    10161020
    10171021    int rcRet = VINF_SUCCESS;
     1022#if defined(NEM_WIN_WITH_RING0_RUNLOOP) || defined(LOG_ENABLED)
     1023
    10181024    /* VidStartVirtualProcessor */
    10191025    *g_ppfnVidNtDeviceIoControlFile = nemR3WinIoctlDetector_StartVirtualProcessor;
     
    10521058            g_IoCtlMessageSlotHandleAndGetNext.cbOutput));
    10531059
     1060#endif /* defined(NEM_WIN_WITH_RING0_RUNLOOP) || defined(LOG_ENABLED) */
    10541061#ifdef LOG_ENABLED
    10551062    /* The following are only for logging: */
     
    10981105    pVM->nem.s.IoCtlGetHvPartitionId            = g_IoCtlGetHvPartitionId;
    10991106    pVM->nem.s.IoCtlGetPartitionProperty        = g_IoCtlGetPartitionProperty;
     1107#ifdef NEM_WIN_WITH_RING0_RUNLOOP
    11001108    pVM->nem.s.IoCtlStartVirtualProcessor       = g_IoCtlStartVirtualProcessor;
    11011109    pVM->nem.s.IoCtlStopVirtualProcessor        = g_IoCtlStopVirtualProcessor;
    11021110    pVM->nem.s.IoCtlMessageSlotHandleAndGetNext = g_IoCtlMessageSlotHandleAndGetNext;
     1111#endif
    11031112    return rcRet;
    11041113}
  • trunk/src/VBox/VMM/include/NEMInternal.h

    r91676 r91688  
    197197    /** Info about the VidGetPartitionProperty I/O control interface. */
    198198    NEMWINIOCTL                 IoCtlGetPartitionProperty;
     199#  ifdef NEM_WIN_WITH_RING0_RUNLOOP
    199200    /** Info about the VidStartVirtualProcessor I/O control interface. */
    200201    NEMWINIOCTL                 IoCtlStartVirtualProcessor;
     
    203204    /** Info about the VidStopVirtualProcessor I/O control interface. */
    204205    NEMWINIOCTL                 IoCtlMessageSlotHandleAndGetNext;
     206#  endif
    205207
    206208    /** Statistics updated by NEMR0UpdateStatistics. */
     
    393395    /** Info about the VidGetPartitionProperty I/O control interface. */
    394396    NEMWINIOCTL                 IoCtlGetPartitionProperty;
     397#  ifdef NEM_WIN_WITH_RING0_RUNLOOP
    395398    /** Info about the VidStartVirtualProcessor I/O control interface. */
    396399    NEMWINIOCTL                 IoCtlStartVirtualProcessor;
     
    401404    /** Whether we may use the ring-0 runloop or not. */
    402405    bool                        fMayUseRing0Runloop;
     406#  endif
    403407
    404408    /** Hypercall input/ouput page for non-EMT. */
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