VirtualBox

Changeset 80364 in vbox for trunk/include


Ignore:
Timestamp:
Aug 21, 2019 10:03:57 AM (5 years ago)
Author:
vboxsync
Message:

VMM: Nested VMX: bugref:9180 Move some of the description functions into the inline header. Removed some temporary debugging nits.

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

Legend:

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

    r80281 r80364  
    118118VMM_INT_DECL(bool)              HMIsVmxActive(PVM pVM);
    119119VMM_INT_DECL(const char *)      HMGetVmxDiagDesc(VMXVDIAG enmDiag);
    120 VMM_INT_DECL(const char *)      HMGetVmxAbortDesc(VMXABORT enmAbort);
    121 VMM_INT_DECL(const char *)      HMGetVmxVmcsStateDesc(uint8_t fVmcsState);
    122 VMM_INT_DECL(const char *)      HMGetVmxIdtVectoringInfoTypeDesc(uint8_t uType);
    123 VMM_INT_DECL(const char *)      HMGetVmxExitIntInfoTypeDesc(uint8_t uType);
    124 VMM_INT_DECL(const char *)      HMGetVmxEntryIntInfoTypeDesc(uint8_t uType);
    125120VMM_INT_DECL(const char *)      HMGetVmxExitName(uint32_t uExit);
    126121VMM_INT_DECL(const char *)      HMGetSvmExitName(uint32_t uExit);
  • trunk/include/VBox/vmm/hmvmxinline.h

    r80147 r80364  
    228228    return false;
    229229}
     230
     231
     232/**
     233 * Gets the description for a VMX abort reason.
     234 *
     235 * @returns The descriptive string.
     236 * @param   enmAbort    The VMX abort reason.
     237 */
     238DECLINLINE(const char *) VMXGetAbortDesc(VMXABORT enmAbort)
     239{
     240    switch (enmAbort)
     241    {
     242        case VMXABORT_NONE:                     return "VMXABORT_NONE";
     243        case VMXABORT_SAVE_GUEST_MSRS:          return "VMXABORT_SAVE_GUEST_MSRS";
     244        case VMXBOART_HOST_PDPTE:               return "VMXBOART_HOST_PDPTE";
     245        case VMXABORT_CURRENT_VMCS_CORRUPT:     return "VMXABORT_CURRENT_VMCS_CORRUPT";
     246        case VMXABORT_LOAD_HOST_MSR:            return "VMXABORT_LOAD_HOST_MSR";
     247        case VMXABORT_MACHINE_CHECK_XCPT:       return "VMXABORT_MACHINE_CHECK_XCPT";
     248        case VMXABORT_HOST_NOT_IN_LONG_MODE:    return "VMXABORT_HOST_NOT_IN_LONG_MODE";
     249        default:
     250            break;
     251    }
     252    return "Unknown/invalid";
     253}
     254
     255
     256/**
     257 * Gets the description for a virtual VMCS state.
     258 *
     259 * @returns The descriptive string.
     260 * @param   fVmcsState      The virtual-VMCS state.
     261 */
     262DECLINLINE(const char *) VMXGetVmcsStateDesc(uint8_t fVmcsState)
     263{
     264    switch (fVmcsState)
     265    {
     266        case VMX_V_VMCS_LAUNCH_STATE_CLEAR:     return "Clear";
     267        case VMX_V_VMCS_LAUNCH_STATE_LAUNCHED:  return "Launched";
     268        default:                                return "Unknown";
     269    }
     270}
     271
     272
     273/**
     274 * Gets the description for a VM-entry interruption information event type.
     275 *
     276 * @returns The descriptive string.
     277 * @param   uType    The event type.
     278 */
     279DECLINLINE(const char *) VMXGetEntryIntInfoTypeDesc(uint8_t uType)
     280{
     281    switch (uType)
     282    {
     283        case VMX_ENTRY_INT_INFO_TYPE_EXT_INT:       return "External Interrupt";
     284        case VMX_ENTRY_INT_INFO_TYPE_NMI:           return "NMI";
     285        case VMX_ENTRY_INT_INFO_TYPE_HW_XCPT:       return "Hardware Exception";
     286        case VMX_ENTRY_INT_INFO_TYPE_SW_INT:        return "Software Interrupt";
     287        case VMX_ENTRY_INT_INFO_TYPE_PRIV_SW_XCPT:  return "Priv. Software Exception";
     288        case VMX_ENTRY_INT_INFO_TYPE_SW_XCPT:       return "Software Exception";
     289        case VMX_ENTRY_INT_INFO_TYPE_OTHER_EVENT:   return "Other Event";
     290        default:
     291            break;
     292    }
     293    return "Unknown/invalid";
     294}
     295
     296
     297/**
     298 * Gets the description for a VM-exit interruption information event type.
     299 *
     300 * @returns The descriptive string.
     301 * @param   uType    The event type.
     302 */
     303DECLINLINE(const char *) VMXGetExitIntInfoTypeDesc(uint8_t uType)
     304{
     305    switch (uType)
     306    {
     307        case VMX_EXIT_INT_INFO_TYPE_EXT_INT:       return "External Interrupt";
     308        case VMX_EXIT_INT_INFO_TYPE_NMI:           return "NMI";
     309        case VMX_EXIT_INT_INFO_TYPE_HW_XCPT:       return "Hardware Exception";
     310        case VMX_EXIT_INT_INFO_TYPE_SW_INT:        return "Software Interrupt";
     311        case VMX_EXIT_INT_INFO_TYPE_PRIV_SW_XCPT:  return "Priv. Software Exception";
     312        case VMX_EXIT_INT_INFO_TYPE_SW_XCPT:       return "Software Exception";
     313        default:
     314            break;
     315    }
     316    return "Unknown/invalid";
     317}
     318
     319
     320/**
     321 * Gets the description for an IDT-vectoring information event type.
     322 *
     323 * @returns The descriptive string.
     324 * @param   uType    The event type.
     325 */
     326DECLINLINE(const char *) VMXGetIdtVectoringInfoTypeDesc(uint8_t uType)
     327{
     328    switch (uType)
     329    {
     330        case VMX_IDT_VECTORING_INFO_TYPE_EXT_INT:       return "External Interrupt";
     331        case VMX_IDT_VECTORING_INFO_TYPE_NMI:           return "NMI";
     332        case VMX_IDT_VECTORING_INFO_TYPE_HW_XCPT:       return "Hardware Exception";
     333        case VMX_IDT_VECTORING_INFO_TYPE_SW_INT:        return "Software Interrupt";
     334        case VMX_IDT_VECTORING_INFO_TYPE_PRIV_SW_XCPT:  return "Priv. Software Exception";
     335        case VMX_IDT_VECTORING_INFO_TYPE_SW_XCPT:       return "Software Exception";
     336        default:
     337            break;
     338    }
     339    return "Unknown/invalid";
     340}
     341
     342
    230343/** @} */
    231344
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