VirtualBox

Changeset 51560 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Jun 6, 2014 5:17:02 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94218
Message:

VMM/GIM: Mapping of GIM MMIO2 regions and Hyper-V provider work.

Location:
trunk/include/VBox/vmm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/gim.h

    r51333 r51560  
    4444
    4545/**
    46  * Providers identifiers.
     46 * GIM Provider Identifiers.
    4747 */
    4848typedef enum GIMPROVIDERID
     
    5555    GIMPROVIDERID_HYPERV,
    5656    /** Linux KVM Interface. */
    57     GIMPROVIDERID_KVM,
    58     /** Ensure 32-bit type. */
    59     GIMPROVIDERID_32BIT_HACK = 0x7fffffff
     57    GIMPROVIDERID_KVM
    6058} GIMPROVIDERID;
     59AssertCompileSize(GIMPROVIDERID, 4);
     60
     61
     62/**
     63 * A GIM MMIO2 region record.
     64 */
     65typedef struct GIMMMIO2REGION
     66{
     67    /** The region index. */
     68    uint8_t             iRegion;
     69    /** Whether an RC mapping is required. */
     70    bool                fRCMapping;
     71    /** Whether this region has been registered. */
     72    bool                fRegistered;
     73    /** Whether this region is currently mapped. */
     74    bool                fMapped;
     75    /** Alignment padding. */
     76    uint8_t             au8Alignment0[4];
     77    /** Size of the region (must be page aligned). */
     78    uint32_t            cbRegion;
     79    /** Alignment padding. */
     80    uint32_t            u32Alignment0;
     81    /** The host ring-0 address of the first page in the region. */
     82    R0PTRTYPE(void *)   pvPageR0;
     83    /** The host ring-3 address of the first page in the region. */
     84    R3PTRTYPE(void *)   pvPageR3;
     85    /** The ring-context address of the first page in the region. */
     86    RCPTRTYPE(void *)   pvPageRC;
     87    /** The guest-physical address of the first page in the region. */
     88    RTGCPHYS            GCPhysPage;
     89    /** The description of the region. */
     90    char                szDescription[32];
     91} GIMMMIO2REGION;
     92/** Pointer to a GIM MMIO2 region. */
     93typedef GIMMMIO2REGION *PGIMMMIO2REGION;
     94/** Pointer to a const GIM MMIO2 region. */
     95typedef GIMMMIO2REGION const *PCGIMMMIO2REGION;
     96AssertCompileMemberAlignment(GIMMMIO2REGION, cbRegion,   8);
     97AssertCompileMemberAlignment(GIMMMIO2REGION, pvPageR0,   8);
    6198
    6299
     
    114151 * @{
    115152 */
    116 
     153VMMR0_INT_DECL(int)         GIMR0InitVM(PVM pVM);
     154VMMR0_INT_DECL(int)         GIMR0TermVM(PVM pVM);
    117155/** @} */
    118156#endif /* IN_RING0 */
     
    124162 * @{
    125163 */
    126 VMMR3_INT_DECL(int)     GIMR3Init(PVM pVM);
    127 VMMR3_INT_DECL(int)     GIMR3Term(PVM pVM);
     164VMMR3_INT_DECL(int)         GIMR3Init(PVM pVM);
     165VMMR3_INT_DECL(int)         GIMR3Term(PVM pVM);
     166VMMR3_INT_DECL(void)        GIMR3Reset(PVM pVM);
     167VMMR3DECL(void)             GIMR3GimDeviceRegister(PVM pVM, PPDMDEVINS pDevIns);
     168VMMR3DECL(PGIMMMIO2REGION)  GIMR3GetMmio2Regions(PVM pVM, uint32_t *pcRegions);
    128169/** @} */
    129170#endif /* IN_RING3 */
    130171
    131 VMMDECL(bool)           GIMIsEnabled(PVM pVM);
    132 VMM_INT_DECL(int)       GIMHypercall(PVMCPU pVCpu, PCPUMCTX pCtx);
    133 VMM_INT_DECL(int)       GIMReadMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue);
    134 VMM_INT_DECL(int)       GIMWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue);
     172VMMDECL(bool)               GIMIsEnabled(PVM pVM);
     173VMMDECL(int)                GIMUpdateParavirtTsc(PVM pVM, uint64_t u64Offset);
     174VMM_INT_DECL(int)           GIMHypercall(PVMCPU pVCpu, PCPUMCTX pCtx);
     175VMM_INT_DECL(int)           GIMReadMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue);
     176VMM_INT_DECL(int)           GIMWriteMsr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue);
    135177
    136178/** @} */
     
    138180RT_C_DECLS_END
    139181
    140 #endif
     182#endif  /* ___VBox_vmm_gim_h */
    141183
  • trunk/include/VBox/vmm/hm.h

    r50608 r51560  
    44
    55/*
    6  * Copyright (C) 2006-2013 Oracle Corporation
     6 * Copyright (C) 2006-2014 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    144144VMM_INT_DECL(int)               HMAmdIsSubjectToErratum170(uint32_t *pu32Family, uint32_t *pu32Model, uint32_t *pu32Stepping);
    145145VMM_INT_DECL(bool)              HMSetSingleInstruction(PVMCPU pVCpu, bool fEnable);
     146VMM_INT_DECL(int)               HMPatchHypercall(PVM pVM, void *pvBuf, size_t cbBuf, size_t *pcbWritten);
    146147
    147148#ifndef IN_RC
  • trunk/include/VBox/vmm/vm.h

    r50953 r51560  
    44
    55/*
    6  * Copyright (C) 2006-2013 Oracle Corporation
     6 * Copyright (C) 2006-2014 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    11221122        struct GIM s;
    11231123#endif
    1124         uint8_t     padding[64];        /* multiple of 64 */
     1124        uint8_t     padding[256];        /* multiple of 64 */
    11251125    } gim;
    11261126
     
    11471147
    11481148    /** Padding for aligning the cpu array on a page boundary. */
    1149     uint8_t         abAlignment2[350];
     1149    uint8_t         abAlignment2[158];
    11501150
    11511151    /* ---- end small stuff ---- */
  • trunk/include/VBox/vmm/vm.mac

    r50953 r51560  
    44
    55;
    6 ; Copyright (C) 2006-2013 Oracle Corporation
     6; Copyright (C) 2006-2014 Oracle Corporation
    77;
    88; This file is part of VirtualBox Open Source Edition (OSE), as
Note: See TracChangeset for help on using the changeset viewer.

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