VirtualBox

Changeset 72291 in vbox


Ignore:
Timestamp:
May 22, 2018 5:31:18 PM (7 years ago)
Author:
vboxsync
Message:

NEM/Win: Let's try get WinHvDepositMemory.

File:
1 edited

Legend:

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

    r72229 r72291  
    6262static uint64_t (*g_pfnHvlInvokeHypercall)(uint64_t uCallInfo, uint64_t HCPhysInput, uint64_t HCPhysOutput);
    6363
     64/**
     65 * WinHvr.sys!WinHvDepositMemory
     66 *
     67 * This API will try allocates cPages on IdealNode and deposit it to the
     68 * hypervisor for use with the given partition.  The memory will be freed when
     69 * VID.SYS calls WinHvWithdrawAllMemory when the partition is cleanedup.
     70 *
     71 * Apparently node numbers above 64 has a different meaning.
     72 */
     73static NTSTATUS (*g_pfnWinHvDepositMemory)(uintptr_t idPartition, size_t cPages, uintptr_t IdealNode, size_t *pcActuallyAdded);
     74
    6475
    6576/*********************************************************************************************************************************
     
    7283NEM_TMPL_STATIC int  nemR0WinImportState(PGVM pGVM, PGVMCPU pGVCpu, PCPUMCTX pCtx, uint64_t fWhat);
    7384DECLINLINE(NTSTATUS) nemR0NtPerformIoControl(PGVM pGVM, uint32_t uFunction, void *pvInput, uint32_t cbInput,
    74                                                      void *pvOutput, uint32_t cbOutput);
     85                                             void *pvOutput, uint32_t cbOutput);
    7586
    7687
     
    100111     * We want to perform hypercalls here.  The NT kernel started to expose a very low
    101112     * level interface to do this thru somewhere between build 14271 and 16299.  Since
    102      * we need build 17083 to get anywhere at all, the exact build is not relevant here.
     113     * we need build 17134 to get anywhere at all, the exact build is not relevant here.
     114     *
     115     * We also need to deposit memory to the hypervisor for use with partition (page
     116     * mapping structures, stuff).
    103117     */
    104118    RTDBGKRNLINFO hKrnlInfo;
     
    107121    {
    108122        rc = RTR0DbgKrnlInfoQuerySymbol(hKrnlInfo, NULL, "HvlInvokeHypercall", (void **)&g_pfnHvlInvokeHypercall);
     123        if (RT_SUCCESS(rc))
     124            rc = RTR0DbgKrnlInfoQuerySymbol(hKrnlInfo, "winhvr.sys", "WinHvDepositMemory", (void **)&g_pfnWinHvDepositMemory);
    109125        RTR0DbgKrnlInfoRelease(hKrnlInfo);
    110126        if (RT_SUCCESS(rc))
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