- Timestamp:
- Aug 15, 2024 12:36:59 PM (4 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUM-armv8.cpp
r101549 r105686 316 316 SSMFIELD_ENTRY( CPUMCTX, CntvCtlEl0), 317 317 SSMFIELD_ENTRY( CPUMCTX, CntvCValEl0), 318 /** @name EL2 support: 319 * @{ */ 320 SSMFIELD_ENTRY( CPUMCTX, CntHCtlEl2), 321 SSMFIELD_ENTRY( CPUMCTX, CntHpCtlEl2), 322 SSMFIELD_ENTRY( CPUMCTX, CntHpCValEl2), 323 SSMFIELD_ENTRY( CPUMCTX, CntHpTValEl2), 324 SSMFIELD_ENTRY( CPUMCTX, CntVOffEl2), 325 SSMFIELD_ENTRY( CPUMCTX, CptrEl2), 326 SSMFIELD_ENTRY( CPUMCTX, ElrEl2), 327 SSMFIELD_ENTRY( CPUMCTX, EsrEl2), 328 SSMFIELD_ENTRY( CPUMCTX, FarEl2), 329 SSMFIELD_ENTRY( CPUMCTX, HcrEl2), 330 SSMFIELD_ENTRY( CPUMCTX, HpFarEl2), 331 SSMFIELD_ENTRY( CPUMCTX, MairEl2), 332 SSMFIELD_ENTRY( CPUMCTX, MdcrEl2), 333 SSMFIELD_ENTRY( CPUMCTX, SctlrEl2), 334 SSMFIELD_ENTRY( CPUMCTX, SpsrEl2), 335 SSMFIELD_ENTRY( CPUMCTX, SpEl2), 336 SSMFIELD_ENTRY( CPUMCTX, TcrEl2), 337 SSMFIELD_ENTRY( CPUMCTX, TpidrEl2), 338 SSMFIELD_ENTRY( CPUMCTX, Ttbr0El2), 339 SSMFIELD_ENTRY( CPUMCTX, Ttbr1El2), 340 SSMFIELD_ENTRY( CPUMCTX, VBarEl2), 341 SSMFIELD_ENTRY( CPUMCTX, VMpidrEl2), 342 SSMFIELD_ENTRY( CPUMCTX, VPidrEl2), 343 SSMFIELD_ENTRY( CPUMCTX, VTcrEl2), 344 SSMFIELD_ENTRY( CPUMCTX, VTtbrEl2), 345 /** @} */ 346 318 347 SSMFIELD_ENTRY_TERM() 319 348 }; … … 362 391 363 392 pVM->cpum.s.GuestInfo.paSysRegRangesR3 = &pVM->cpum.s.GuestInfo.aSysRegRanges[0]; 393 pVM->cpum.s.bResetEl = ARMV8_AARCH64_EL_1; 364 394 365 395 PCFGMNODE pCpumCfg = CFGMR3GetChild(CFGMR3GetRoot(pVM), "CPUM"); 366 396 367 397 /** @cfgm{/CPUM/ResetPcValue, string} 368 * Program counter value after a reset, sets the address of the first i sntruction to execute. */398 * Program counter value after a reset, sets the address of the first instruction to execute. */ 369 399 int rc = CFGMR3QueryU64Def(pCpumCfg, "ResetPcValue", &pVM->cpum.s.u64ResetPc, 0); 370 400 AssertLogRelRCReturn(rc, rc); 401 402 /** @cfgm{/CPUM/NestedHWVirt, bool, false} 403 * Whether to expose the hardware virtualization (EL2) feature to the guest. 404 * The default is false, and when enabled requires a 64-bit CPU and a NEM backend 405 * supporting it. 406 */ 407 bool fNestedHWVirt = false; 408 rc = CFGMR3QueryBoolDef(pCpumCfg, "NestedHWVirt", &fNestedHWVirt, false); 409 AssertLogRelRCReturn(rc, rc); 410 if (fNestedHWVirt) 411 pVM->cpum.s.bResetEl = ARMV8_AARCH64_EL_2; 371 412 372 413 /* … … 468 509 /* Start in Supervisor mode. */ 469 510 /** @todo Differentiate between Aarch64 and Aarch32 configuation. */ 470 pCtx->fPState = ARMV8_SPSR_EL2_AARCH64_SET_EL( ARMV8_AARCH64_EL_1)511 pCtx->fPState = ARMV8_SPSR_EL2_AARCH64_SET_EL(pVM->cpum.s.bResetEl) 471 512 | ARMV8_SPSR_EL2_AARCH64_SP 472 513 | ARMV8_SPSR_EL2_AARCH64_D -
trunk/src/VBox/VMM/VMMR3/CPUMDbg-armv8.cpp
r100118 r105686 157 157 #undef CPUMREGALIAS_STD 158 158 159 static DBGFREGALIAS const g_aCpumRegAliases_pstate[] =160 {161 { "spsr_el2", DBGFREGVALTYPE_U64 },162 { NULL, DBGFREGVALTYPE_INVALID }163 };164 165 159 166 160 /* … … 270 264 CPU_GREG_REG(29), 271 265 CPU_GREG_REG(30), 272 CPU_REG_RW_AS("pstate", PSTATE, U64, fPState, cpumR3RegGet_Generic, cpumR3RegSet_Generic, g_aCpumRegAliases_pstate,g_aCpumRegFields_pstate ),266 CPU_REG_RW_AS("pstate", PSTATE, U64, fPState, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, g_aCpumRegFields_pstate ), 273 267 CPU_REG_RW_AS("pc", PC, U64, Pc, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 274 268 CPU_REG_RW_AS("sp_el0", SP_EL0, U64, aSpReg[0], cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), … … 315 309 CPU_VREG_REG(30), 316 310 CPU_VREG_REG(31), 311 CPU_REG_RW_AS("cnthctl_el2", CNTHCTL_EL2, U64, CntHCtlEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 312 CPU_REG_RW_AS("cnthp_ctl_el2", CNTHP_CTL_EL2, U64, CntHpCtlEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 313 CPU_REG_RW_AS("cnthp_cval_el2", CNTHP_CVAL_EL2, U64, CntHpCValEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 314 CPU_REG_RW_AS("cnthp_tval_el2", CNTHP_TVAL_EL2, U64, CntHpTValEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 315 CPU_REG_RW_AS("cntvoff_el2", CNTVOFF_EL2, U64, CntVOffEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 316 CPU_REG_RW_AS("cptr_el2", CPTR_EL2, U64, CptrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 317 CPU_REG_RW_AS("elr_el2", ELR_EL2, U64, ElrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 318 CPU_REG_RW_AS("esr_el2", ESR_EL2, U64, EsrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 319 CPU_REG_RW_AS("far_el2", FAR_EL2, U64, FarEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 320 CPU_REG_RW_AS("hcr_el2", HCR_EL2, U64, HcrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 321 CPU_REG_RW_AS("hpfar_el2", HPFAR_EL2, U64, HpFarEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 322 CPU_REG_RW_AS("mair_el2", MAIR_EL2, U64, MairEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 323 CPU_REG_RW_AS("mdcr_el2", MDCR_EL2, U64, MdcrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 324 CPU_REG_RW_AS("sctlr_el2", SCTLR_EL2, U64, SctlrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 325 CPU_REG_RW_AS("spsr_el2", SPSR_EL2, U64, SpsrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 326 CPU_REG_RW_AS("sp_el2", SP_EL2, U64, SpEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 327 CPU_REG_RW_AS("tcr_el2", TCR_EL2, U64, TcrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 328 CPU_REG_RW_AS("tpidr_el2", TPIDR_EL2, U64, TpidrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 329 CPU_REG_RW_AS("ttbr0_el2", TTBR0_EL2, U64, Ttbr0El2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 330 CPU_REG_RW_AS("ttbr1_el2", TTBR1_EL2, U64, Ttbr1El2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 331 CPU_REG_RW_AS("vbar_el2", VBAR_EL2, U64, VBarEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 332 CPU_REG_RW_AS("vmpidr_el2", VMPIDR_EL2, U64, VMpidrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 333 CPU_REG_RW_AS("vpidr_el2", VPIDR_EL2, U64, VPidrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 334 CPU_REG_RW_AS("vtcr_el2", VTCR_EL2, U64, VTcrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 335 CPU_REG_RW_AS("vttbr_el2", VTTBR_EL2, U64, VTtbrEl2, cpumR3RegGet_Generic, cpumR3RegSet_Generic, NULL, NULL ), 336 317 337 DBGFREGDESC_TERMINATOR() 318 338 -
trunk/src/VBox/VMM/include/CPUMInternal-armv8.h
r101549 r105686 105 105 * This is used to verify load order dependencies (PGM). */ 106 106 bool fPendingRestore; 107 uint8_t abPadding0[6]; 107 /** The initial exception level (EL) to start the CPU after a reset, 108 * should be either ARMV8_AARCH64_EL_1 or ARMV8_AARCH64_EL_2 for nested virtualization. */ 109 uint8_t bResetEl; 110 111 uint8_t abPadding0[5]; 108 112 109 113 /** The reset value of the program counter. */
Note:
See TracChangeset
for help on using the changeset viewer.