VirtualBox

Changeset 70299 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Dec 22, 2017 5:16:03 AM (7 years ago)
Author:
vboxsync
Message:

VMM: Moved the SVM dumping functions to where it's logically more correct as we emulate SVM in IEM too.

Location:
trunk/src/VBox/VMM/VMMR3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r70269 r70299  
    22092209
    22102210/**
     2211 * Displays an SVM VMCB control area.
     2212 *
     2213 * @param   pHlp        The info helper functions.
     2214 * @param   pVmcbCtrl   Pointer to a SVM VMCB controls area.
     2215 * @param   pszPrefix   Caller specified string prefix.
     2216 */
     2217static void cpumR3InfoSvmVmcbCtrl(PCDBGFINFOHLP pHlp, PCSVMVMCBCTRL pVmcbCtrl, const char *pszPrefix)
     2218{
     2219    AssertReturnVoid(pHlp);
     2220    AssertReturnVoid(pVmcbCtrl);
     2221
     2222    pHlp->pfnPrintf(pHlp, "%su16InterceptRdCRx          = %#RX16\n",    pszPrefix, pVmcbCtrl->u16InterceptRdCRx);
     2223    pHlp->pfnPrintf(pHlp, "%su16InterceptWrCRx          = %#RX16\n",    pszPrefix, pVmcbCtrl->u16InterceptWrCRx);
     2224    pHlp->pfnPrintf(pHlp, "%su16InterceptRdDRx          = %#RX16\n",    pszPrefix, pVmcbCtrl->u16InterceptRdDRx);
     2225    pHlp->pfnPrintf(pHlp, "%su16InterceptWrDRx          = %#RX16\n",    pszPrefix, pVmcbCtrl->u16InterceptWrDRx);
     2226    pHlp->pfnPrintf(pHlp, "%su32InterceptXcpt           = %#RX32\n",    pszPrefix, pVmcbCtrl->u32InterceptXcpt);
     2227    pHlp->pfnPrintf(pHlp, "%su64InterceptCtrl           = %#RX64\n",    pszPrefix, pVmcbCtrl->u64InterceptCtrl);
     2228    pHlp->pfnPrintf(pHlp, "%su16PauseFilterThreshold    = %#RX16\n",    pszPrefix, pVmcbCtrl->u16PauseFilterThreshold);
     2229    pHlp->pfnPrintf(pHlp, "%su16PauseFilterCount        = %#RX16\n",    pszPrefix, pVmcbCtrl->u16PauseFilterCount);
     2230    pHlp->pfnPrintf(pHlp, "%su64IOPMPhysAddr            = %#RX64\n",    pszPrefix, pVmcbCtrl->u64IOPMPhysAddr);
     2231    pHlp->pfnPrintf(pHlp, "%su64MSRPMPhysAddr           = %#RX64\n",    pszPrefix, pVmcbCtrl->u64MSRPMPhysAddr);
     2232    pHlp->pfnPrintf(pHlp, "%su64TSCOffset               = %#RX64\n",    pszPrefix, pVmcbCtrl->u64TSCOffset);
     2233    pHlp->pfnPrintf(pHlp, "%sTLBCtrl\n",                                pszPrefix);
     2234    pHlp->pfnPrintf(pHlp, "%s  u32ASID                    = %#RX32\n",  pszPrefix, pVmcbCtrl->TLBCtrl.n.u32ASID);
     2235    pHlp->pfnPrintf(pHlp, "%s  u8TLBFlush                 = %u\n",      pszPrefix, pVmcbCtrl->TLBCtrl.n.u8TLBFlush);
     2236    pHlp->pfnPrintf(pHlp, "%sIntCtrl\n",                                pszPrefix);
     2237    pHlp->pfnPrintf(pHlp, "%s  u8VTPR                     = %#RX8 (%u)\n",   pszPrefix, pVmcbCtrl->IntCtrl.n.u8VTPR, pVmcbCtrl->IntCtrl.n.u8VTPR);
     2238    pHlp->pfnPrintf(pHlp, "%s  u1VIrqPending              = %RTbool\n", pszPrefix, pVmcbCtrl->IntCtrl.n.u1VIrqPending);
     2239    pHlp->pfnPrintf(pHlp, "%s  u1VGif                     = %RTbool\n", pszPrefix, pVmcbCtrl->IntCtrl.n.u1VGif);
     2240    pHlp->pfnPrintf(pHlp, "%s  u4VIntrPrio                = %#RX8\n",   pszPrefix, pVmcbCtrl->IntCtrl.n.u4VIntrPrio);
     2241    pHlp->pfnPrintf(pHlp, "%s  u1IgnoreTPR                = %RTbool\n", pszPrefix, pVmcbCtrl->IntCtrl.n.u1IgnoreTPR);
     2242    pHlp->pfnPrintf(pHlp, "%s  u1VIntrMasking             = %RTbool\n", pszPrefix, pVmcbCtrl->IntCtrl.n.u1VIntrMasking);
     2243    pHlp->pfnPrintf(pHlp, "%s  u1AvicEnable               = %RTbool\n", pszPrefix, pVmcbCtrl->IntCtrl.n.u1AvicEnable);
     2244    pHlp->pfnPrintf(pHlp, "%s  u8VIntrVector              = %#RX8\n",   pszPrefix, pVmcbCtrl->IntCtrl.n.u8VIntrVector);
     2245    pHlp->pfnPrintf(pHlp, "%su64IntShadow               = %#RX64\n",    pszPrefix, pVmcbCtrl->u64IntShadow);
     2246    pHlp->pfnPrintf(pHlp, "%su64ExitCode                = %#RX64\n",    pszPrefix, pVmcbCtrl->u64ExitCode);
     2247    pHlp->pfnPrintf(pHlp, "%su64ExitInfo1               = %#RX64\n",    pszPrefix, pVmcbCtrl->u64ExitInfo1);
     2248    pHlp->pfnPrintf(pHlp, "%su64ExitInfo2               = %#RX64\n",    pszPrefix, pVmcbCtrl->u64ExitInfo2);
     2249    pHlp->pfnPrintf(pHlp, "%sExitIntInfo\n",                            pszPrefix);
     2250    pHlp->pfnPrintf(pHlp, "%s  u8Vector                   = %#RX8 (%u)\n", pszPrefix, pVmcbCtrl->ExitIntInfo.n.u8Vector, pVmcbCtrl->ExitIntInfo.n.u8Vector);
     2251    pHlp->pfnPrintf(pHlp, "%s  u3Type                     = %u\n",      pszPrefix, pVmcbCtrl->ExitIntInfo.n.u3Type);
     2252    pHlp->pfnPrintf(pHlp, "%s  u1ErrorCodeValid           = %RTbool\n", pszPrefix, pVmcbCtrl->ExitIntInfo.n.u1ErrorCodeValid);
     2253    pHlp->pfnPrintf(pHlp, "%s  u1Valid                    = %RTbool\n", pszPrefix, pVmcbCtrl->ExitIntInfo.n.u1Valid);
     2254    pHlp->pfnPrintf(pHlp, "%s  u32ErrorCode               = %#RX32\n",  pszPrefix, pVmcbCtrl->ExitIntInfo.n.u32ErrorCode);
     2255    pHlp->pfnPrintf(pHlp, "%sNestedPaging and SEV\n",                   pszPrefix);
     2256    pHlp->pfnPrintf(pHlp, "%s  u1NestedPaging             = %RTbool\n", pszPrefix, pVmcbCtrl->u1NestedPaging);
     2257    pHlp->pfnPrintf(pHlp, "%s  u1Sev                      = %RTbool\n", pszPrefix, pVmcbCtrl->u1Sev);
     2258    pHlp->pfnPrintf(pHlp, "%s  u1SevEs                    = %RTbool\n", pszPrefix, pVmcbCtrl->u1SevEs);
     2259    pHlp->pfnPrintf(pHlp, "%sAvicBar\n",                                pszPrefix);
     2260    pHlp->pfnPrintf(pHlp, "%s  u40Addr                    = %#RX64\n",  pszPrefix, pVmcbCtrl->AvicBar.n.u40Addr);
     2261    pHlp->pfnPrintf(pHlp, "%sEventInject\n",                            pszPrefix);
     2262    pHlp->pfnPrintf(pHlp, "%s  EventInject\n",                          pszPrefix);
     2263    pHlp->pfnPrintf(pHlp, "%s  u8Vector                   = %#RX32 (%u)\n", pszPrefix, pVmcbCtrl->EventInject.n.u8Vector, pVmcbCtrl->EventInject.n.u8Vector);
     2264    pHlp->pfnPrintf(pHlp, "%s  u3Type                     = %u\n",      pszPrefix, pVmcbCtrl->EventInject.n.u3Type);
     2265    pHlp->pfnPrintf(pHlp, "%s  u1ErrorCodeValid           = %RTbool\n", pszPrefix, pVmcbCtrl->EventInject.n.u1ErrorCodeValid);
     2266    pHlp->pfnPrintf(pHlp, "%s  u1Valid                    = %RTbool\n", pszPrefix, pVmcbCtrl->EventInject.n.u1Valid);
     2267    pHlp->pfnPrintf(pHlp, "%s  u32ErrorCode               = %#RX32\n",  pszPrefix, pVmcbCtrl->EventInject.n.u32ErrorCode);
     2268    pHlp->pfnPrintf(pHlp, "%su64NestedPagingCR3         = %#RX64\n",    pszPrefix, pVmcbCtrl->u64NestedPagingCR3);
     2269    pHlp->pfnPrintf(pHlp, "%su1LbrVirt                  = %RTbool\n",   pszPrefix, pVmcbCtrl->u1LbrVirt);
     2270    pHlp->pfnPrintf(pHlp, "%su1VirtVmsaveVmload         = %RTbool\n",   pszPrefix, pVmcbCtrl->u1VirtVmsaveVmload);
     2271    pHlp->pfnPrintf(pHlp, "%su32VmcbCleanBits           = %#RX32\n",    pszPrefix, pVmcbCtrl->u32VmcbCleanBits);
     2272    pHlp->pfnPrintf(pHlp, "%su64NextRIP                 = %#RX64\n",    pszPrefix, pVmcbCtrl->u64NextRIP);
     2273    pHlp->pfnPrintf(pHlp, "%scbInstrFetched             = %u\n",        pszPrefix, pVmcbCtrl->cbInstrFetched);
     2274    pHlp->pfnPrintf(pHlp, "%sabInstr                    = %.*Rhxs\n",   pszPrefix, sizeof(pVmcbCtrl->abInstr), pVmcbCtrl->abInstr);
     2275    pHlp->pfnPrintf(pHlp, "%sAvicBackingPagePtr\n",                     pszPrefix);
     2276    pHlp->pfnPrintf(pHlp, "%s  u40Addr                    = %#RX64\n",  pszPrefix, pVmcbCtrl->AvicBackingPagePtr.n.u40Addr);
     2277    pHlp->pfnPrintf(pHlp, "%sAvicLogicalTablePtr\n",                    pszPrefix);
     2278    pHlp->pfnPrintf(pHlp, "%s  u40Addr                    = %#RX64\n",  pszPrefix, pVmcbCtrl->AvicLogicalTablePtr.n.u40Addr);
     2279    pHlp->pfnPrintf(pHlp, "%sAvicPhysicalTablePtr\n",                   pszPrefix);
     2280    pHlp->pfnPrintf(pHlp, "%s  u8LastGuestCoreId          = %u\n",      pszPrefix, pVmcbCtrl->AvicPhysicalTablePtr.n.u8LastGuestCoreId);
     2281    pHlp->pfnPrintf(pHlp, "%s  u40Addr                    = %#RX64\n",  pszPrefix, pVmcbCtrl->AvicPhysicalTablePtr.n.u40Addr);
     2282}
     2283
     2284
     2285/**
     2286 * Helper for dumping the SVM VMCB selector registers.
     2287 *
     2288 * @param   pHlp        The info helper functions.
     2289 * @param   pSel        Pointer to the SVM selector register.
     2290 * @param   pszName     Name of the selector.
     2291 * @param   pszPrefix   Caller specified string prefix.
     2292 */
     2293DECLINLINE(void) cpumR3InfoSvmVmcbStateSaveSelReg(PCDBGFINFOHLP pHlp, PCSVMSELREG pSel, const char *pszName, const char *pszPrefix)
     2294{
     2295    /* The string width of 4 used below is to handle 'LDTR'. Change later if longer register names are used. */
     2296    pHlp->pfnPrintf(pHlp, "%s%-4s                       = {%04x base=%016RX64 limit=%08x flags=%04x}\n", pszPrefix,
     2297                    pszName, pSel->u16Sel, pSel->u64Base, pSel->u32Limit, pSel->u16Attr);
     2298}
     2299
     2300
     2301/**
     2302 * Helper for dumping the SVM VMCB GDTR/IDTR registers.
     2303 *
     2304 * @param   pHlp        The info helper functions.
     2305 * @param   pSel        Pointer to the descriptor table register.
     2306 * @param   pszName     Name of the descriptor table register.
     2307 * @param   pszPrefix   Caller specified string prefix.
     2308 */
     2309DECLINLINE(void) cpumR3InfoSvmVmcbStateXdtr(PCDBGFINFOHLP pHlp, PCSVMXDTR pXdtr, const char *pszName, const char *pszPrefix)
     2310{
     2311    /* The string width of 4 used below is to cover 'GDTR', 'IDTR'. Change later if longer register names are used. */
     2312    pHlp->pfnPrintf(pHlp, "%s%-4s                       = %016RX64:%04x\n", pszPrefix, pszName, pXdtr->u64Base, pXdtr->u32Limit);
     2313}
     2314
     2315
     2316/**
     2317 * Displays an SVM VMCB state-save area.
     2318 *
     2319 * @param   pHlp            The info helper functions.
     2320 * @param   pVmcbStateSave  Pointer to a SVM VMCB controls area.
     2321 * @param   pszPrefix       Caller specified string prefix.
     2322 */
     2323static void cpumR3InfoSvmVmcbStateSave(PCDBGFINFOHLP pHlp, PCSVMVMCBSTATESAVE pVmcbStateSave, const char *pszPrefix)
     2324{
     2325    AssertReturnVoid(pHlp);
     2326    AssertReturnVoid(pVmcbStateSave);
     2327
     2328    cpumR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->CS,   "CS",   pszPrefix);
     2329    cpumR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->SS,   "SS",   pszPrefix);
     2330    cpumR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->ES,   "ES",   pszPrefix);
     2331    cpumR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->DS,   "DS",   pszPrefix);
     2332    cpumR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->FS,   "FS",   pszPrefix);
     2333    cpumR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->GS,   "GS",   pszPrefix);
     2334    cpumR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->LDTR, "LDTR", pszPrefix);
     2335    cpumR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->TR,   "TR",   pszPrefix);
     2336    cpumR3InfoSvmVmcbStateXdtr(pHlp, &pVmcbStateSave->GDTR,       "GDTR", pszPrefix);
     2337    cpumR3InfoSvmVmcbStateXdtr(pHlp, &pVmcbStateSave->IDTR,       "IDTR", pszPrefix);
     2338    pHlp->pfnPrintf(pHlp, "%su8CPL                      = %u\n",          pszPrefix, pVmcbStateSave->u8CPL);
     2339    pHlp->pfnPrintf(pHlp, "%su64EFER                    = %#RX64\n",      pszPrefix, pVmcbStateSave->u64EFER);
     2340    pHlp->pfnPrintf(pHlp, "%su64CR4                     = %#RX64\n",      pszPrefix, pVmcbStateSave->u64CR4);
     2341    pHlp->pfnPrintf(pHlp, "%su64CR3                     = %#RX64\n",      pszPrefix, pVmcbStateSave->u64CR3);
     2342    pHlp->pfnPrintf(pHlp, "%su64CR0                     = %#RX64\n",      pszPrefix, pVmcbStateSave->u64CR0);
     2343    pHlp->pfnPrintf(pHlp, "%su64DR7                     = %#RX64\n",      pszPrefix, pVmcbStateSave->u64DR7);
     2344    pHlp->pfnPrintf(pHlp, "%su64DR6                     = %#RX64\n",      pszPrefix, pVmcbStateSave->u64DR6);
     2345    pHlp->pfnPrintf(pHlp, "%su64RFlags                  = %#RX64\n",      pszPrefix, pVmcbStateSave->u64RFlags);
     2346    pHlp->pfnPrintf(pHlp, "%su64RIP                     = %#RX64\n",      pszPrefix, pVmcbStateSave->u64RIP);
     2347    pHlp->pfnPrintf(pHlp, "%su64RSP                     = %#RX64\n",      pszPrefix, pVmcbStateSave->u64RSP);
     2348    pHlp->pfnPrintf(pHlp, "%su64RAX                     = %#RX64\n",      pszPrefix, pVmcbStateSave->u64RAX);
     2349    pHlp->pfnPrintf(pHlp, "%su64STAR                    = %#RX64\n",      pszPrefix, pVmcbStateSave->u64STAR);
     2350    pHlp->pfnPrintf(pHlp, "%su64LSTAR                   = %#RX64\n",      pszPrefix, pVmcbStateSave->u64LSTAR);
     2351    pHlp->pfnPrintf(pHlp, "%su64CSTAR                   = %#RX64\n",      pszPrefix, pVmcbStateSave->u64CSTAR);
     2352    pHlp->pfnPrintf(pHlp, "%su64SFMASK                  = %#RX64\n",      pszPrefix, pVmcbStateSave->u64SFMASK);
     2353    pHlp->pfnPrintf(pHlp, "%su64KernelGSBase            = %#RX64\n",      pszPrefix, pVmcbStateSave->u64KernelGSBase);
     2354    pHlp->pfnPrintf(pHlp, "%su64SysEnterCS              = %#RX64\n",      pszPrefix, pVmcbStateSave->u64SysEnterCS);
     2355    pHlp->pfnPrintf(pHlp, "%su64SysEnterEIP             = %#RX64\n",      pszPrefix, pVmcbStateSave->u64SysEnterEIP);
     2356    pHlp->pfnPrintf(pHlp, "%su64SysEnterESP             = %#RX64\n",      pszPrefix, pVmcbStateSave->u64SysEnterESP);
     2357    pHlp->pfnPrintf(pHlp, "%su64CR2                     = %#RX64\n",      pszPrefix, pVmcbStateSave->u64CR2);
     2358    pHlp->pfnPrintf(pHlp, "%su64GPAT                    = %#RX64\n",      pszPrefix, pVmcbStateSave->u64GPAT);
     2359    pHlp->pfnPrintf(pHlp, "%su64DBGCTL                  = %#RX64\n",      pszPrefix, pVmcbStateSave->u64DBGCTL);
     2360    pHlp->pfnPrintf(pHlp, "%su64BR_FROM                 = %#RX64\n",      pszPrefix, pVmcbStateSave->u64BR_FROM);
     2361    pHlp->pfnPrintf(pHlp, "%su64BR_TO                   = %#RX64\n",      pszPrefix, pVmcbStateSave->u64BR_TO);
     2362    pHlp->pfnPrintf(pHlp, "%su64LASTEXCPFROM            = %#RX64\n",      pszPrefix, pVmcbStateSave->u64LASTEXCPFROM);
     2363    pHlp->pfnPrintf(pHlp, "%su64LASTEXCPTO              = %#RX64\n",      pszPrefix, pVmcbStateSave->u64LASTEXCPTO);
     2364}
     2365
     2366
     2367/**
    22112368 * Display the guest's hardware-virtualization cpu state.
    22122369 *
     
    22612418        pHlp->pfnPrintf(pHlp, "  GCPhysVmcb                 = %#RGp\n",     pCtx->hwvirt.svm.GCPhysVmcb);
    22622419        pHlp->pfnPrintf(pHlp, "  VmcbCtrl:\n");
    2263         HMR3InfoSvmVmcbCtrl(pHlp, &pCtx->hwvirt.svm.pVmcbR3->ctrl,       "    " /* pszPrefix */);
     2420        cpumR3InfoSvmVmcbCtrl(pHlp, &pCtx->hwvirt.svm.pVmcbR3->ctrl,       "    " /* pszPrefix */);
    22642421        pHlp->pfnPrintf(pHlp, "  VmcbStateSave:\n");
    2265         HMR3InfoSvmVmcbStateSave(pHlp, &pCtx->hwvirt.svm.pVmcbR3->guest, "    " /* pszPrefix */);
     2422        cpumR3InfoSvmVmcbStateSave(pHlp, &pCtx->hwvirt.svm.pVmcbR3->guest, "    " /* pszPrefix */);
    22662423        pHlp->pfnPrintf(pHlp, "  HostState:\n");
    22672424        pHlp->pfnPrintf(pHlp, "    uEferMsr                   = %#RX64\n",  pCtx->hwvirt.svm.HostState.uEferMsr);
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r70290 r70299  
    36093609}
    36103610
    3611 
    3612 /**
    3613  * Displays SVM VMCB control area.
    3614  *
    3615  * @param   pHlp        The info helper functions.
    3616  * @param   pVmcbCtrl   Pointer to a SVM VMCB controls area.
    3617  * @param   pszPrefix   Caller specified string prefix.
    3618  */
    3619 VMMR3_INT_DECL(void) HMR3InfoSvmVmcbCtrl(PCDBGFINFOHLP pHlp, PCSVMVMCBCTRL pVmcbCtrl, const char *pszPrefix)
    3620 {
    3621     AssertReturnVoid(pHlp);
    3622     AssertReturnVoid(pVmcbCtrl);
    3623 
    3624     pHlp->pfnPrintf(pHlp, "%su16InterceptRdCRx          = %#RX16\n",    pszPrefix, pVmcbCtrl->u16InterceptRdCRx);
    3625     pHlp->pfnPrintf(pHlp, "%su16InterceptWrCRx          = %#RX16\n",    pszPrefix, pVmcbCtrl->u16InterceptWrCRx);
    3626     pHlp->pfnPrintf(pHlp, "%su16InterceptRdDRx          = %#RX16\n",    pszPrefix, pVmcbCtrl->u16InterceptRdDRx);
    3627     pHlp->pfnPrintf(pHlp, "%su16InterceptWrDRx          = %#RX16\n",    pszPrefix, pVmcbCtrl->u16InterceptWrDRx);
    3628     pHlp->pfnPrintf(pHlp, "%su32InterceptXcpt           = %#RX32\n",    pszPrefix, pVmcbCtrl->u32InterceptXcpt);
    3629     pHlp->pfnPrintf(pHlp, "%su64InterceptCtrl           = %#RX64\n",    pszPrefix, pVmcbCtrl->u64InterceptCtrl);
    3630     pHlp->pfnPrintf(pHlp, "%su16PauseFilterThreshold    = %#RX16\n",    pszPrefix, pVmcbCtrl->u16PauseFilterThreshold);
    3631     pHlp->pfnPrintf(pHlp, "%su16PauseFilterCount        = %#RX16\n",    pszPrefix, pVmcbCtrl->u16PauseFilterCount);
    3632     pHlp->pfnPrintf(pHlp, "%su64IOPMPhysAddr            = %#RX64\n",    pszPrefix, pVmcbCtrl->u64IOPMPhysAddr);
    3633     pHlp->pfnPrintf(pHlp, "%su64MSRPMPhysAddr           = %#RX64\n",    pszPrefix, pVmcbCtrl->u64MSRPMPhysAddr);
    3634     pHlp->pfnPrintf(pHlp, "%su64TSCOffset               = %#RX64\n",    pszPrefix, pVmcbCtrl->u64TSCOffset);
    3635     pHlp->pfnPrintf(pHlp, "%sTLBCtrl\n",                                pszPrefix);
    3636     pHlp->pfnPrintf(pHlp, "%s  u32ASID                    = %#RX32\n",  pszPrefix, pVmcbCtrl->TLBCtrl.n.u32ASID);
    3637     pHlp->pfnPrintf(pHlp, "%s  u8TLBFlush                 = %u\n",      pszPrefix, pVmcbCtrl->TLBCtrl.n.u8TLBFlush);
    3638     pHlp->pfnPrintf(pHlp, "%sIntCtrl\n",                                pszPrefix);
    3639     pHlp->pfnPrintf(pHlp, "%s  u8VTPR                     = %#RX8 (%u)\n",   pszPrefix, pVmcbCtrl->IntCtrl.n.u8VTPR, pVmcbCtrl->IntCtrl.n.u8VTPR);
    3640     pHlp->pfnPrintf(pHlp, "%s  u1VIrqPending              = %RTbool\n", pszPrefix, pVmcbCtrl->IntCtrl.n.u1VIrqPending);
    3641     pHlp->pfnPrintf(pHlp, "%s  u1VGif                     = %RTbool\n", pszPrefix, pVmcbCtrl->IntCtrl.n.u1VGif);
    3642     pHlp->pfnPrintf(pHlp, "%s  u4VIntrPrio                = %#RX8\n",   pszPrefix, pVmcbCtrl->IntCtrl.n.u4VIntrPrio);
    3643     pHlp->pfnPrintf(pHlp, "%s  u1IgnoreTPR                = %RTbool\n", pszPrefix, pVmcbCtrl->IntCtrl.n.u1IgnoreTPR);
    3644     pHlp->pfnPrintf(pHlp, "%s  u1VIntrMasking             = %RTbool\n", pszPrefix, pVmcbCtrl->IntCtrl.n.u1VIntrMasking);
    3645     pHlp->pfnPrintf(pHlp, "%s  u1AvicEnable               = %RTbool\n", pszPrefix, pVmcbCtrl->IntCtrl.n.u1AvicEnable);
    3646     pHlp->pfnPrintf(pHlp, "%s  u8VIntrVector              = %#RX8\n",   pszPrefix, pVmcbCtrl->IntCtrl.n.u8VIntrVector);
    3647     pHlp->pfnPrintf(pHlp, "%su64IntShadow               = %#RX64\n",    pszPrefix, pVmcbCtrl->u64IntShadow);
    3648     pHlp->pfnPrintf(pHlp, "%su64ExitCode                = %#RX64\n",    pszPrefix, pVmcbCtrl->u64ExitCode);
    3649     pHlp->pfnPrintf(pHlp, "%su64ExitInfo1               = %#RX64\n",    pszPrefix, pVmcbCtrl->u64ExitInfo1);
    3650     pHlp->pfnPrintf(pHlp, "%su64ExitInfo2               = %#RX64\n",    pszPrefix, pVmcbCtrl->u64ExitInfo2);
    3651     pHlp->pfnPrintf(pHlp, "%sExitIntInfo\n",                            pszPrefix);
    3652     pHlp->pfnPrintf(pHlp, "%s  u8Vector                   = %#RX8 (%u)\n", pszPrefix, pVmcbCtrl->ExitIntInfo.n.u8Vector, pVmcbCtrl->ExitIntInfo.n.u8Vector);
    3653     pHlp->pfnPrintf(pHlp, "%s  u3Type                     = %u\n",      pszPrefix, pVmcbCtrl->ExitIntInfo.n.u3Type);
    3654     pHlp->pfnPrintf(pHlp, "%s  u1ErrorCodeValid           = %RTbool\n", pszPrefix, pVmcbCtrl->ExitIntInfo.n.u1ErrorCodeValid);
    3655     pHlp->pfnPrintf(pHlp, "%s  u1Valid                    = %RTbool\n", pszPrefix, pVmcbCtrl->ExitIntInfo.n.u1Valid);
    3656     pHlp->pfnPrintf(pHlp, "%s  u32ErrorCode               = %#RX32\n",  pszPrefix, pVmcbCtrl->ExitIntInfo.n.u32ErrorCode);
    3657     pHlp->pfnPrintf(pHlp, "%sNestedPaging and SEV\n",                   pszPrefix);
    3658     pHlp->pfnPrintf(pHlp, "%s  u1NestedPaging             = %RTbool\n", pszPrefix, pVmcbCtrl->u1NestedPaging);
    3659     pHlp->pfnPrintf(pHlp, "%s  u1Sev                      = %RTbool\n", pszPrefix, pVmcbCtrl->u1Sev);
    3660     pHlp->pfnPrintf(pHlp, "%s  u1SevEs                    = %RTbool\n", pszPrefix, pVmcbCtrl->u1SevEs);
    3661     pHlp->pfnPrintf(pHlp, "%sAvicBar\n",                                pszPrefix);
    3662     pHlp->pfnPrintf(pHlp, "%s  u40Addr                    = %#RX64\n",  pszPrefix, pVmcbCtrl->AvicBar.n.u40Addr);
    3663     pHlp->pfnPrintf(pHlp, "%sEventInject\n",                            pszPrefix);
    3664     pHlp->pfnPrintf(pHlp, "%s  EventInject\n",                          pszPrefix);
    3665     pHlp->pfnPrintf(pHlp, "%s  u8Vector                   = %#RX32 (%u)\n", pszPrefix, pVmcbCtrl->EventInject.n.u8Vector, pVmcbCtrl->EventInject.n.u8Vector);
    3666     pHlp->pfnPrintf(pHlp, "%s  u3Type                     = %u\n",      pszPrefix, pVmcbCtrl->EventInject.n.u3Type);
    3667     pHlp->pfnPrintf(pHlp, "%s  u1ErrorCodeValid           = %RTbool\n", pszPrefix, pVmcbCtrl->EventInject.n.u1ErrorCodeValid);
    3668     pHlp->pfnPrintf(pHlp, "%s  u1Valid                    = %RTbool\n", pszPrefix, pVmcbCtrl->EventInject.n.u1Valid);
    3669     pHlp->pfnPrintf(pHlp, "%s  u32ErrorCode               = %#RX32\n",  pszPrefix, pVmcbCtrl->EventInject.n.u32ErrorCode);
    3670     pHlp->pfnPrintf(pHlp, "%su64NestedPagingCR3         = %#RX64\n",    pszPrefix, pVmcbCtrl->u64NestedPagingCR3);
    3671     pHlp->pfnPrintf(pHlp, "%su1LbrVirt                  = %RTbool\n",   pszPrefix, pVmcbCtrl->u1LbrVirt);
    3672     pHlp->pfnPrintf(pHlp, "%su1VirtVmsaveVmload         = %RTbool\n",   pszPrefix, pVmcbCtrl->u1VirtVmsaveVmload);
    3673     pHlp->pfnPrintf(pHlp, "%su32VmcbCleanBits           = %#RX32\n",    pszPrefix, pVmcbCtrl->u32VmcbCleanBits);
    3674     pHlp->pfnPrintf(pHlp, "%su64NextRIP                 = %#RX64\n",    pszPrefix, pVmcbCtrl->u64NextRIP);
    3675     pHlp->pfnPrintf(pHlp, "%scbInstrFetched             = %u\n",        pszPrefix, pVmcbCtrl->cbInstrFetched);
    3676     pHlp->pfnPrintf(pHlp, "%sabInstr                    = %.*Rhxs\n",   pszPrefix, sizeof(pVmcbCtrl->abInstr), pVmcbCtrl->abInstr);
    3677     pHlp->pfnPrintf(pHlp, "%sAvicBackingPagePtr\n",                     pszPrefix);
    3678     pHlp->pfnPrintf(pHlp, "%s  u40Addr                    = %#RX64\n",  pszPrefix, pVmcbCtrl->AvicBackingPagePtr.n.u40Addr);
    3679     pHlp->pfnPrintf(pHlp, "%sAvicLogicalTablePtr\n",                    pszPrefix);
    3680     pHlp->pfnPrintf(pHlp, "%s  u40Addr                    = %#RX64\n",  pszPrefix, pVmcbCtrl->AvicLogicalTablePtr.n.u40Addr);
    3681     pHlp->pfnPrintf(pHlp, "%sAvicPhysicalTablePtr\n",                   pszPrefix);
    3682     pHlp->pfnPrintf(pHlp, "%s  u8LastGuestCoreId          = %u\n",      pszPrefix, pVmcbCtrl->AvicPhysicalTablePtr.n.u8LastGuestCoreId);
    3683     pHlp->pfnPrintf(pHlp, "%s  u40Addr                    = %#RX64\n",  pszPrefix, pVmcbCtrl->AvicPhysicalTablePtr.n.u40Addr);
    3684 }
    3685 
    3686 
    3687 /**
    3688  * Helper for dumping the SVM VMCB selector registers.
    3689  *
    3690  * @param   pHlp        The info helper functions.
    3691  * @param   pSel        Pointer to the SVM selector register.
    3692  * @param   pszName     Name of the selector.
    3693  * @param   pszPrefix   Caller specified string prefix.
    3694  */
    3695 DECLINLINE(void) hmR3InfoSvmVmcbStateSaveSelReg(PCDBGFINFOHLP pHlp, PCSVMSELREG pSel, const char *pszName, const char *pszPrefix)
    3696 {
    3697     pHlp->pfnPrintf(pHlp, "%s%-12s               = {%04x base=%016RX64 limit=%08x flags=%04x}\n", pszPrefix,
    3698                     pszName, pSel->u16Sel, pSel->u64Base, pSel->u32Limit, pSel->u16Attr);
    3699 }
    3700 
    3701 
    3702 /**
    3703  * Helper for dumping the SVM VMCB GDTR/IDTR registers.
    3704  *
    3705  * @param   pHlp        The info helper functions.
    3706  * @param   pSel        Pointer to the descriptor table register.
    3707  * @param   pszName     Name of the descriptor table register.
    3708  * @param   pszPrefix   Caller specified string prefix.
    3709  */
    3710 DECLINLINE(void) hmR3InfoSvmVmcbStateXdtr(PCDBGFINFOHLP pHlp, PCSVMXDTR pXdtr, const char *pszName, const char *pszPrefix)
    3711 {
    3712     pHlp->pfnPrintf(pHlp, "%s%-12s               = %016RX64:%04x\n", pszPrefix, pszName, pXdtr->u64Base, pXdtr->u32Limit);
    3713 }
    3714 
    3715 
    3716 /**
    3717  * Displays SVM VMCB state-save area.
    3718  *
    3719  * @param   pHlp            The info helper functions.
    3720  * @param   pVmcbStateSave  Pointer to a SVM VMCB controls area.
    3721  * @param   pszPrefix       Caller specified string prefix.
    3722  */
    3723 VMMR3_INT_DECL(void) HMR3InfoSvmVmcbStateSave(PCDBGFINFOHLP pHlp, PCSVMVMCBSTATESAVE pVmcbStateSave, const char *pszPrefix)
    3724 {
    3725     AssertReturnVoid(pHlp);
    3726     AssertReturnVoid(pVmcbStateSave);
    3727 
    3728     hmR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->ES, "ES",     pszPrefix);
    3729     hmR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->CS, "CS",     pszPrefix);
    3730     hmR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->SS, "SS",     pszPrefix);
    3731     hmR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->DS, "DS",     pszPrefix);
    3732     hmR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->FS, "FS",     pszPrefix);
    3733     hmR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->GS, "GS",     pszPrefix);
    3734     hmR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->LDTR, "LDTR", pszPrefix);
    3735     hmR3InfoSvmVmcbStateSaveSelReg(pHlp, &pVmcbStateSave->TR, "TR",     pszPrefix);
    3736     hmR3InfoSvmVmcbStateXdtr(pHlp, &pVmcbStateSave->GDTR, "GDTR",       pszPrefix);
    3737     hmR3InfoSvmVmcbStateXdtr(pHlp, &pVmcbStateSave->IDTR, "IDTR",       pszPrefix);
    3738     pHlp->pfnPrintf(pHlp, "%su8CPL                      = %u\n",        pszPrefix, pVmcbStateSave->u8CPL);
    3739     pHlp->pfnPrintf(pHlp, "%su64EFER                    = %#RX64\n",    pszPrefix, pVmcbStateSave->u64EFER);
    3740     pHlp->pfnPrintf(pHlp, "%su64CR4                     = %#RX64\n",    pszPrefix, pVmcbStateSave->u64CR4);
    3741     pHlp->pfnPrintf(pHlp, "%su64CR3                     = %#RX64\n",    pszPrefix, pVmcbStateSave->u64CR3);
    3742     pHlp->pfnPrintf(pHlp, "%su64CR0                     = %#RX64\n",    pszPrefix, pVmcbStateSave->u64CR0);
    3743     pHlp->pfnPrintf(pHlp, "%su64DR7                     = %#RX64\n",    pszPrefix, pVmcbStateSave->u64DR7);
    3744     pHlp->pfnPrintf(pHlp, "%su64DR6                     = %#RX64\n",    pszPrefix, pVmcbStateSave->u64DR6);
    3745     pHlp->pfnPrintf(pHlp, "%su64RFlags                  = %#RX64\n",    pszPrefix, pVmcbStateSave->u64RFlags);
    3746     pHlp->pfnPrintf(pHlp, "%su64RIP                     = %#RX64\n",    pszPrefix, pVmcbStateSave->u64RIP);
    3747     pHlp->pfnPrintf(pHlp, "%su64RSP                     = %#RX64\n",    pszPrefix, pVmcbStateSave->u64RSP);
    3748     pHlp->pfnPrintf(pHlp, "%su64RAX                     = %#RX64\n",    pszPrefix, pVmcbStateSave->u64RAX);
    3749     pHlp->pfnPrintf(pHlp, "%su64STAR                    = %#RX64\n",    pszPrefix, pVmcbStateSave->u64STAR);
    3750     pHlp->pfnPrintf(pHlp, "%su64LSTAR                   = %#RX64\n",    pszPrefix, pVmcbStateSave->u64LSTAR);
    3751     pHlp->pfnPrintf(pHlp, "%su64CSTAR                   = %#RX64\n",    pszPrefix, pVmcbStateSave->u64CSTAR);
    3752     pHlp->pfnPrintf(pHlp, "%su64SFMASK                  = %#RX64\n",    pszPrefix, pVmcbStateSave->u64SFMASK);
    3753     pHlp->pfnPrintf(pHlp, "%su64KernelGSBase            = %#RX64\n",    pszPrefix, pVmcbStateSave->u64KernelGSBase);
    3754     pHlp->pfnPrintf(pHlp, "%su64SysEnterCS              = %#RX64\n",    pszPrefix, pVmcbStateSave->u64SysEnterCS);
    3755     pHlp->pfnPrintf(pHlp, "%su64SysEnterEIP             = %#RX64\n",    pszPrefix, pVmcbStateSave->u64SysEnterEIP);
    3756     pHlp->pfnPrintf(pHlp, "%su64SysEnterESP             = %#RX64\n",    pszPrefix, pVmcbStateSave->u64SysEnterESP);
    3757     pHlp->pfnPrintf(pHlp, "%su64CR2                     = %#RX64\n",    pszPrefix, pVmcbStateSave->u64CR2);
    3758     pHlp->pfnPrintf(pHlp, "%su64GPAT                    = %#RX64\n",    pszPrefix, pVmcbStateSave->u64GPAT);
    3759     pHlp->pfnPrintf(pHlp, "%su64DBGCTL                  = %#RX64\n",    pszPrefix, pVmcbStateSave->u64DBGCTL);
    3760     pHlp->pfnPrintf(pHlp, "%su64BR_FROM                 = %#RX64\n",    pszPrefix, pVmcbStateSave->u64BR_FROM);
    3761     pHlp->pfnPrintf(pHlp, "%su64BR_TO                   = %#RX64\n",    pszPrefix, pVmcbStateSave->u64BR_TO);
    3762     pHlp->pfnPrintf(pHlp, "%su64LASTEXCPFROM            = %#RX64\n",    pszPrefix, pVmcbStateSave->u64LASTEXCPFROM);
    3763     pHlp->pfnPrintf(pHlp, "%su64LASTEXCPTO              = %#RX64\n",    pszPrefix, pVmcbStateSave->u64LASTEXCPTO);
    3764 }
    3765 
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