VirtualBox

Changeset 71075 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Feb 20, 2018 9:10:45 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120939
Message:

VMM,SUPDrv: More NEM/win experimentation. bugref:9044

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/NEMInternal.h

    r71043 r71075  
    2525#include <VBox/vmm/stam.h>
    2626#include <VBox/vmm/vmapi.h>
     27#ifdef RT_OS_WINDOWS
     28#include <iprt/nt/hyperv.h>
     29#endif
    2730
    2831RT_C_DECLS_BEGIN
     
    8386     * controls. */
    8487    RTR3PTR                     hPartitionDevice;
     88    /** The Hyper-V partition ID.   */
     89    uint64_t                    idHvPartition;
    8590
    8691    /** Number of currently mapped pages. */
     
    105110    /** NEMCPU_MAGIC. */
    106111    uint32_t                    u32Magic;
    107 
     112#ifdef RT_OS_WINDOWS
     113    /** Parameters for making Hyper-V hypercalls. */
     114    union
     115    {
     116        uint8_t                 ab[64];
     117        /** Arguments for NEMR0MapPages (HvCallMapGpaPages). */
     118        struct
     119        {
     120            RTGCPHYS            GCPhysSrc;
     121            RTGCPHYS            GCPhysDst; /**< Same as GCPhysSrc except maybe when the A20 gate is disabled. */
     122            uint32_t            cPages;
     123            HV_MAP_GPA_FLAGS    fFlags;
     124        }                       MapPages;
     125        /** Arguments for NEMR0UnmapPages (HvCallUnmapGpaPages). */
     126        struct
     127        {
     128            RTGCPHYS            GCPhys;
     129            uint32_t            cPages;
     130        }                       UnmapPages;
     131    } Hypercall;
     132#endif
    108133} NEMCPU;
    109134/** Pointer to NEM VMCPU instance data. */
     
    114139/** NEMCPU::u32Magic value after termination. */
    115140#define NEMCPU_MAGIC_DEAD       UINT32_C(0xdead2222)
     141
     142
     143#ifdef IN_RING0
     144
     145/**
     146 * NEM GVMCPU instance data.
     147 */
     148typedef struct NEMR0PERVCPU
     149{
     150# ifdef RT_OS_WINDOWS
     151    /** @name Hypercall input/ouput page.
     152     * @{ */
     153    /** Host physical address of the hypercall input/output page. */
     154    RTHCPHYS                    HCPhysHypercallData;
     155    /** Pointer to the hypercall input/output page. */
     156    uint8_t                    *pbHypercallData;
     157    /** Handle to the memory object of the hypercall input/output page. */
     158    RTR0MEMOBJ                  hHypercallDataMemObj;
     159    /** @} */
     160# endif
     161} NEMR0PERVCPU;
     162
     163/**
     164 * NEM GVM instance data.
     165 */
     166typedef struct NEMR0PERVM
     167{
     168# ifdef RT_OS_WINDOWS
     169    /** The partition ID. */
     170    uint64_t                    idHvPartition;
     171# endif
     172} NEMR0PERVM;
     173
     174#endif /* IN_RING*/
     175
    116176
    117177#ifdef IN_RING3
     
    148208
    149209
     210#ifdef RT_OS_WINDOWS
     211/** Maximum number of pages we can map in a single NEMR0MapPages call. */
     212# define NEM_MAX_MAP_PAGES      ((PAGE_SIZE - RT_UOFFSETOF(HV_INPUT_MAP_GPA_PAGES, PageList)) / sizeof(HV_SPA_PAGE_NUMBER))
     213/** Maximum number of pages we can unmap in a single NEMR0UnmapPages call. */
     214# define NEM_MAX_UNMAP_PAGES    4095
     215
     216#endif
    150217/** @} */
    151218
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