VirtualBox

Ignore:
Timestamp:
Dec 4, 2024 3:20:14 PM (6 weeks ago)
Author:
vboxsync
Message:

VMM: Cleaning up ARMv8 / x86 split. jiraref:VBP-1470

File:
1 edited

Legend:

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

    r106061 r107227  
    359359
    360360
    361 #if !defined(VBOX_VMM_TARGET_ARMV8)
     361#ifdef VBOX_VMM_TARGET_X86
    362362/**
    363363 * Worker for DBGFR3SelQueryInfo that calls into SELM.
     
    409409    return rc;
    410410}
    411 #endif
     411#endif /* VBOX_VMM_TARGET_X86 */
    412412
    413413
     
    447447    memset(pSelInfo, 0, sizeof(*pSelInfo));
    448448
    449 #if defined(VBOX_VMM_TARGET_ARMV8)
     449#ifdef VBOX_VMM_TARGET_X86
     450    /*
     451     * Dispatch the request to a worker running on the target CPU.
     452     */
     453    return VMR3ReqPriorityCallWaitU(pUVM, idCpu, (PFNRT)dbgfR3SelQueryInfo, 5, pUVM, idCpu, Sel, fFlags, pSelInfo);
     454#else
    450455    RT_NOREF(Sel);
    451456    return VERR_NOT_SUPPORTED;
    452 #else
    453     /*
    454      * Dispatch the request to a worker running on the target CPU.
    455      */
    456     return VMR3ReqPriorityCallWaitU(pUVM, idCpu, (PFNRT)dbgfR3SelQueryInfo, 5, pUVM, idCpu, Sel, fFlags, pSelInfo);
    457457#endif
    458458}
     
    496496
    497497
     498#ifdef VBOX_WITH_HWVIRT
    498499/**
    499500 * Converts a PGM paging mode to a set of DBGFPGDMP_XXX flags.
     
    506507    switch (enmMode)
    507508    {
    508 #if !defined(VBOX_VMM_TARGET_ARMV8)
     509# ifdef VBOX_VMM_TARGET_X86
    509510        case PGMMODE_32_BIT:
    510511            return DBGFPGDMP_FLAGS_PSE;
     
    525526        case PGMMODE_EPT:
    526527            return DBGFPGDMP_FLAGS_EPT;
     528
     529# elif defined(VBOX_VMM_TARGET_ARM64)
     530       /** @todo arm64: dumping page tables. */
     531# else
     532#  error "port me"
     533# endif
    527534        case PGMMODE_NONE:
    528535            return 0;
    529536        default:
    530537            AssertFailedReturn(UINT32_MAX);
    531 #else
    532         case PGMMODE_NONE:
    533             return 0;
    534         default:
    535             AssertFailedReturn(UINT32_MAX);
    536 #endif
    537     }
    538 }
     538    }
     539}
     540#endif /* VBOX_WITH_HWVIRT */
    539541
    540542
     
    586588                return VINF_SUCCESS;
    587589            }
    588 
    589 #if !defined(VBOX_VMM_TARGET_ARMV8)
     590#if defined(VBOX_WITH_HWVIRT)
    590591            if (fFlags & DBGFPGDMP_FLAGS_CURRENT_CR3)
    591592                cr3 = PGMGetHyperCR3(pVCpu);
    592 #endif
    593593            if (fFlags & DBGFPGDMP_FLAGS_CURRENT_MODE)
    594594                fFlags |= dbgfR3PagingDumpModeToFlags(PGMGetShadowMode(pVCpu));
     595#else
     596            pHlp->pfnPrintf(pHlp, "Expected shadowing mode PGMMODE_NONE, found %d!\n", PGMGetShadowMode(pVCpu));
     597            return VINF_SUCCESS;
     598#endif
    595599        }
    596600        else
    597601        {
    598 #if defined(VBOX_VMM_TARGET_ARMV8)
    599             AssertReleaseFailed();
    600 #else
     602#ifdef VBOX_VMM_TARGET_X86
    601603            if (fFlags & DBGFPGDMP_FLAGS_CURRENT_CR3)
    602604                cr3 = CPUMGetGuestCR3(pVCpu);
     
    608610                fFlags |= CPUMGetGuestEFER(pVCpu) & (MSR_K6_EFER_LME | MSR_K6_EFER_NXE);
    609611            }
     612#elif defined(VBOX_VMM_TARGET_ARMV8)
     613            /** @todo arm64: port me   */
     614            AssertReleaseFailed();
     615            return VERR_NOT_IMPLEMENTED;
     616#else
     617# error "port me"
    610618#endif
    611619        }
     
    645653                                uint64_t u64LastAddr, uint32_t cMaxDepth, PCDBGFINFOHLP pHlp)
    646654{
     655/** @todo adjust this for ARMv8. Probably need two root parameters (instead of
     656 * cr3) as well as a bunch new flags. */
    647657    /*
    648658     * Input validation.
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