Changeset 103374 in vbox
- Timestamp:
- Feb 14, 2024 10:10:00 PM (10 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/GICAll.cpp
r101062 r103374 1126 1126 VMCPUID idCpu = 0; 1127 1127 uint16_t uTgtList = ARMV8_ICC_SGI1R_EL1_AARCH64_TARGET_LIST_GET(u64Value); 1128 /** @todo rewrite using ASMBitFirstSetU16. */ 1128 1129 while (uTgtList) 1129 1130 { … … 1131 1132 { 1132 1133 PVMCPUCC pVCpuDst = VMMGetCpuById(pVCpu->CTX_SUFF(pVM), idCpu); 1133 GICSgiSet(pVCpuDst, uIntId, true /*fAsserted*/); 1134 if (pVCpuDst) 1135 GICSgiSet(pVCpuDst, uIntId, true /*fAsserted*/); 1136 else 1137 AssertFailed(); 1134 1138 } 1135 1139 uTgtList >>= 1; -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r100964 r103374 1480 1480 const unsigned iPml4 = (GCPtr >> X86_PML4_SHIFT) & X86_PML4_MASK; 1481 1481 PX86PML4E pPml4e = pgmShwGetLongModePML4EPtr(pVCpu, iPml4); 1482 AssertReturn(pPml4e, VERR_PGM_PML4_MAPPING); 1482 1483 X86PGPAEUINT const uPml4e = pPml4e->u; 1483 1484 -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r102075 r103374 1420 1420 const unsigned iPDDst = (uint32_t)GCPtrPage >> SHW_PD_SHIFT; 1421 1421 PX86PDE pPdeDst = pgmShwGet32BitPDEPtr(pVCpu, GCPtrPage); 1422 AssertReturn(pPdeDst, VERR_INTERNAL_ERROR_3); 1422 1423 1423 1424 /* Fetch the pgm pool shadow descriptor. */ … … 2137 2138 const unsigned iPDDst = (GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK; 2138 2139 PX86PDE pPdeDst = pgmShwGet32BitPDEPtr(pVCpu, GCPtrPage); 2140 AssertReturn(pPdeDst, VERR_INTERNAL_ERROR_3); 2139 2141 2140 2142 /* Fetch the pgm pool shadow descriptor. */ … … 3403 3405 const unsigned iPDDst = GCPtrPage >> SHW_PD_SHIFT; 3404 3406 PSHWPDE pPdeDst = pgmShwGet32BitPDEPtr(pVCpu, GCPtrPage); 3407 AssertReturn(pPdeDst, VERR_INTERNAL_ERROR_3); 3405 3408 3406 3409 /* Fetch the pgm pool shadow descriptor. */ … … 3801 3804 const unsigned iPDDst = (GCPtrPage >> SHW_PD_SHIFT) & SHW_PD_MASK; 3802 3805 PSHWPDE pPdeDst = pgmShwGet32BitPDEPtr(pVCpu, GCPtrPage); 3806 AssertReturn(pPdeDst, VERR_INTERNAL_ERROR_3); 3803 3807 3804 3808 /* Fetch the pgm pool shadow descriptor. */ … … 4210 4214 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 4211 4215 PX86PDE pPdeDst = pgmShwGet32BitPDEPtr(pVCpu, GCPtrPage); 4216 AssertReturn(pPdeDst, VERR_INTERNAL_ERROR_3); 4212 4217 4213 4218 # elif PGM_SHW_TYPE == PGM_TYPE_PAE … … 4459 4464 for (; iPml4 < X86_PG_PAE_ENTRIES; iPml4++) 4460 4465 { 4461 PPGMPOOLPAGE pShwPdpt = NULL; 4462 PX86PML4E pPml4eSrc; 4463 PX86PML4E pPml4eDst; 4464 RTGCPHYS GCPhysPdptSrc; 4465 4466 pPml4eSrc = pgmGstGetLongModePML4EPtr(pVCpu, iPml4); 4467 pPml4eDst = pgmShwGetLongModePML4EPtr(pVCpu, iPml4); 4466 PX86PML4E const pPml4eSrc = pgmGstGetLongModePML4EPtr(pVCpu, iPml4); 4467 AssertContinueStmt(pPml4eSrc, cErrors++); 4468 4469 PX86PML4E const pPml4eDst = pgmShwGetLongModePML4EPtr(pVCpu, iPml4); 4470 AssertContinueStmt(pPml4eDst, cErrors++); 4468 4471 4469 4472 /* Fetch the pgm pool shadow descriptor if the shadow pml4e is present. */ … … 4474 4477 } 4475 4478 4476 pShwPdpt = pgmPoolGetPage(pPool, pPml4eDst->u & X86_PML4E_PG_MASK);4477 GCPhysPdptSrc = PGM_A20_APPLY(pVCpu, pPml4eSrc->u & X86_PML4E_PG_MASK);4479 PPGMPOOLPAGE pShwPdpt = pgmPoolGetPage(pPool, pPml4eDst->u & X86_PML4E_PG_MASK); 4480 RTGCPHYS GCPhysPdptSrc = PGM_A20_APPLY(pVCpu, pPml4eSrc->u & X86_PML4E_PG_MASK); 4478 4481 4479 4482 if ((pPml4eSrc->u & X86_PML4E_P) != (pPml4eDst->u & X86_PML4E_P)) -
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r100966 r103374 1508 1508 STAM_COUNTER_INC(&pVM->pgm.s.Stats.CTX_MID_Z(Stat,PhysHandlerReset)); 1509 1509 1510 PPGMRAMRANGE pRam = pgmPhysGetRange(pVM, GCPhys); 1511 Assert(pRam); 1512 Assert(pRam->GCPhys <= pCur->Key); 1513 Assert(pRam->GCPhysLast >= pCur->KeyLast); 1510 #ifdef VBOX_STRICT 1511 PPGMRAMRANGE const pRamStrict = pgmPhysGetRange(pVM, GCPhys); 1512 Assert(pRamStrict && pRamStrict->GCPhys <= pCur->Key); 1513 Assert(pRamStrict && pRamStrict->GCPhysLast >= pCur->KeyLast); 1514 #endif 1514 1515 1515 1516 /* … … 1518 1519 if (pCur->cTmpOffPages > 0) 1519 1520 { 1520 rc = pgmHandlerPhysicalSetRamFlagsAndFlushShadowPTs(pVM, pCur, pRam, pvBitmap, offBitmap); 1521 PPGMRAMRANGE const pRam = pgmPhysGetRange(pVM, GCPhys); 1522 if (pRam) /* paranoia */ 1523 rc = pgmHandlerPhysicalSetRamFlagsAndFlushShadowPTs(pVM, pCur, pRam, pvBitmap, offBitmap); 1524 else 1525 AssertFailed(); 1521 1526 pCur->cTmpOffPages = 0; 1522 1527 } … … 1914 1919 * Get and validate the pages. 1915 1920 */ 1916 PPGMPAGE pPage; 1921 PPGMPAGE pPage = NULL; 1922 #ifdef VBOX_WITH_NATIVE_NEM 1923 PPGMRAMRANGE pRam = NULL; 1924 rc = pgmPhysGetPageAndRangeEx(pVM, GCPhysPage, &pPage, &pRam); 1925 #else 1917 1926 rc = pgmPhysGetPageEx(pVM, GCPhysPage, &pPage); 1927 #endif 1918 1928 AssertReturnStmt(RT_SUCCESS_NP(rc), PGM_UNLOCK(pVM), rc); 1919 1929 if (PGM_PAGE_GET_TYPE(pPage) != PGMPAGETYPE_MMIO) … … 1954 1964 if (VM_IS_NEM_ENABLED(pVM)) 1955 1965 { 1956 PPGMRAMRANGE pRam = pgmPhysGetRange(pVM, GCPhysPage); 1957 uint8_t u2State = PGM_PAGE_GET_NEM_STATE(pPage); 1966 uint8_t u2State = PGM_PAGE_GET_NEM_STATE(pPage); 1958 1967 NEMHCNotifyPhysPageChanged(pVM, GCPhysPage, pVM->pgm.s.HCPhysZeroPg, PGM_PAGE_GET_HCPHYS(pPage), 1959 1968 PGM_RAMRANGE_CALC_PAGE_R3PTR(pRam, GCPhysPage), -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r102663 r103374 658 658 VMMDECL(bool) PGMPhysIsA20Enabled(PVMCPU pVCpu) 659 659 { 660 LogFlow(("PGMPhysIsA20Enabled %d\n", pVCpu->pgm.s.fA20Enabled)); 661 return pVCpu->pgm.s.fA20Enabled; 660 /* Must check that pVCpu isn't NULL here because PDM device helper are a little lazy. */ 661 LogFlow(("PGMPhysIsA20Enabled %d\n", pVCpu && pVCpu->pgm.s.fA20Enabled)); 662 return pVCpu && pVCpu->pgm.s.fA20Enabled; 662 663 } 663 664 -
trunk/src/VBox/VMM/VMMR3/DBGFStack.cpp
r102559 r103374 848 848 else 849 849 { 850 PVMCPU pVCpu = VMMGetCpuById(pUVM->pVM, idCpu);851 CPUMMODE enmCpuMode = CPUMGetGuestMode(pVCpu);850 PVMCPU const pVCpu = pUVM->pVM->apCpusR3[idCpu]; 851 CPUMMODE const enmCpuMode = CPUMGetGuestMode(pVCpu); 852 852 if (enmCpuMode == CPUMMODE_REAL) 853 853 { … … 1029 1029 { 1030 1030 case DBGFCODETYPE_GUEST: 1031 pCtx = CPUMQueryGuestCtxPtr( VMMGetCpuById(pVM, idCpu));1031 pCtx = CPUMQueryGuestCtxPtr(pVM->apCpusR3[idCpu]); 1032 1032 hAs = DBGF_AS_GLOBAL; 1033 1033 break; 1034 1034 case DBGFCODETYPE_HYPER: 1035 pCtx = CPUMQueryGuestCtxPtr( VMMGetCpuById(pVM, idCpu));1035 pCtx = CPUMQueryGuestCtxPtr(pVM->apCpusR3[idCpu]); 1036 1036 hAs = DBGF_AS_RC_AND_GC_GLOBAL; 1037 1037 break; -
trunk/src/VBox/VMM/VMMR3/VMM.cpp
r100101 r103374 1296 1296 1297 1297 #if defined(VBOX_VMM_TARGET_ARMV8) 1298 1298 1299 /** 1299 1300 * VCPU worker for VMMR3CpuOn. … … 1306 1307 static DECLCALLBACK(int) vmmR3CpuOn(PVM pVM, VMCPUID idCpu, RTGCPHYS GCPhysExecAddr, uint64_t u64CtxId) 1307 1308 { 1308 PVMCPU pVCpu = VMMGetCpuById(pVM, idCpu);1309 PVMCPU pVCpu = pVM->apCpusR3[idCpu]; 1309 1310 VMCPU_ASSERT_EMT(pVCpu); 1310 1311 … … 1346 1347 AssertRC(rc); 1347 1348 } 1348 #else 1349 1350 #else /* !VBOX_VMM_TARGET_ARMV8 */ 1351 1349 1352 /** 1350 1353 * VCPU worker for VMMR3SendStartupIpi. … … 1356 1359 static DECLCALLBACK(int) vmmR3SendStartupIpi(PVM pVM, VMCPUID idCpu, uint32_t uVector) 1357 1360 { 1358 PVMCPU pVCpu = VMMGetCpuById(pVM, idCpu);1361 PVMCPU pVCpu = pVM->apCpusR3[idCpu]; 1359 1362 VMCPU_ASSERT_EMT(pVCpu); 1360 1363 … … 1411 1414 static DECLCALLBACK(int) vmmR3SendInitIpi(PVM pVM, VMCPUID idCpu) 1412 1415 { 1413 PVMCPU pVCpu = VMMGetCpuById(pVM, idCpu);1416 PVMCPU pVCpu = pVM->apCpusR3[idCpu]; 1414 1417 VMCPU_ASSERT_EMT(pVCpu); 1415 1418 … … 1420 1423 1421 1424 /* If the CPU is in VMX non-root mode, INIT signals cause VM-exits. */ 1422 # ifdef VBOX_WITH_NESTED_HWVIRT_VMX1425 # ifdef VBOX_WITH_NESTED_HWVIRT_VMX 1423 1426 PCCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVCpu); 1424 1427 if (CPUMIsGuestInVmxNonRootMode(pCtx)) 1425 1428 return VBOXSTRICTRC_TODO(IEMExecVmxVmexit(pVCpu, VMX_EXIT_INIT_SIGNAL, 0 /* uExitQual */)); 1426 # endif1429 # endif 1427 1430 1428 1431 /** @todo Figure out how to handle a SVM nested-guest intercepts here for INIT … … 1431 1434 PGMR3ResetCpu(pVM, pVCpu); 1432 1435 PDMR3ResetCpu(pVCpu); /* Only clears pending interrupts force flags */ 1433 # if !defined(VBOX_VMM_TARGET_ARMV8)1436 # if !defined(VBOX_VMM_TARGET_ARMV8) 1434 1437 APICR3InitIpi(pVCpu); 1435 # endif1438 # endif 1436 1439 TRPMR3ResetCpu(pVCpu); 1437 1440 CPUMR3ResetCpu(pVM, pVCpu); … … 1475 1478 AssertRC(rc); 1476 1479 } 1477 #endif 1478 1480 1481 #endif /* !VBOX_VMM_TARGET_ARMV8 */ 1479 1482 1480 1483 /** -
trunk/src/VBox/VMM/include/PGMInline.h
r100964 r103374 373 373 } 374 374 375 376 375 #ifndef VBOX_VMM_TARGET_ARMV8 376 377 377 /** 378 378 * Checks if the no-execute (NX) feature is active (EFER.NXE=1). … … 979 979 return NULL; 980 980 } 981 981 982 #endif /* !VBOX_VMM_TARGET_ARMV8 */ 982 983 983 984 984 /**
Note:
See TracChangeset
for help on using the changeset viewer.