VirtualBox

Changeset 57270 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Aug 11, 2015 9:55:44 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
102025
Message:

VMM/HM: comment typos, doxygen cleanup.

File:
1 edited

Legend:

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

    r57243 r57270  
    383383/** Interruptibility state block-by-SMI invalid when trying to enter SMM. */
    384384#define VMX_IGS_INTERRUPTIBILITY_STATE_SMI_SMM_INVALID          99
    385 /** Interruptibilty state block-by-STI (maybe) invalid when trying to deliver
    386  *  an NMI. */
     385/** Interruptibility state block-by-STI (maybe) invalid when trying to
     386 *  deliver an NMI. */
    387387#define VMX_IGS_INTERRUPTIBILITY_STATE_STI_INVALID              100
    388388/** Interruptibility state block-by-NMI invalid when virtual-NMIs control is
     
    484484    /** Physical address of the next level (PD). Restricted by maximum physical address width of the cpu. */
    485485    uint64_t    u40PhysAddr     : 40;
    486     /** Availabe for software. */
     486    /** Available for software. */
    487487    uint64_t    u12Available    : 12;
    488488} EPTPML4EBITS;
     
    546546    /** Physical address of the next level (PD). Restricted by maximum physical address width of the cpu. */
    547547    uint64_t    u40PhysAddr     : 40;
    548     /** Availabe for software. */
     548    /** Available for software. */
    549549    uint64_t    u12Available    : 12;
    550550} EPTPDPTEBITS;
     
    611611    /** Physical address of page table. Restricted by maximum physical address width of the cpu. */
    612612    uint64_t    u40PhysAddr     : 40;
    613     /** Availabe for software. */
     613    /** Available for software. */
    614614    uint64_t    u12Available    : 12;
    615615} EPTPDEBITS;
     
    646646    /** Physical address of the 2MB page. Restricted by maximum physical address width of the cpu. */
    647647    uint64_t    u31PhysAddr     : 31;
    648     /** Availabe for software. */
     648    /** Available for software. */
    649649    uint64_t    u12Available    : 12;
    650650} EPTPDE2MBITS;
     
    823823    struct
    824824    {
    825         /** Bits set here -must- be set in the correpsonding VM-execution controls. */
     825        /** Bits set here -must- be set in the corresponding VM-execution controls. */
    826826        uint32_t        disallowed0;
    827827        /** Bits cleared here -must- be cleared in the corresponding VM-execution
     
    10891089/** Number of CR3 target values supported by the processor. (0-256) */
    10901090#define MSR_IA32_VMX_MISC_CR3_TARGET(a)                         (((a) >> 16) & 0x1FF)
    1091 /** Maximum nr of MSRs in the VMCS. (N+1)*512. */
     1091/** Maximum number of MSRs in the VMCS. (N+1)*512. */
    10921092#define MSR_IA32_VMX_MISC_MAX_MSR(a)                            (((((a) >> 25) & 0x7) + 1) * 512)
    10931093/** Whether RDMSR can be used to read IA32_SMBASE_MSR in SMM. */
     
    12411241#define VMX_VMCS64_CTRL_EPTP_LIST_HIGH                          0x2025
    12421242
    1243 /** VM-exit guest phyiscal address. */
     1243/** VM-exit guest physical address. */
    12441244#define VMX_VMCS64_EXIT_GUEST_PHYS_ADDR_FULL                    0x2400
    12451245#define VMX_VMCS64_EXIT_GUEST_PHYS_ADDR_HIGH                    0x2401
     
    13731373/** Unrestricted guest execution. */
    13741374#define VMX_VMCS_CTRL_PROC_EXEC2_UNRESTRICTED_GUEST             RT_BIT(7)
    1375 /** A specified nr of pause loops cause a VM-exit. */
     1375/** A specified number of pause loops cause a VM-exit. */
    13761376#define VMX_VMCS_CTRL_PROC_EXEC2_PAUSE_LOOP_EXIT                RT_BIT(10)
    13771377/** VM-exit when executing RDRAND instructions. */
     
    13871387/** Controls whether EPT-violations may cause \#VE instead of exits. */
    13881388#define VMX_VMCS_CTRL_PROC_EXEC2_EPT_VE                         RT_BIT_64(18)
    1389 /** Enables XSAVES/SRSTORS. */
     1389/** Enables XSAVES/XRSTORS. */
    13901390#define VMX_VMCS_CTRL_PROC_EXEC2_XSAVES                         RT_BIT_64(20)
    13911391
     
    16841684/** Set if the violation was caused by a data write. */
    16851685#define VMX_EXIT_QUALIFICATION_EPT_DATA_WRITE                   RT_BIT(1)
    1686 /** Set if the violation was caused by an insruction fetch. */
     1686/** Set if the violation was caused by an instruction fetch. */
    16871687#define VMX_EXIT_QUALIFICATION_EPT_INSTR_FETCH                  RT_BIT(2)
    16881688/** AND of the present bit of all EPT structures. */
     
    18481848
    18491849/**
    1850  * Executes VMXON
    1851  *
    1852  * @returns VBox status code
    1853  * @param   pVMXOn      Physical address of VMXON structure
     1850 * Executes VMXON.
     1851 *
     1852 * @returns VBox status code.
     1853 * @param   HCPhysVmxOn      Physical address of VMXON structure.
    18541854 */
    18551855#if ((RT_INLINE_ASM_EXTERNAL || !defined(RT_ARCH_X86)) && !VMX_USE_MSC_INTRINSICS) || defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
    1856 DECLASM(int) VMXEnable(RTHCPHYS pVMXOn);
     1856DECLASM(int) VMXEnable(RTHCPHYS HCPhysVmxOn);
    18571857#else
    1858 DECLINLINE(int) VMXEnable(RTHCPHYS pVMXOn)
     1858DECLINLINE(int) VMXEnable(RTHCPHYS HCPhysVmxOn)
    18591859{
    18601860# if RT_INLINE_ASM_GNU_STYLE
     
    18741874       :"=rm"(rc)
    18751875       :"0"(VINF_SUCCESS),
    1876         "ir"((uint32_t)pVMXOn),        /* don't allow direct memory reference here, */
    1877         "ir"((uint32_t)(pVMXOn >> 32)) /* this would not work with -fomit-frame-pointer */
     1876        "ir"((uint32_t)HCPhysVmxOn),        /* don't allow direct memory reference here, */
     1877        "ir"((uint32_t)(HCPhysVmxOn >> 32)) /* this would not work with -fomit-frame-pointer */
    18781878       :"memory"
    18791879       );
     
    18811881
    18821882# elif VMX_USE_MSC_INTRINSICS
    1883     unsigned char rcMsc = __vmx_on(&pVMXOn);
     1883    unsigned char rcMsc = __vmx_on(&HCPhysVmxOn);
    18841884    if (RT_LIKELY(rcMsc == 0))
    18851885        return VINF_SUCCESS;
     
    18901890    __asm
    18911891    {
    1892         push    dword ptr [pVMXOn+4]
    1893         push    dword ptr [pVMXOn]
     1892        push    dword ptr [HCPhysVmxOn + 4]
     1893        push    dword ptr [HCPhysVmxOn]
    18941894        _emit   0xF3
    18951895        _emit   0x0F
     
    19141914
    19151915/**
    1916  * Executes VMXOFF
     1916 * Executes VMXOFF.
    19171917 */
    19181918#if ((RT_INLINE_ASM_EXTERNAL || !defined(RT_ARCH_X86)) && !VMX_USE_MSC_INTRINSICS) || defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     
    19421942
    19431943/**
    1944  * Executes VMCLEAR
    1945  *
    1946  * @returns VBox status code
    1947  * @param   pVMCS       Physical address of VM control structure
     1944 * Executes VMCLEAR.
     1945 *
     1946 * @returns VBox status code.
     1947 * @param   HCPhysVmcs       Physical address of VM control structure.
    19481948 */
    19491949#if ((RT_INLINE_ASM_EXTERNAL || !defined(RT_ARCH_X86)) && !VMX_USE_MSC_INTRINSICS) || defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
    1950 DECLASM(int) VMXClearVmcs(RTHCPHYS pVMCS);
     1950DECLASM(int) VMXClearVmcs(RTHCPHYS HCPhysVmcs);
    19511951#else
    1952 DECLINLINE(int) VMXClearVmcs(RTHCPHYS pVMCS)
     1952DECLINLINE(int) VMXClearVmcs(RTHCPHYS HCPhysVmcs)
    19531953{
    19541954# if RT_INLINE_ASM_GNU_STYLE
     
    19641964       :"=rm"(rc)
    19651965       :"0"(VINF_SUCCESS),
    1966         "ir"((uint32_t)pVMCS),        /* don't allow direct memory reference here, */
    1967         "ir"((uint32_t)(pVMCS >> 32)) /* this would not work with -fomit-frame-pointer */
     1966        "ir"((uint32_t)HCPhysVmcs),        /* don't allow direct memory reference here, */
     1967        "ir"((uint32_t)(HCPhysVmcs >> 32)) /* this would not work with -fomit-frame-pointer */
    19681968       :"memory"
    19691969       );
     
    19711971
    19721972# elif VMX_USE_MSC_INTRINSICS
    1973     unsigned char rcMsc = __vmx_vmclear(&pVMCS);
     1973    unsigned char rcMsc = __vmx_vmclear(&HCPhysVmcs);
    19741974    if (RT_LIKELY(rcMsc == 0))
    19751975        return VINF_SUCCESS;
     
    19801980    __asm
    19811981    {
    1982         push    dword ptr [pVMCS+4]
    1983         push    dword ptr [pVMCS]
     1982        push    dword ptr [HCPhysVmcs + 4]
     1983        push    dword ptr [HCPhysVmcs]
    19841984        _emit   0x66
    19851985        _emit   0x0F
     
    19991999
    20002000/**
    2001  * Executes VMPTRLD
    2002  *
    2003  * @returns VBox status code
    2004  * @param   pVMCS       Physical address of VMCS structure
     2001 * Executes VMPTRLD.
     2002 *
     2003 * @returns VBox status code.
     2004 * @param   HCPhysVmcs       Physical address of VMCS structure.
    20052005 */
    20062006#if ((RT_INLINE_ASM_EXTERNAL || !defined(RT_ARCH_X86)) && !VMX_USE_MSC_INTRINSICS) || defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
    2007 DECLASM(int) VMXActivateVmcs(RTHCPHYS pVMCS);
     2007DECLASM(int) VMXActivateVmcs(RTHCPHYS HCPhysVmcs);
    20082008#else
    2009 DECLINLINE(int) VMXActivateVmcs(RTHCPHYS pVMCS)
     2009DECLINLINE(int) VMXActivateVmcs(RTHCPHYS HCPhysVmcs)
    20102010{
    20112011# if RT_INLINE_ASM_GNU_STYLE
     
    20212021       :"=rm"(rc)
    20222022       :"0"(VINF_SUCCESS),
    2023         "ir"((uint32_t)pVMCS),        /* don't allow direct memory reference here, */
    2024         "ir"((uint32_t)(pVMCS >> 32)) /* this will not work with -fomit-frame-pointer */
     2023        "ir"((uint32_t)HCPhysVmcs),        /* don't allow direct memory reference here, */
     2024        "ir"((uint32_t)(HCPhysVmcs >> 32)) /* this will not work with -fomit-frame-pointer */
    20252025       );
    20262026    return rc;
    20272027
    20282028# elif VMX_USE_MSC_INTRINSICS
    2029     unsigned char rcMsc = __vmx_vmptrld(&pVMCS);
     2029    unsigned char rcMsc = __vmx_vmptrld(&HCPhysVmcs);
    20302030    if (RT_LIKELY(rcMsc == 0))
    20312031        return VINF_SUCCESS;
     
    20362036    __asm
    20372037    {
    2038         push    dword ptr [pVMCS+4]
    2039         push    dword ptr [pVMCS]
     2038        push    dword ptr [HCPhysVmcs + 4]
     2039        push    dword ptr [HCPhysVmcs]
    20402040        _emit   0x0F
    20412041        _emit   0xC7
     
    20542054
    20552055/**
    2056  * Executes VMPTRST
    2057  *
    2058  * @returns VBox status code
    2059  * @param pVMCS    Address that will receive the current pointer
    2060  */
    2061 DECLASM(int) VMXGetActivatedVmcs(RTHCPHYS *pVMCS);
    2062 
    2063 /**
    2064  * Executes VMWRITE
    2065  *
    2066  * @returns VBox status code
    2067  * @retval  VINF_SUCCESS
    2068  * @retval  VERR_VMX_INVALID_VMCS_PTR
    2069  * @retval  VERR_VMX_INVALID_VMCS_FIELD
    2070  *
    2071  * @param   idxField        VMCS index
    2072  * @param   u32Val          32 bits value
    2073  *
    2074  * @remarks The values of the two status codes can be ORed together, the result
     2056 * Executes VMPTRST.
     2057 *
     2058 * @returns VBox status code.
     2059 * @param   pHCPhysVmcs    Where to store the physical address of the current
     2060 *                         VMCS.
     2061 */
     2062DECLASM(int) VMXGetActivatedVmcs(RTHCPHYS *pHCPhysVmcs);
     2063
     2064/**
     2065 * Executes VMWRITE.
     2066 *
     2067 * @returns VBox status code.
     2068 * @retval  VINF_SUCCESS.
     2069 * @retval  VERR_VMX_INVALID_VMCS_PTR.
     2070 * @retval  VERR_VMX_INVALID_VMCS_FIELD.
     2071 *
     2072 * @param   idxField        VMCS index.
     2073 * @param   u32Val          32-bit value.
     2074 *
     2075 * @remarks The values of the two status codes can be OR'ed together, the result
    20752076 *          will be VERR_VMX_INVALID_VMCS_PTR.
    20762077 */
     
    21302131
    21312132/**
    2132  * Executes VMWRITE
    2133  *
    2134  * @returns VBox status code
    2135  * @retval  VINF_SUCCESS
    2136  * @retval  VERR_VMX_INVALID_VMCS_PTR
    2137  * @retval  VERR_VMX_INVALID_VMCS_FIELD
    2138  *
    2139  * @param   idxField        VMCS index
    2140  * @param   u64Val          16, 32 or 64 bits value
    2141  *
    2142  * @remarks The values of the two status codes can be ORed together, the result
     2133 * Executes VMWRITE.
     2134 *
     2135 * @returns VBox status code.
     2136 * @retval  VINF_SUCCESS.
     2137 * @retval  VERR_VMX_INVALID_VMCS_PTR.
     2138 * @retval  VERR_VMX_INVALID_VMCS_FIELD.
     2139 *
     2140 * @param   idxField        VMCS index.
     2141 * @param   u64Val          16, 32 or 64-bit value.
     2142 *
     2143 * @remarks The values of the two status codes can be OR'ed together, the result
    21432144 *          will be VERR_VMX_INVALID_VMCS_PTR.
    21442145 */
     
    21772178
    21782179/**
    2179  * Invalidate a page using invept
    2180  * @returns VBox status code
    2181  * @param   enmFlush    Type of flush
    2182  * @param   pDescriptor Descriptor
     2180 * Invalidate a page using INVEPT.
     2181 *
     2182 * @returns VBox status code.
     2183 * @param   enmFlush        Type of flush.
     2184 * @param   pDescriptor     Pointer to the descriptor.
    21832185 */
    21842186DECLASM(int) VMXR0InvEPT(VMXFLUSHEPT enmFlush, uint64_t *pDescriptor);
    21852187
    21862188/**
    2187  * Invalidate a page using invvpid
    2188  * @returns VBox status code
    2189  * @param   enmFlush    Type of flush
    2190  * @param   pDescriptor Descriptor
     2189 * Invalidate a page using INVVPID.
     2190 *
     2191 * @returns VBox status code.
     2192 * @param   enmFlush        Type of flush.
     2193 * @param   pDescriptor     Pointer to the descriptor.
    21912194 */
    21922195DECLASM(int) VMXR0InvVPID(VMXFLUSHVPID enmFlush, uint64_t *pDescriptor);
    21932196
    21942197/**
    2195  * Executes VMREAD
    2196  *
    2197  * @returns VBox status code
    2198  * @retval  VINF_SUCCESS
    2199  * @retval  VERR_VMX_INVALID_VMCS_PTR
    2200  * @retval  VERR_VMX_INVALID_VMCS_FIELD
    2201  *
    2202  * @param   idxField        VMCS index
    2203  * @param   pData           Ptr to store VM field value
    2204  *
    2205  * @remarks The values of the two status codes can be ORed together, the result
     2198 * Executes VMREAD.
     2199 *
     2200 * @returns VBox status code.
     2201 * @retval  VINF_SUCCESS.
     2202 * @retval  VERR_VMX_INVALID_VMCS_PTR.
     2203 * @retval  VERR_VMX_INVALID_VMCS_FIELD.
     2204 *
     2205 * @param   idxField        VMCS index.
     2206 * @param   pData           Where to store VM field value.
     2207 *
     2208 * @remarks The values of the two status codes can be OR'ed together, the result
    22062209 *          will be VERR_VMX_INVALID_VMCS_PTR.
    22072210 */
     
    22712274
    22722275/**
    2273  * Executes VMREAD
    2274  *
    2275  * @returns VBox status code
    2276  * @retval  VINF_SUCCESS
    2277  * @retval  VERR_VMX_INVALID_VMCS_PTR
    2278  * @retval  VERR_VMX_INVALID_VMCS_FIELD
    2279  *
    2280  * @param   idxField        VMCS index
    2281  * @param   pData           Ptr to store VM field value
    2282  *
    2283  * @remarks The values of the two status codes can be ORed together, the result
     2276 * Executes VMREAD.
     2277 *
     2278 * @returns VBox status code.
     2279 * @retval  VINF_SUCCESS.
     2280 * @retval  VERR_VMX_INVALID_VMCS_PTR.
     2281 * @retval  VERR_VMX_INVALID_VMCS_FIELD.
     2282 *
     2283 * @param   idxField        VMCS index.
     2284 * @param   pData           Where to store VM field value.
     2285 *
     2286 * @remarks The values of the two status codes can be OR'ed together, the result
    22842287 *          will be VERR_VMX_INVALID_VMCS_PTR.
    22852288 */
     
    23202323
    23212324/**
    2322  * Gets the last instruction error value from the current VMCS
    2323  *
    2324  * @returns error value
     2325 * Gets the last instruction error value from the current VMCS.
     2326 *
     2327 * @returns VBox status code.
    23252328 */
    23262329DECLINLINE(uint32_t) VMXGetLastError(void)
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