Changeset 99051 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Mar 19, 2023 4:40:06 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 156416
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/DBGFAll.cpp
r98103 r99051 53 53 54 54 55 #if !defined(VBOX_VMM_TARGET_ARMV8) 55 56 /** 56 57 * Gets the hardware breakpoint configuration as DR7. … … 444 445 return 0; 445 446 } 447 #endif /* VBOX_VMM_TARGET_ARMV8 */ 446 448 447 449 … … 524 526 * Any events on the stack. Should the incoming event be ignored? 525 527 */ 528 #if defined(VBOX_VMM_TARGET_ARMV8) 529 uint64_t const rip = CPUMGetGuestFlatPC(pVCpu); /* rip is a misnomer but saves us #ifdef's later on. */ 530 #else 526 531 uint64_t const rip = CPUMGetGuestRIP(pVCpu); 532 #endif 527 533 uint32_t i = pVCpu->dbgf.s.cEvents; 528 534 if (i > 0) -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r98103 r99051 110 110 111 111 112 #if !defined(VBOX_VMM_TARGET_ARMV8) 112 113 /** 113 114 * Prepare an MWAIT - essentials of the MONITOR instruction. … … 251 252 return false; 252 253 } 254 #endif 253 255 254 256 … … 876 878 if (RT_FAILURE(rc)) 877 879 { 880 #if defined(VBOX_VMM_TARGET_ARMV8) 881 AssertReleaseFailed(); 882 #else 878 883 /* 879 884 * If we fail to find the page via the guest's page tables … … 887 892 HMInvalidatePage(pVCpu, uSrcAddr + cbToRead - 1); 888 893 } 894 #endif 889 895 } 890 896 } … … 907 913 VMM_INT_DECL(int) EMInterpretDisasCurrent(PVMCPUCC pVCpu, PDISCPUSTATE pDis, unsigned *pcbInstr) 908 914 { 915 #if defined(VBOX_VMM_TARGET_ARMV8) 916 return EMInterpretDisasOneEx(pVCpu, (RTGCUINTPTR)CPUMGetGuestFlatPC(pVCpu), pDis, pcbInstr); 917 #else 909 918 PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVCpu); 910 919 RTGCPTR GCPtrInstr; 911 #if 0 920 921 # if 0 912 922 int rc = SELMToFlatEx(pVCpu, DISSELREG_CS, pCtx, pCtx->rip, 0, &GCPtrInstr); 913 # else923 # else 914 924 /** @todo Get the CPU mode as well while we're at it! */ 915 925 int rc = SELMValidateAndConvertCSAddr(pVCpu, pCtx->eflags.u, pCtx->ss.Sel, pCtx->cs.Sel, &pCtx->cs, pCtx->rip, &GCPtrInstr); 916 # endif926 # endif 917 927 if (RT_SUCCESS(rc)) 918 928 return EMInterpretDisasOneEx(pVCpu, (RTGCUINTPTR)GCPtrInstr, pDis, pcbInstr); … … 921 931 pCtx->cs.Sel, (RTGCPTR)pCtx->rip, pCtx->ss.Sel & X86_SEL_RPL, rc)); 922 932 return rc; 933 #endif 923 934 } 924 935 … … 965 976 VMM_INT_DECL(VBOXSTRICTRC) EMInterpretInstruction(PVMCPUCC pVCpu) 966 977 { 978 #if defined(VBOX_VMM_TARGET_ARMV8) 979 LogFlow(("EMInterpretInstruction %RGv\n", (RTGCPTR)CPUMGetGuestFlatPC(pVCpu))); 980 #else 967 981 LogFlow(("EMInterpretInstruction %RGv\n", (RTGCPTR)CPUMGetGuestRIP(pVCpu))); 982 #endif 968 983 969 984 VBOXSTRICTRC rc = IEMExecOneBypassEx(pVCpu, NULL /*pcbWritten*/); -
trunk/src/VBox/VMM/VMMAll/GIMAll.cpp
r98103 r99051 91 91 switch (pVM->gim.s.enmProviderId) 92 92 { 93 #if !defined(VBOX_VMM_TARGET_ARMV8) 93 94 case GIMPROVIDERID_HYPERV: 94 95 return gimHvGetMmio2Regions(pVM, pcRegions); 95 96 #endif 96 97 default: 97 98 break; … … 116 117 switch (pVM->gim.s.enmProviderId) 117 118 { 119 #if !defined(VBOX_VMM_TARGET_ARMV8) 118 120 case GIMPROVIDERID_HYPERV: 119 121 return gimHvAreHypercallsEnabled(pVM); … … 121 123 case GIMPROVIDERID_KVM: 122 124 return gimKvmAreHypercallsEnabled(pVCpu); 123 125 #endif 124 126 default: 125 127 return false; … … 161 163 switch (pVM->gim.s.enmProviderId) 162 164 { 165 #if !defined(VBOX_VMM_TARGET_ARMV8) 163 166 case GIMPROVIDERID_HYPERV: 164 167 return gimHvHypercall(pVCpu, pCtx); … … 166 169 case GIMPROVIDERID_KVM: 167 170 return gimKvmHypercall(pVCpu, pCtx); 168 171 #endif 169 172 default: 170 173 AssertMsgFailed(("GIMHypercall: for provider %u not available/implemented\n", pVM->gim.s.enmProviderId)); … … 212 215 switch (pVM->gim.s.enmProviderId) 213 216 { 217 #if !defined(VBOX_VMM_TARGET_ARMV8) 214 218 case GIMPROVIDERID_HYPERV: 215 219 return gimHvHypercallEx(pVCpu, pCtx, uDisOpcode, cbInstr); … … 217 221 case GIMPROVIDERID_KVM: 218 222 return gimKvmHypercallEx(pVCpu, pCtx, uDisOpcode, cbInstr); 219 223 #endif 220 224 default: 221 225 AssertMsgFailedReturn(("enmProviderId=%u\n", pVM->gim.s.enmProviderId), VERR_GIM_HYPERCALLS_NOT_AVAILABLE); … … 254 258 switch (pVM->gim.s.enmProviderId) 255 259 { 260 #if !defined(VBOX_VMM_TARGET_ARMV8) 256 261 case GIMPROVIDERID_HYPERV: 257 262 return gimHvHypercallEx(pVCpu, pCtx, Dis.pCurInstr->uOpcode, Dis.cbInstr); … … 259 264 case GIMPROVIDERID_KVM: 260 265 return gimKvmHypercallEx(pVCpu, pCtx, Dis.pCurInstr->uOpcode, Dis.cbInstr); 261 266 #endif 262 267 default: 263 268 AssertMsgFailed(("GIMExecHypercallInstr: for provider %u not available/implemented\n", pVM->gim.s.enmProviderId)); … … 266 271 } 267 272 273 #if !defined(VBOX_VMM_TARGET_ARMV8) 268 274 Log(("GIM: GIMExecHypercallInstr: Failed to disassemble CS:RIP=%04x:%08RX64. rc=%Rrc\n", pCtx->cs.Sel, pCtx->rip, rc)); 275 #endif 269 276 return rc; 270 277 } … … 285 292 switch (pVM->gim.s.enmProviderId) 286 293 { 294 #if !defined(VBOX_VMM_TARGET_ARMV8) 287 295 case GIMPROVIDERID_HYPERV: 288 296 return gimHvIsParavirtTscEnabled(pVM); … … 290 298 case GIMPROVIDERID_KVM: 291 299 return gimKvmIsParavirtTscEnabled(pVM); 292 300 #endif 293 301 default: 294 302 break; … … 318 326 switch (pVM->gim.s.enmProviderId) 319 327 { 328 #if !defined(VBOX_VMM_TARGET_ARMV8) 320 329 case GIMPROVIDERID_KVM: 321 330 return gimKvmShouldTrapXcptUD(pVM); … … 323 332 case GIMPROVIDERID_HYPERV: 324 333 return gimHvShouldTrapXcptUD(pVCpu); 325 334 #endif 326 335 default: 327 336 return false; … … 362 371 switch (pVM->gim.s.enmProviderId) 363 372 { 373 #if !defined(VBOX_VMM_TARGET_ARMV8) 364 374 case GIMPROVIDERID_KVM: 365 375 return gimKvmXcptUD(pVM, pVCpu, pCtx, pDis, pcbInstr); … … 367 377 case GIMPROVIDERID_HYPERV: 368 378 return gimHvXcptUD(pVCpu, pCtx, pDis, pcbInstr); 369 379 #endif 370 380 default: 371 381 return VERR_GIM_OPERATION_FAILED; … … 374 384 375 385 386 #if !defined(VBOX_VMM_TARGET_ARMV8) 376 387 /** 377 388 * Invokes the read-MSR handler for the GIM provider configured for the VM. … … 504 515 return VERR_BUFFER_OVERFLOW; 505 516 } 506 517 #endif 518 -
trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp
r98103 r99051 1088 1088 AssertReturn(pDevIns, VERR_INVALID_POINTER); 1089 1089 1090 #if defined(VBOX_VMM_TARGET_ARMV8) 1091 /** @todo NEM: MMIO page aliasing. */ 1092 return VINF_SUCCESS; /* ignore */ /** @todo return some indicator if we fail here */ 1093 #else 1090 1094 /** @todo Why is this restricted to protected mode??? Try it in all modes! */ 1091 1095 PVMCPUCC pVCpu = VMMGetCpu(pVM); … … 1102 1106 */ 1103 1107 AssertReturn(hRegion < RT_MIN(pVM->iom.s.cMmioRegs, pVM->iom.s.cMmioAlloc), VERR_IOM_INVALID_MMIO_HANDLE); 1104 # ifdef IN_RING01108 # ifdef IN_RING0 1105 1109 AssertReturn(hRegion < pVM->iomr0.s.cMmioAlloc, VERR_IOM_INVALID_MMIO_HANDLE); 1106 1110 PIOMMMIOENTRYR3 const pRegEntry = &pVM->iomr0.s.paMmioRing3Regs[hRegion]; … … 1110 1114 || ( pVM->iomr0.s.paMmioRegs[hRegion].pDevIns == NULL 1111 1115 && pRegEntry->pDevIns == pDevIns->pDevInsForR3), VERR_ACCESS_DENIED); 1112 # else1116 # else 1113 1117 PIOMMMIOENTRYR3 const pRegEntry = &pVM->iom.s.paMmioRegs[hRegion]; 1114 1118 AssertReturn(pRegEntry->cbRegion > 0, VERR_IOM_INVALID_MMIO_HANDLE); 1115 1119 AssertReturn(pRegEntry->pDevIns == pDevIns, VERR_ACCESS_DENIED); 1116 # endif1120 # endif 1117 1121 AssertReturn(offRegion < pRegEntry->cbRegion, VERR_OUT_OF_RANGE); 1118 1122 Assert((pRegEntry->cbRegion & GUEST_PAGE_OFFSET_MASK) == 0); … … 1144 1148 /** @todo either ditch this or replace it with something that works in the 1145 1149 * nested case, since we really only care about nested paging! */ 1146 # if 01150 # if 0 1147 1151 /* 1148 1152 * Modify the shadow page table. Since it's an MMIO page it won't be present and we … … 1151 1155 * Note: This is a NOP in the EPT case; we'll just let it fault again to resync the page. 1152 1156 */ 1153 # if 0 /* The assertion is wrong for the PGM_SYNC_CLEAR_PGM_POOL and VINF_PGM_HANDLER_ALREADY_ALIASED cases. */1154 # ifdef VBOX_STRICT1157 # if 0 /* The assertion is wrong for the PGM_SYNC_CLEAR_PGM_POOL and VINF_PGM_HANDLER_ALREADY_ALIASED cases. */ 1158 # ifdef VBOX_STRICT 1155 1159 uint64_t fFlags; 1156 1160 RTHCPHYS HCPhys; 1157 1161 rc = PGMShwGetPage(pVCpu, (RTGCPTR)GCPhys, &fFlags, &HCPhys); 1158 1162 Assert(rc == VERR_PAGE_NOT_PRESENT || rc == VERR_PAGE_TABLE_NOT_PRESENT); 1163 # endif 1159 1164 # endif 1160 # endif1161 1165 rc = PGMPrefetchPage(pVCpu, (RTGCPTR)GCPhys); 1162 1166 Assert(rc == VINF_SUCCESS || rc == VERR_PAGE_NOT_PRESENT || rc == VERR_PAGE_TABLE_NOT_PRESENT); 1163 # endif1167 # endif 1164 1168 return rc; 1169 #endif 1165 1170 } 1166 1171 … … 1253 1258 AssertReturn(pDevIns, VERR_INVALID_POINTER); 1254 1259 1260 #if defined(VBOX_VMM_TARGET_ARMV8) 1261 /** @todo NEM: MMIO page aliasing. */ 1262 return VINF_SUCCESS; /* ignore */ /** @todo return some indicator if we fail here */ 1263 #else 1255 1264 /** @todo Get rid of this this real/protected or nested paging restriction, 1256 1265 * it probably shouldn't be here and would be nasty when the CPU … … 1270 1279 */ 1271 1280 AssertReturn(hRegion < RT_MIN(pVM->iom.s.cMmioRegs, pVM->iom.s.cMmioAlloc), VERR_IOM_INVALID_MMIO_HANDLE); 1272 # ifdef IN_RING01281 # ifdef IN_RING0 1273 1282 AssertReturn(hRegion < pVM->iomr0.s.cMmioAlloc, VERR_IOM_INVALID_MMIO_HANDLE); 1274 1283 PIOMMMIOENTRYR3 const pRegEntry = &pVM->iomr0.s.paMmioRing3Regs[hRegion]; … … 1277 1286 || ( pVM->iomr0.s.paMmioRegs[hRegion].pDevIns == NULL 1278 1287 && pRegEntry->pDevIns == pDevIns->pDevInsForR3), VERR_ACCESS_DENIED); 1279 # else1288 # else 1280 1289 PIOMMMIOENTRYR3 const pRegEntry = &pVM->iom.s.paMmioRegs[hRegion]; 1281 1290 AssertReturn(pRegEntry->cbRegion > 0, VERR_IOM_INVALID_MMIO_HANDLE); 1282 1291 AssertReturn(pRegEntry->pDevIns == pDevIns, VERR_ACCESS_DENIED); 1283 # endif1292 # endif 1284 1293 Assert((pRegEntry->cbRegion & GUEST_PAGE_OFFSET_MASK) == 0); 1285 1294 … … 1317 1326 # endif 1318 1327 return rc; 1319 } 1320 1328 #endif 1329 } 1330 -
trunk/src/VBox/VMM/VMMAll/PDMAll.cpp
r98103 r99051 70 70 { 71 71 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INTERRUPT_APIC); 72 #if defined(VBOX_VMM_TARGET_ARMV8) 73 AssertReleaseFailed(); 74 #else 72 75 uint32_t uTagSrc; 73 76 rc = APICGetInterrupt(pVCpu, pu8Interrupt, &uTagSrc); … … 80 83 /* else if it's masked by TPR/PPR/whatever, go ahead checking the PIC. Such masked 81 84 interrupts shouldn't prevent ExtINT from being delivered. */ 85 #endif 82 86 } 83 87 -
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r98103 r99051 757 757 int rc = pgmPoolTrackUpdateGCPhys(pVM, GCPhysPage, pPage, true /*fFlushPTEs*/, &fFlushTLBs); 758 758 AssertLogRelRCReturnVoid(rc); 759 #if defined(VBOX_VMM_TARGET_ARMV8) 760 AssertReleaseFailed(); 761 #else 759 762 HMFlushTlbOnAllVCpus(pVM); 763 #endif 760 764 761 765 /* -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r98103 r99051 5180 5180 if (pgmPoolIsPageLocked(pPage)) 5181 5181 { 5182 #if !defined(VBOX_VMM_TARGET_ARMV8) 5182 5183 AssertMsg( pPage->enmKind == PGMPOOLKIND_64BIT_PML4 5183 5184 || pPage->enmKind == PGMPOOLKIND_PAE_PDPT … … 5191 5192 || pPage->enmKind == PGMPOOLKIND_ROOT_NESTED, 5192 5193 ("Can't free the shadow CR3! (%RHp vs %RHp kind=%d\n", PGMGetHyperCR3(VMMGetCpu(pVM)), pPage->Core.Key, pPage->enmKind)); 5194 #endif 5193 5195 Log(("pgmPoolFlushPage: current active shadow CR3, rejected. enmKind=%s idx=%d\n", pgmPoolPoolKindToStr(pPage->enmKind), pPage->idx)); 5194 5196 PGM_UNLOCK(pVM);
Note:
See TracChangeset
for help on using the changeset viewer.