VirtualBox

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


Ignore:
Timestamp:
Jun 18, 2014 11:06:06 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94404
Message:

VMM/GIM: More bits for Hyper-V implementation.

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

Legend:

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

    r51563 r51643  
    5757    GIMPROVIDERID_KVM
    5858} GIMPROVIDERID;
    59 AssertCompileSize(GIMPROVIDERID, 4);
     59AssertCompileSize(GIMPROVIDERID, sizeof(uint32_t));
    6060
    6161
     
    7474    bool                fMapped;
    7575    /** Alignment padding. */
    76     uint8_t             au8Alignment0[4];
     76    uint8_t             au8Alignment0[3];
    7777    /** Size of the region (must be page aligned). */
    7878    uint32_t            cbRegion;
     
    9494/** Pointer to a const GIM MMIO2 region. */
    9595typedef GIMMMIO2REGION const *PCGIMMMIO2REGION;
    96 AssertCompileMemberAlignment(GIMMMIO2REGION, cbRegion,   8);
    97 AssertCompileMemberAlignment(GIMMMIO2REGION, pvPageR0,   8);
     96AssertCompileMemberAlignment(GIMMMIO2REGION, cbRegion, 8);
     97AssertCompileMemberAlignment(GIMMMIO2REGION, pvPageR0, 8);
    9898
    9999
     
    153153VMMR0_INT_DECL(int)         GIMR0InitVM(PVM pVM);
    154154VMMR0_INT_DECL(int)         GIMR0TermVM(PVM pVM);
     155VMMR0_INT_DECL(int)         GIMR0UpdateParavirtTsc(PVM pVM, uint64_t u64Offset);
    155156/** @} */
    156157#endif /* IN_RING0 */
     
    171172
    172173VMMDECL(bool)               GIMIsEnabled(PVM pVM);
    173 VMMDECL(int)                GIMUpdateParavirtTsc(PVM pVM, uint64_t u64Offset);
     174VMMDECL(GIMPROVIDERID)      GIMGetProvider(PVM pVM);
    174175VMMDECL(bool)               GIMIsParavirtTscEnabled(PVM pVM);
    175176VMM_INT_DECL(int)           GIMHypercall(PVMCPU pVCpu, PCPUMCTX pCtx);
  • trunk/include/VBox/vmm/hm_vmx.h

    r50905 r51643  
    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
     
    134134AssertCompileMemberOffset(VMXRESTOREHOST, uHostFSBase,    40);
    135135AssertCompileSize(VMXRESTOREHOST, 56);
     136AssertCompileSizeAlignment(VMXRESTOREHOST, 8);
    136137
    137138/** @name Host-state MSR lazy-restoration flags.
     
    779780typedef const EPTPT *PCEPTPT;
    780781
    781 /**
    782  * VPID flush types.
     782/** @name VMX VPID flush types.
     783 *  Warning!! Valid enum members are in accordance to the VT-x spec.
     784 * @{
    783785 */
    784786typedef enum
    785787{
    786788    /** Invalidate a specific page. */
    787     VMX_FLUSH_VPID_INDIV_ADDR                    = 0,
     789    VMXFLUSHVPID_INDIV_ADDR                    = 0,
    788790    /** Invalidate one context (specific VPID). */
    789     VMX_FLUSH_VPID_SINGLE_CONTEXT                = 1,
     791    VMXFLUSHVPID_SINGLE_CONTEXT                = 1,
    790792    /** Invalidate all contexts (all VPIDs). */
    791     VMX_FLUSH_VPID_ALL_CONTEXTS                  = 2,
     793    VMXFLUSHVPID_ALL_CONTEXTS                  = 2,
    792794    /** Invalidate a single VPID context retaining global mappings. */
    793     VMX_FLUSH_VPID_SINGLE_CONTEXT_RETAIN_GLOBALS = 3,
     795    VMXFLUSHVPID_SINGLE_CONTEXT_RETAIN_GLOBALS = 3,
    794796    /** Unsupported by VirtualBox. */
    795     VMX_FLUSH_VPID_NOT_SUPPORTED                 = 0xbad,
     797    VMXFLUSHVPID_NOT_SUPPORTED                 = 0xbad0,
    796798    /** Unsupported by CPU. */
    797     VMX_FLUSH_VPID_NONE                          = 0xb00,
    798     /** 32bit hackishness. */
    799     VMX_FLUSH_VPID_32BIT_HACK                    = 0x7fffffff
    800 } VMX_FLUSH_VPID;
    801 
    802 /**
    803  * EPT flush types.
     799    VMXFLUSHVPID_NONE                          = 0xbad1
     800} VMXFLUSHVPID;
     801AssertCompileSize(VMXFLUSHVPID, 4);
     802/** @} */
     803
     804/** @name VMX EPT flush types.
     805 *  Warning!! Valid enums values below are in accordance to the VT-x spec.
     806 * @{
    804807 */
    805808typedef enum
    806809{
    807810    /** Invalidate one context (specific EPT). */
    808     VMX_FLUSH_EPT_SINGLE_CONTEXT                = 1,
     811    VMXFLUSHEPT_SINGLE_CONTEXT                 = 1,
    809812    /* Invalidate all contexts (all EPTs) */
    810     VMX_FLUSH_EPT_ALL_CONTEXTS                  = 2,
     813    VMXFLUSHEPT_ALL_CONTEXTS                   = 2,
    811814    /** Unsupported by VirtualBox.   */
    812     VMX_FLUSH_EPT_NOT_SUPPORTED                 = 0xbad,
     815    VMXFLUSHEPT_NOT_SUPPORTED                  = 0xbad0,
    813816    /** Unsupported by CPU. */
    814     VMX_FLUSH_EPT_NONE                          = 0xb00,
    815     /** 32bit hackishness. */
    816     VMX_FLUSH_EPT_32BIT_HACK                    = 0x7fffffff
    817 } VMX_FLUSH_EPT;
    818 /** @} */
    819 
    820 /** @name MSR autoload/store elements
     817    VMXFLUSHEPT_NONE                           = 0xbad1
     818} VMXFLUSHEPT;
     819AssertCompileSize(VMXFLUSHEPT, 4);
     820/** @} */
     821
     822/** @name VMX MSR autoload/store element.
     823 *  In accordance to VT-x spec.
    821824 * @{
    822825 */
     
    824827typedef struct
    825828{
     829    /** The MSR Id. */
    826830    uint32_t    u32Msr;
     831    /** Reserved (MBZ). */
    827832    uint32_t    u32Reserved;
     833    /** The MSR value. */
    828834    uint64_t    u64Value;
    829835} VMXAUTOMSR;
     
    877883/** Pointer to a VMXMSRS struct. */
    878884typedef VMXMSRS *PVMXMSRS;
     885AssertCompileSizeAlignment(VMXMSRS, 8);
    879886/** @} */
    880887
     
    21882195 * @param   pDescriptor Descriptor
    21892196 */
    2190 DECLASM(int) VMXR0InvEPT(VMX_FLUSH_EPT enmFlush, uint64_t *pDescriptor);
     2197DECLASM(int) VMXR0InvEPT(VMXFLUSHEPT enmFlush, uint64_t *pDescriptor);
    21912198
    21922199/**
     
    21962203 * @param   pDescriptor Descriptor
    21972204 */
    2198 DECLASM(int) VMXR0InvVPID(VMX_FLUSH_VPID enmFlush, uint64_t *pDescriptor);
     2205DECLASM(int) VMXR0InvVPID(VMXFLUSHVPID enmFlush, uint64_t *pDescriptor);
    21992206
    22002207/**
  • trunk/include/VBox/vmm/tm.h

    r44528 r51643  
    133133VMMDECL(uint64_t)       TMCpuTickGet(PVMCPU pVCpu);
    134134VMM_INT_DECL(uint64_t)  TMCpuTickGetNoCheck(PVMCPU pVCpu);
    135 VMM_INT_DECL(bool)      TMCpuTickCanUseRealTSC(PVMCPU pVCpu, uint64_t *poffRealTSC);
    136 VMM_INT_DECL(uint64_t)  TMCpuTickGetDeadlineAndTscOffset(PVMCPU pVCpu, bool *pfOffsettedTsc, uint64_t *poffRealTSC);
     135VMM_INT_DECL(bool)      TMCpuTickCanUseRealTSC(PVMCPU pVCpu, uint64_t *poffRealTSC, bool *pfParavirtTsc);
     136VMM_INT_DECL(uint64_t)  TMCpuTickGetDeadlineAndTscOffset(PVMCPU pVCpu, bool *pfOffsettedTsc, bool *pfParavirtTsc, uint64_t *poffRealTSC);
    137137VMM_INT_DECL(int)       TMCpuTickSet(PVM pVM, PVMCPU pVCpu, uint64_t u64Tick);
    138138VMM_INT_DECL(int)       TMCpuTickSetLastSeen(PVMCPU pVCpu, uint64_t u64LastSeenTick);
  • trunk/include/VBox/vmm/vm.h

    r51560 r51643  
    149149        struct HMCPU    s;
    150150#endif
    151         uint8_t             padding[5632];      /* multiple of 64 */
     151        uint8_t             padding[5696];      /* multiple of 64 */
    152152    } hm;
    153153
     
    235235
    236236    /** Align the following members on page boundary. */
    237     uint8_t                 abAlignment2[64];
     237    //uint8_t                 abAlignment2[64];
    238238
    239239    /** PGM part. */
  • trunk/include/VBox/vmm/vm.mac

    r51560 r51643  
    135135
    136136    .cpum                   resb 3584
    137     .hm                     resb 5632
     137    .hm                     resb 5696
    138138    .em                     resb 1472
    139139    .iem                    resb 3072
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