Changeset 61771 in vbox
- Timestamp:
- Jun 20, 2016 4:13:26 PM (9 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/GIM.cpp
r61632 r61771 429 429 * @thread EMT. 430 430 */ 431 VMMR3_INT_DECL(int) GIMR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete)431 VMMR3_INT_DECL(int) gimR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete) 432 432 { 433 433 PGIMDEBUG pDbg = pVM->gim.s.pDbgR3; … … 466 466 * @thread EMT. 467 467 */ 468 VMMR3_INT_DECL(int) GIMR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite)468 VMMR3_INT_DECL(int) gimR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite) 469 469 { 470 470 PGIMDEBUG pDbg = pVM->gim.s.pDbgR3; … … 521 521 522 522 /** 523 * @callback_method_impl{FNPGMPHYSHANDLER, 524 * Write access handler for mapped MMIO2 pages. Currently ignores writes.} 525 * 526 * @todo In the future we might want to let the GIM provider decide what the 527 * handler should do (like throwing \#GP faults). 528 */ 529 static DECLCALLBACK(VBOXSTRICTRC) gimR3Mmio2WriteHandler(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, void *pvPhys, void *pvBuf, 530 size_t cbBuf, PGMACCESSTYPE enmAccessType, PGMACCESSORIGIN enmOrigin, 531 void *pvUser) 532 { 533 /* 534 * Ignore writes to the mapped MMIO2 page. 535 */ 536 Assert(enmAccessType == PGMACCESSTYPE_WRITE); 537 return VINF_SUCCESS; /** @todo Hyper-V says we should \#GP(0) fault for writes to the Hypercall and TSC page. */ 538 } 539 540 541 #if 0 542 /** 523 543 * Unmaps a registered MMIO2 region in the guest address space and removes any 524 544 * access handlers for it. … … 528 548 * @param pRegion Pointer to the GIM MMIO2 region. 529 549 */ 530 VMMR3_INT_DECL(int) GIMR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion)550 VMMR3_INT_DECL(int) gimR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion) 531 551 { 532 552 AssertPtr(pVM); … … 548 568 } 549 569 return VINF_SUCCESS; 550 }551 552 553 /**554 * @callback_method_impl{FNPGMPHYSHANDLER,555 * Write access handler for mapped MMIO2 pages. Currently ignores writes.}556 *557 * @todo In the future we might want to let the GIM provider decide what the558 * handler should do (like throwing \#GP faults).559 */560 static DECLCALLBACK(VBOXSTRICTRC)561 gimR3Mmio2WriteHandler(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, void *pvPhys, void *pvBuf, size_t cbBuf,562 PGMACCESSTYPE enmAccessType, PGMACCESSORIGIN enmOrigin, void *pvUser)563 {564 /*565 * Ignore writes to the mapped MMIO2 page.566 */567 Assert(enmAccessType == PGMACCESSTYPE_WRITE);568 return VINF_SUCCESS; /** @todo Hyper-V says we should \#GP(0) fault for writes to the Hypercall and TSC page. */569 570 } 570 571 … … 644 645 } 645 646 646 #if 0 647 647 648 /** 648 649 * Registers the physical handler for the registered and mapped MMIO2 region. … … 652 653 * @param pRegion Pointer to the GIM MMIO2 region. 653 654 */ 654 VMMR3_INT_DECL(int) GIMR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion)655 VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion) 655 656 { 656 657 AssertPtr(pRegion); … … 675 676 * @param pRegion Pointer to the GIM MMIO2 region. 676 677 */ 677 VMMR3_INT_DECL(int) GIMR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion)678 VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion) 678 679 { 679 680 return PGMHandlerPhysicalDeregister(pVM, pRegion->GCPhysPage); -
trunk/src/VBox/VMM/VMMR3/GIMHv.cpp
r61632 r61771 530 530 PGIMMMIO2REGION pRegion = &pHv->aMmio2Regions[i]; 531 531 #if 0 532 GIMR3Mmio2Unmap(pVM, pRegion);532 gimR3Mmio2Unmap(pVM, pRegion); 533 533 #else 534 534 pRegion->fMapped = false; … … 910 910 * rewrite guest memory directly. */ 911 911 #if 0 912 rc = GIMR3Mmio2Map(pVM, pRegion, GCPhysTscPage);912 rc = gimR3Mmio2Map(pVM, pRegion, GCPhysTscPage); 913 913 if (RT_SUCCESS(rc)) 914 914 { … … 942 942 } 943 943 else 944 LogRelFunc((" GIMR3Mmio2Map failed. rc=%Rrc\n", rc));944 LogRelFunc(("gimR3Mmio2Map failed. rc=%Rrc\n", rc)); 945 945 return VERR_GIM_OPERATION_FAILED; 946 946 #else … … 997 997 { 998 998 #if 0 999 GIMR3Mmio2Unmap(pVM, pRegion);999 gimR3Mmio2Unmap(pVM, pRegion); 1000 1000 Assert(!pRegion->fMapped); 1001 1001 #else … … 1023 1023 { 1024 1024 #if 0 1025 GIMR3Mmio2Unmap(pVM, pRegion);1025 gimR3Mmio2Unmap(pVM, pRegion); 1026 1026 Assert(!pRegion->fMapped); 1027 1027 #else … … 1072 1072 * rewrite guest memory directly. */ 1073 1073 #if 0 1074 int rc = GIMR3Mmio2Map(pVM, pRegion, GCPhysHypercallPage);1074 int rc = gimR3Mmio2Map(pVM, pRegion, GCPhysHypercallPage); 1075 1075 if (RT_SUCCESS(rc)) 1076 1076 { … … 1104 1104 } 1105 1105 1106 GIMR3Mmio2Unmap(pVM, pRegion);1107 } 1108 1109 LogRel(("GIM: HyperV: GIMR3Mmio2Map failed. rc=%Rrc\n", rc));1106 gimR3Mmio2Unmap(pVM, pRegion); 1107 } 1108 1109 LogRel(("GIM: HyperV: gimR3Mmio2Map failed. rc=%Rrc\n", rc)); 1110 1110 return rc; 1111 1111 #else … … 1256 1256 */ 1257 1257 size_t cbReallyRead = cbRead; 1258 rc = GIMR3DebugRead(pVM, pvBuf, &cbReallyRead, gimR3HvDebugBufReadCompleted);1258 rc = gimR3DebugRead(pVM, pvBuf, &cbReallyRead, gimR3HvDebugBufReadCompleted); 1259 1259 *pcbRead = (uint32_t)cbReallyRead; 1260 1260 } … … 1271 1271 { 1272 1272 size_t cbReallyRead = cbRead; 1273 rc = GIMR3DebugRead(pVM, pvBuf, &cbReallyRead, gimR3HvDebugBufReadCompleted);1273 rc = gimR3DebugRead(pVM, pvBuf, &cbReallyRead, gimR3HvDebugBufReadCompleted); 1274 1274 if ( RT_SUCCESS(rc) 1275 1275 && cbReallyRead > 0) … … 1634 1634 AssertCompile(sizeof(size_t) >= sizeof(uint32_t)); 1635 1635 size_t cbWriteBuf = cbWrite; 1636 int rc = GIMR3DebugWrite(pVM, pbData, &cbWriteBuf);1636 int rc = gimR3DebugWrite(pVM, pbData, &cbWriteBuf); 1637 1637 if ( RT_SUCCESS(rc) 1638 1638 && cbWriteBuf == cbWrite) -
trunk/src/VBox/VMM/include/GIMInternal.h
r60307 r61771 102 102 103 103 #ifdef IN_RING3 104 VMMR3_INT_DECL(int) GIMR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion); 105 VMMR3_INT_DECL(int) GIMR3Mmio2Map(PVM pVM, PGIMMMIO2REGION pRegion, RTGCPHYS GCPhysRegion); 106 VMMR3_INT_DECL(int) GIMR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion); 107 VMMR3_INT_DECL(int) GIMR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion); 104 #if 0 105 VMMR3_INT_DECL(int) gimR3Mmio2Unmap(PVM pVM, PGIMMMIO2REGION pRegion); 106 VMMR3_INT_DECL(int) gimR3Mmio2Map(PVM pVM, PGIMMMIO2REGION pRegion, RTGCPHYS GCPhysRegion); 107 VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalRegister(PVM pVM, PGIMMMIO2REGION pRegion); 108 VMMR3_INT_DECL(int) gimR3Mmio2HandlerPhysicalDeregister(PVM pVM, PGIMMMIO2REGION pRegion); 109 #endif 108 110 109 VMMR3_INT_DECL(int) GIMR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete);110 VMMR3_INT_DECL(int) GIMR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite);111 VMMR3_INT_DECL(int) gimR3DebugRead(PVM pVM, void *pvRead, size_t *pcbRead, PFNGIMDEBUGBUFREADCOMPLETED pfnReadComplete); 112 VMMR3_INT_DECL(int) gimR3DebugWrite(PVM pVM, void *pvWrite, size_t *pcbWrite); 111 113 #endif /* IN_RING3 */ 112 114
Note:
See TracChangeset
for help on using the changeset viewer.