VirtualBox

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

VMM/NEM: Made it build without NEM_WIN_USE_HYPERCALLS_FOR_PAGES again. #ifdef'ed a lot more based on NEM_WIN_USE_HYPERCALLS_FOR_PAGES (basically ring-0 ends up as a stub if it's not defined). [fixes] bugref:10118

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/NEMR0Native-win.cpp

    r91692 r91694  
    8181 */
    8282static NTSTATUS (*g_pfnWinHvDepositMemory)(uintptr_t idPartition, size_t cPages, uintptr_t IdealNode, size_t *pcActuallyAdded);
     83#endif
    8384
    8485RT_C_DECLS_BEGIN
     
    9293decltype(WinHvGetPartitionProperty) *g_pfnWinHvGetPartitionProperty;
    9394RT_C_DECLS_END
    94 #endif
    9595
    9696/** @name VID.SYS image details.
     
    158158VMMR0_INT_DECL(int)  NEMR0Init(void)
    159159{
     160#ifdef NEM_WIN_USE_HYPERCALLS_FOR_PAGES
    160161    return RTCritSectInit(&g_VidSysCritSect);
     162#else
     163    return VINF_SUCCESS;
     164#endif
    161165}
    162166
     
    167171VMMR0_INT_DECL(void) NEMR0Term(void)
    168172{
     173#ifdef NEM_WIN_USE_HYPERCALLS_FOR_PAGES
    169174    RTCritSectDelete(&g_VidSysCritSect);
     175#endif
    170176}
    171177
     178#ifdef NEM_WIN_USE_HYPERCALLS_FOR_PAGES
    172179
    173180/**
     
    243250    uintptr_t const            offEndNtHdrs  = (uintptr_t)(pNtHdrs + 1) - (uintptr_t)pbImage;
    244251
    245 #define CHECK_LOG_RET(a_Expr, a_LogRel) do { \
     252# define CHECK_LOG_RET(a_Expr, a_LogRel) do { \
    246253            if (RT_LIKELY(a_Expr)) { /* likely */ } \
    247254            else \
     
    337344    //    return;
    338345    //}
    339 #undef CHECK_LOG_RET
     346# undef CHECK_LOG_RET
    340347}
    341348
     
    379386        LogRel(("NEMR0: Failed to find vid.sys!__ImageBase (%Rrc)\n", rc));
    380387}
     388
     389#endif /* NEM_WIN_USE_HYPERCALLS_FOR_PAGES */
    381390
    382391
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