Changeset 82094 in vbox
- Timestamp:
- Nov 22, 2019 12:58:02 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134901
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/iom.h
r82026 r82094 457 457 VMMDECL(VBOXSTRICTRC) IOMMMIORead(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, uint32_t *pu32Value, size_t cbValue); 458 458 VMMDECL(VBOXSTRICTRC) IOMMMIOWrite(PVM pVM, PVMCPU pVCpu, RTGCPHYS GCPhys, uint32_t u32Value, size_t cbValue); 459 VMMDECL(int) IOMMMIOMapMMIO2Page(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysRemapped, uint64_t fPageFlags); 459 /*VMMDECL(int) IOMMMIOMapMMIO2Page(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysRemapped, uint64_t fPageFlags);*/ 460 460 /*VMMDECL(int) IOMMMIOMapMMIOHCPage(PVMCC pVM, PVMCPUCC pVCpu, RTGCPHYS GCPhys, RTHCPHYS HCPhys, uint64_t fPageFlags); - not used any more */ 461 VMMDECL(int) IOMMMIOResetRegion(PVMCC pVM, RTGCPHYS GCPhys); 461 /*VMMDECL(int) IOMMMIOResetRegion(PVMCC pVM, RTGCPHYS GCPhys);*/ 462 462 463 463 VMM_INT_DECL(VBOXSTRICTRC) IOMR0MmioPhysHandler(PVMCC pVM, PVMCPUCC pVCpu, uint32_t uErrorCode, RTGCPHYS GCPhysFault); 464 VMM _INT_DECL(int)IOMMmioMapMmio2Page(PVMCC pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS offRegion,465 464 VMMDECL(int) IOMMmioMapMmio2Page(PVMCC pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS offRegion, 465 uint64_t hMmio2, RTGCPHYS offMmio2, uint64_t fPageFlags); 466 466 VMMR0_INT_DECL(int) IOMR0MmioMapMmioHCPage(PVMCC pVM, PVMCPUCC pVCpu, RTGCPHYS GCPhys, RTHCPHYS HCPhys, uint64_t fPageFlags); 467 VMM _INT_DECL(int)IOMMmioResetRegion(PVMCC pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion);467 VMMDECL(int) IOMMmioResetRegion(PVMCC pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion); 468 468 469 469 -
trunk/include/VBox/vmm/pgm.h
r81705 r82094 385 385 VMMDECL(int) PGMHandlerPhysicalJoin(PVMCC pVM, RTGCPHYS GCPhys1, RTGCPHYS GCPhys2); 386 386 VMMDECL(int) PGMHandlerPhysicalPageTempOff(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage); 387 VMMDECL(int) PGMHandlerPhysicalPageAlias(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage, RTGCPHYS GCPhysPageRemap); 387 VMMDECL(int) PGMHandlerPhysicalPageAliasMmio2(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage, 388 PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS offMMio2PageRemap); 388 389 VMMDECL(int) PGMHandlerPhysicalPageAliasHC(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage, RTHCPHYS HCPhysPageRemap); 389 390 VMMDECL(int) PGMHandlerPhysicalReset(PVMCC pVM, RTGCPHYS GCPhys); -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r82089 r82094 715 715 if (pThis->fRemappedVGA) 716 716 { 717 IOMMMIOResetRegion(PDMDevHlpGetVM(pThis->CTX_SUFF(pDevIns)), 0x000a0000); 717 PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns); 718 IOMMmioResetRegion(PDMDevHlpGetVM(pDevIns), pDevIns, pThis->hMmioLegacy); 718 719 pThis->fRemappedVGA = false; 719 720 } … … 754 755 if (pThis->fRemappedVGA) 755 756 { 756 IOMMMIOResetRegion(PDMDevHlpGetVM(pThis->CTX_SUFF(pDevIns)), 0x000a0000); 757 PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns); 758 IOMMmioResetRegion(PDMDevHlpGetVM(pDevIns), pDevIns, pThis->hMmioLegacy); 757 759 pThis->fRemappedVGA = false; 758 760 } … … 1025 1027 if (pThis->fRemappedVGA) 1026 1028 { 1027 IOMMMIOResetRegion(PDMDevHlpGetVM(pThis->CTX_SUFF(pDevIns)), 0x000a0000); 1029 PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns); 1030 IOMMmioResetRegion(PDMDevHlpGetVM(pDevIns), pDevIns, pThis->hMmioLegacy); 1028 1031 pThis->fRemappedVGA = false; 1029 1032 } … … 1134 1137 if (pThis->fRemappedVGA) 1135 1138 { 1136 IOMMMIOResetRegion(PDMDevHlpGetVM(pThis->CTX_SUFF(pDevIns)), 0x000a0000); 1139 PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns); 1140 IOMMmioResetRegion(PDMDevHlpGetVM(pDevIns), pDevIns, pThis->hMmioLegacy); 1137 1141 pThis->fRemappedVGA = false; 1138 1142 } … … 1179 1183 static uint32_t vga_mem_readb(PVGASTATE pThis, RTGCPHYS addr, int *prc) 1180 1184 { 1181 int memory_map_mode,plane;1185 int plane; 1182 1186 uint32_t ret; 1183 1187 1184 1188 Log3(("vga: read [0x%x] -> ", addr)); 1185 /* convert to VGA memory offset */1186 memory_map_mode = (pThis->gr[6] >> 2) & 3;1187 #ifndef IN_RC1188 RTGCPHYS GCPhys = addr; /* save original address */1189 #endif1190 1189 1191 1190 #ifdef VMSVGA_WITH_VGA_FB_BACKUP_AND_IN_RZ … … 1201 1200 #endif 1202 1201 1202 1203 /* convert to VGA memory offset */ 1204 #ifndef IN_RC 1205 RTGCPHYS GCPhys = addr; /* save original address */ 1206 #endif 1203 1207 addr &= 0x1ffff; 1208 1209 int const memory_map_mode = (pThis->gr[6] >> 2) & 3; 1204 1210 switch(memory_map_mode) { 1205 1211 case 0: … … 1233 1239 /** @todo only allow read access (doesn't work now) */ 1234 1240 STAM_COUNTER_INC(&pThis->StatMapPage); 1235 IOMMMIOMapMMIO2Page(PDMDevHlpGetVM(pThis->CTX_SUFF(pDevIns)), GCPhys, 1236 pThis->GCPhysVRAM + addr, X86_PTE_RW | X86_PTE_P); 1241 PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns); 1242 IOMMmioMapMmio2Page(PDMDevHlpGetVM(pDevIns), pDevIns, pThis->hMmioLegacy, GCPhys - 0xa0000, 1243 pThis->hMmio2VRam, addr, X86_PTE_RW | X86_PTE_P); 1237 1244 /* Set as dirty as write accesses won't be noticed now. */ 1238 1245 vgaR3MarkDirty(pThis, addr); … … 1284 1291 } 1285 1292 1286 /** called for accesses between 0xa0000 and 0xc0000 */ 1287 static int vga_mem_writeb(PVGASTATE pThis, RTGCPHYS addr, uint32_t val) 1288 { 1289 int memory_map_mode, plane, write_mode, b, func_select, mask; 1293 /** 1294 * called for accesses between 0xa0000 and 0xc0000 1295 */ 1296 static VBOXSTRICTRC vga_mem_writeb(PVGASTATE pThis, RTGCPHYS addr, uint32_t val) 1297 { 1298 int plane, write_mode, b, func_select, mask; 1290 1299 uint32_t write_mask, bit_mask, set_mask; 1291 1300 1292 1301 Log3(("vga: [0x%x] = 0x%02x\n", addr, val)); 1293 /* convert to VGA memory offset */1294 memory_map_mode = (pThis->gr[6] >> 2) & 3;1295 #ifndef IN_RC1296 RTGCPHYS GCPhys = addr; /* save original address */1297 #endif1298 1302 1299 1303 #ifdef VMSVGA_WITH_VGA_FB_BACKUP_AND_IN_RZ … … 1304 1308 #endif 1305 1309 1310 /* convert to VGA memory offset */ 1311 #ifndef IN_RC 1312 RTGCPHYS const GCPhys = addr; /* save original address */ 1313 #endif 1306 1314 addr &= 0x1ffff; 1315 1316 int const memory_map_mode = (pThis->gr[6] >> 2) & 3; 1307 1317 switch(memory_map_mode) { 1308 1318 case 0: … … 1338 1348 { 1339 1349 STAM_COUNTER_INC(&pThis->StatMapPage); 1340 IOMMMIOMapMMIO2Page(PDMDevHlpGetVM(pThis->CTX_SUFF(pDevIns)), GCPhys, 1341 pThis->GCPhysVRAM + addr, X86_PTE_RW | X86_PTE_P); 1350 PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns); 1351 IOMMmioMapMmio2Page(PDMDevHlpGetVM(pDevIns), pDevIns, pThis->hMmioLegacy, GCPhys - 0xa0000, 1352 pThis->hMmio2VRam, addr, X86_PTE_RW | X86_PTE_P); 1342 1353 pThis->fRemappedVGA = true; 1343 1354 } … … 3550 3561 } 3551 3562 3552 3553 /** 3554 * @callback_method_impl{FNIOMMMIOFILL, 3563 #undef APPLY_LOGICAL_AND_MASK 3564 3565 /** 3566 * @callback_method_impl{FNIOMMMIONEWFILL, 3555 3567 * Legacy VGA memory (0xa0000 - 0xbffff) write hook\, to be called from IOM and 3556 3568 * from the inside of VGADeviceGC.cpp. This is the advanced version of 3557 3569 * vga_mem_writeb function.} 3558 3570 */ 3559 PDMBOTHCBDECL(int) vgaMMIOFill(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, uint32_t u32Item, unsigned cbItem, unsigned cItems) 3571 static DECLCALLBACK(VBOXSTRICTRC) 3572 vgaMmioFill(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS off, uint32_t u32Item, unsigned cbItem, unsigned cItems) 3560 3573 { 3561 3574 PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE); 3562 3575 Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo))); 3563 3576 3564 return vgaInternalMMIOFill(pThis, pvUser, GCPhysAddr, u32Item, cbItem, cItems); 3565 } 3566 #undef APPLY_LOGICAL_AND_MASK 3567 3568 3569 /** 3570 * @callback_method_impl{FNIOMMMIOREAD, Legacy VGA memory (0xa0000 - 0xbffff) 3571 * read hook\, to be called from IOM.} 3572 */ 3573 PDMBOTHCBDECL(int) vgaMMIORead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb) 3577 return vgaInternalMMIOFill(pThis, pvUser, off, u32Item, cbItem, cItems); 3578 } 3579 3580 3581 /** 3582 * @callback_method_impl{FNIOMMMIONEWREAD, 3583 * Legacy VGA memory (0xa0000 - 0xbffff) read hook\, to be called from IOM.} 3584 */ 3585 static DECLCALLBACK(VBOXSTRICTRC) vgaMmioRead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS off, void *pv, unsigned cb) 3574 3586 { 3575 3587 PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE); … … 3582 3594 { 3583 3595 case 1: 3584 *(uint8_t *)pv = vga_mem_readb(pThis, GCPhysAddr, &rc);3596 *(uint8_t *)pv = vga_mem_readb(pThis, off, &rc); 3585 3597 break; 3586 3598 case 2: 3587 *(uint16_t *)pv = vga_mem_readb(pThis, GCPhysAddr, &rc) 3588 | (vga_mem_readb(pThis, GCPhysAddr + 1, &rc) << 8); 3599 /** @todo This and the wider accesses maybe misbehave when accessing bytes 3600 * crossing the 512KB VRAM boundrary if the access is handled in 3601 * ring-0 and operating in latched mode. */ 3602 *(uint16_t *)pv = vga_mem_readb(pThis, off, &rc) 3603 | (vga_mem_readb(pThis, off + 1, &rc) << 8); 3589 3604 break; 3590 3605 case 4: 3591 *(uint32_t *)pv = vga_mem_readb(pThis, GCPhysAddr, &rc)3592 | (vga_mem_readb(pThis, GCPhysAddr+ 1, &rc) << 8)3593 | (vga_mem_readb(pThis, GCPhysAddr+ 2, &rc) << 16)3594 | (vga_mem_readb(pThis, GCPhysAddr+ 3, &rc) << 24);3606 *(uint32_t *)pv = vga_mem_readb(pThis, off, &rc) 3607 | (vga_mem_readb(pThis, off + 1, &rc) << 8) 3608 | (vga_mem_readb(pThis, off + 2, &rc) << 16) 3609 | (vga_mem_readb(pThis, off + 3, &rc) << 24); 3595 3610 break; 3596 3611 3597 3612 case 8: 3598 *(uint64_t *)pv = (uint64_t)vga_mem_readb(pThis, GCPhysAddr, &rc)3599 | ((uint64_t)vga_mem_readb(pThis, GCPhysAddr+ 1, &rc) << 8)3600 | ((uint64_t)vga_mem_readb(pThis, GCPhysAddr+ 2, &rc) << 16)3601 | ((uint64_t)vga_mem_readb(pThis, GCPhysAddr+ 3, &rc) << 24)3602 | ((uint64_t)vga_mem_readb(pThis, GCPhysAddr+ 4, &rc) << 32)3603 | ((uint64_t)vga_mem_readb(pThis, GCPhysAddr+ 5, &rc) << 40)3604 | ((uint64_t)vga_mem_readb(pThis, GCPhysAddr+ 6, &rc) << 48)3605 | ((uint64_t)vga_mem_readb(pThis, GCPhysAddr+ 7, &rc) << 56);3613 *(uint64_t *)pv = (uint64_t)vga_mem_readb(pThis, off, &rc) 3614 | ((uint64_t)vga_mem_readb(pThis, off + 1, &rc) << 8) 3615 | ((uint64_t)vga_mem_readb(pThis, off + 2, &rc) << 16) 3616 | ((uint64_t)vga_mem_readb(pThis, off + 3, &rc) << 24) 3617 | ((uint64_t)vga_mem_readb(pThis, off + 4, &rc) << 32) 3618 | ((uint64_t)vga_mem_readb(pThis, off + 5, &rc) << 40) 3619 | ((uint64_t)vga_mem_readb(pThis, off + 6, &rc) << 48) 3620 | ((uint64_t)vga_mem_readb(pThis, off + 7, &rc) << 56); 3606 3621 break; 3607 3622 … … 3611 3626 while (cb-- > 0) 3612 3627 { 3613 *pbData++ = vga_mem_readb(pThis, GCPhysAddr++, &rc);3628 *pbData++ = vga_mem_readb(pThis, off++, &rc); 3614 3629 if (RT_UNLIKELY(rc != VINF_SUCCESS)) 3615 3630 break; … … 3623 3638 3624 3639 /** 3625 * @callback_method_impl{FNIOMMMIO WRITE, Legacy VGA memory (0xa0000 - 0xbffff)3626 * 3627 */ 3628 PDMBOTHCBDECL(int) vgaMMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)3629 { 3630 PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE);3640 * @callback_method_impl{FNIOMMMIONEWWRITE, 3641 * Legacy VGA memory (0xa0000 - 0xbffff) write hook\, to be called from IOM.} 3642 */ 3643 static DECLCALLBACK(VBOXSTRICTRC) vgaMmioWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS off, void const *pv, unsigned cb) 3644 { 3645 PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE); 3631 3646 uint8_t const *pbSrc = (uint8_t const *)pv; 3632 3647 NOREF(pvUser); … … 3634 3649 Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo))); 3635 3650 3636 intrc;3651 VBOXSTRICTRC rc; 3637 3652 switch (cb) 3638 3653 { 3639 3654 case 1: 3640 rc = vga_mem_writeb(pThis, GCPhysAddr, *pbSrc);3655 rc = vga_mem_writeb(pThis, off, *pbSrc); 3641 3656 break; 3642 3657 #if 1 3643 3658 case 2: 3644 rc = vga_mem_writeb(pThis, GCPhysAddr+ 0, pbSrc[0]);3659 rc = vga_mem_writeb(pThis, off + 0, pbSrc[0]); 3645 3660 if (RT_LIKELY(rc == VINF_SUCCESS)) 3646 rc = vga_mem_writeb(pThis, GCPhysAddr+ 1, pbSrc[1]);3661 rc = vga_mem_writeb(pThis, off + 1, pbSrc[1]); 3647 3662 break; 3648 3663 case 4: 3649 rc = vga_mem_writeb(pThis, GCPhysAddr+ 0, pbSrc[0]);3664 rc = vga_mem_writeb(pThis, off + 0, pbSrc[0]); 3650 3665 if (RT_LIKELY(rc == VINF_SUCCESS)) 3651 rc = vga_mem_writeb(pThis, GCPhysAddr+ 1, pbSrc[1]);3666 rc = vga_mem_writeb(pThis, off + 1, pbSrc[1]); 3652 3667 if (RT_LIKELY(rc == VINF_SUCCESS)) 3653 rc = vga_mem_writeb(pThis, GCPhysAddr+ 2, pbSrc[2]);3668 rc = vga_mem_writeb(pThis, off + 2, pbSrc[2]); 3654 3669 if (RT_LIKELY(rc == VINF_SUCCESS)) 3655 rc = vga_mem_writeb(pThis, GCPhysAddr+ 3, pbSrc[3]);3670 rc = vga_mem_writeb(pThis, off + 3, pbSrc[3]); 3656 3671 break; 3657 3672 case 8: 3658 rc = vga_mem_writeb(pThis, GCPhysAddr+ 0, pbSrc[0]);3673 rc = vga_mem_writeb(pThis, off + 0, pbSrc[0]); 3659 3674 if (RT_LIKELY(rc == VINF_SUCCESS)) 3660 rc = vga_mem_writeb(pThis, GCPhysAddr+ 1, pbSrc[1]);3675 rc = vga_mem_writeb(pThis, off + 1, pbSrc[1]); 3661 3676 if (RT_LIKELY(rc == VINF_SUCCESS)) 3662 rc = vga_mem_writeb(pThis, GCPhysAddr+ 2, pbSrc[2]);3677 rc = vga_mem_writeb(pThis, off + 2, pbSrc[2]); 3663 3678 if (RT_LIKELY(rc == VINF_SUCCESS)) 3664 rc = vga_mem_writeb(pThis, GCPhysAddr+ 3, pbSrc[3]);3679 rc = vga_mem_writeb(pThis, off + 3, pbSrc[3]); 3665 3680 if (RT_LIKELY(rc == VINF_SUCCESS)) 3666 rc = vga_mem_writeb(pThis, GCPhysAddr+ 4, pbSrc[4]);3681 rc = vga_mem_writeb(pThis, off + 4, pbSrc[4]); 3667 3682 if (RT_LIKELY(rc == VINF_SUCCESS)) 3668 rc = vga_mem_writeb(pThis, GCPhysAddr+ 5, pbSrc[5]);3683 rc = vga_mem_writeb(pThis, off + 5, pbSrc[5]); 3669 3684 if (RT_LIKELY(rc == VINF_SUCCESS)) 3670 rc = vga_mem_writeb(pThis, GCPhysAddr+ 6, pbSrc[6]);3685 rc = vga_mem_writeb(pThis, off + 6, pbSrc[6]); 3671 3686 if (RT_LIKELY(rc == VINF_SUCCESS)) 3672 rc = vga_mem_writeb(pThis, GCPhysAddr+ 7, pbSrc[7]);3687 rc = vga_mem_writeb(pThis, off + 7, pbSrc[7]); 3673 3688 break; 3674 3689 #else 3675 3690 case 2: 3676 rc = vgaM MIOFill(pDevIns, GCPhysAddr, *(uint16_t *)pv, 2, 1);3691 rc = vgaMmioFill(pDevIns, off, *(uint16_t *)pv, 2, 1); 3677 3692 break; 3678 3693 case 4: 3679 rc = vgaM MIOFill(pDevIns, GCPhysAddr, *(uint32_t *)pv, 4, 1);3694 rc = vgaMmioFill(pDevIns, off, *(uint32_t *)pv, 4, 1); 3680 3695 break; 3681 3696 case 8: 3682 rc = vgaM MIOFill(pDevIns, GCPhysAddr, *(uint64_t *)pv, 8, 1);3697 rc = vgaMmioFill(pDevIns, off, *(uint64_t *)pv, 8, 1); 3683 3698 break; 3684 3699 #endif … … 3686 3701 rc = VINF_SUCCESS; 3687 3702 while (cb-- > 0 && rc == VINF_SUCCESS) 3688 rc = vga_mem_writeb(pThis, GCPhysAddr++, *pbSrc++);3703 rc = vga_mem_writeb(pThis, off++, *pbSrc++); 3689 3704 break; 3690 3705 … … 3697 3712 /** 3698 3713 * Handle LFB access. 3699 * @returns VBox status code. 3714 * 3715 * @returns Strict VBox status code. 3700 3716 * @param pVM VM handle. 3701 3717 * @param pThis VGA device instance data. … … 3703 3719 * @param GCPtr The access virtual address (only GC). 3704 3720 */ 3705 static int vgaLFBAccess(PVMCC pVM, PVGASTATE pThis, RTGCPHYS GCPhys, RTGCPTR GCPtr) 3706 { 3707 int rc = PDMDevHlpCritSectEnter(pThis->CTX_SUFF(pDevIns), &pThis->CritSect, VINF_EM_RAW_EMULATE_INSTR); 3708 if (rc != VINF_SUCCESS) 3709 return rc; 3710 3711 /* 3712 * Set page dirty bit. 3713 */ 3714 vgaR3MarkDirty(pThis, GCPhys - pThis->GCPhysVRAM); 3715 pThis->fLFBUpdated = true; 3716 3717 /* 3718 * Turn of the write handler for this particular page and make it R/W. 3719 * Then return telling the caller to restart the guest instruction. 3720 * ASSUME: the guest always maps video memory RW. 3721 */ 3722 rc = PGMHandlerPhysicalPageTempOff(pVM, pThis->GCPhysVRAM, GCPhys); 3723 if (RT_SUCCESS(rc)) 3724 { 3721 static VBOXSTRICTRC vgaLFBAccess(PVMCC pVM, PVGASTATE pThis, RTGCPHYS GCPhys, RTGCPTR GCPtr) 3722 { 3723 VBOXSTRICTRC rc = PDMDevHlpCritSectEnter(pThis->CTX_SUFF(pDevIns), &pThis->CritSect, VINF_EM_RAW_EMULATE_INSTR); 3724 if (rc == VINF_SUCCESS) 3725 { 3726 /* 3727 * Set page dirty bit. 3728 */ 3729 vgaR3MarkDirty(pThis, GCPhys - pThis->GCPhysVRAM); 3730 pThis->fLFBUpdated = true; 3731 3732 /* 3733 * Turn of the write handler for this particular page and make it R/W. 3734 * Then return telling the caller to restart the guest instruction. 3735 * ASSUME: the guest always maps video memory RW. 3736 */ 3737 rc = PGMHandlerPhysicalPageTempOff(pVM, pThis->GCPhysVRAM, GCPhys); 3738 if (RT_SUCCESS(rc)) 3739 { 3725 3740 #ifndef IN_RING3 3726 rc = PGMShwMakePageWritable(PDMDevHlpGetVMCPU(pThis->CTX_SUFF(pDevIns)), GCPtr, 3727 PGM_MK_PG_IS_MMIO2 | PGM_MK_PG_IS_WRITE_FAULT); 3741 rc = PGMShwMakePageWritable(PDMDevHlpGetVMCPU(pThis->CTX_SUFF(pDevIns)), GCPtr, 3742 PGM_MK_PG_IS_MMIO2 | PGM_MK_PG_IS_WRITE_FAULT); 3743 PDMDevHlpCritSectLeave(pThis->CTX_SUFF(pDevIns), &pThis->CritSect); 3744 AssertMsgReturn( rc == VINF_SUCCESS 3745 /* In the SMP case the page table might be removed while we wait for the PGM lock in the trap handler. */ 3746 || rc == VERR_PAGE_TABLE_NOT_PRESENT 3747 || rc == VERR_PAGE_NOT_PRESENT, 3748 ("PGMShwModifyPage -> GCPtr=%RGv rc=%d\n", GCPtr, rc), 3749 rc); 3750 #else /* IN_RING3 - We don't have any virtual page address of the access here. */ 3751 PDMDevHlpCritSectLeave(pThis->CTX_SUFF(pDevIns), &pThis->CritSect); 3752 Assert(GCPtr == 0); 3753 RT_NOREF1(GCPtr); 3754 #endif 3755 return VINF_SUCCESS; 3756 } 3757 3728 3758 PDMDevHlpCritSectLeave(pThis->CTX_SUFF(pDevIns), &pThis->CritSect); 3729 AssertMsgReturn( rc == VINF_SUCCESS 3730 /* In the SMP case the page table might be removed while we wait for the PGM lock in the trap handler. */ 3731 || rc == VERR_PAGE_TABLE_NOT_PRESENT 3732 || rc == VERR_PAGE_NOT_PRESENT, 3733 ("PGMShwModifyPage -> GCPtr=%RGv rc=%d\n", GCPtr, rc), 3734 rc); 3735 #else /* IN_RING3 : We don't have any virtual page address of the access here. */ 3736 PDMDevHlpCritSectLeave(pThis->CTX_SUFF(pDevIns), &pThis->CritSect); 3737 Assert(GCPtr == 0); 3738 RT_NOREF1(GCPtr); 3739 #endif 3740 return VINF_SUCCESS; 3741 } 3742 3743 PDMDevHlpCritSectLeave(pThis->CTX_SUFF(pDevIns), &pThis->CritSect); 3744 AssertMsgFailed(("PGMHandlerPhysicalPageTempOff -> rc=%d\n", rc)); 3759 AssertMsgFailed(("PGMHandlerPhysicalPageTempOff -> rc=%d\n", rc)); 3760 } 3745 3761 return rc; 3746 3762 } … … 3769 3785 * VBE LFB write access handler for the dirty tracking.} 3770 3786 */ 3771 PGM_ALL_CB_DECL(VBOXSTRICTRC) vgaLFBAccessHandler(PVMCC pVM, PVMCPUCC pVCpu, RTGCPHYS GCPhys, void *pvPhys, void *pvBuf, size_t cbBuf,3772 PGMACCESSTYPE enmAccessType, PGMACCESSORIGIN enmOrigin, void *pvUser)3773 { 3774 PVGASTATE pThis = (PVGASTATE)pvUser; 3775 int rc;3787 PGM_ALL_CB_DECL(VBOXSTRICTRC) vgaLFBAccessHandler(PVMCC pVM, PVMCPUCC pVCpu, RTGCPHYS GCPhys, void *pvPhys, 3788 void *pvBuf, size_t cbBuf, PGMACCESSTYPE enmAccessType, 3789 PGMACCESSORIGIN enmOrigin, void *pvUser) 3790 { 3791 PVGASTATE pThis = (PVGASTATE)pvUser; 3776 3792 Assert(pThis); 3777 3793 Assert(GCPhys >= pThis->GCPhysVRAM); 3778 NOREF(pVCpu); NOREF(pvPhys); NOREF(pvBuf); NOREF(cbBuf); NOREF(enmAccessType); NOREF(enmOrigin); 3779 3780 rc = vgaLFBAccess(pVM, pThis, GCPhys, 0); 3781 if (RT_SUCCESS(rc)) 3782 return VINF_PGM_HANDLER_DO_DEFAULT; 3783 AssertMsg(rc <= VINF_SUCCESS, ("rc=%Rrc\n", rc)); 3794 RT_NOREF(pVCpu, pvPhys, pvBuf, cbBuf, enmAccessType, enmOrigin); 3795 3796 VBOXSTRICTRC rc = vgaLFBAccess(pVM, pThis, GCPhys, 0); 3797 if (rc == VINF_SUCCESS) 3798 rc = VINF_PGM_HANDLER_DO_DEFAULT; 3799 #ifdef IN_RING3 3800 else 3801 AssertMsg(rc < VINF_SUCCESS, ("rc=%Rrc\n", VBOXSTRICTRC_VAL(rc))); 3802 #endif 3784 3803 return rc; 3785 3804 } … … 4828 4847 /* This should be called only in non VBVA mode. */ 4829 4848 # else 4830 if (VBVAUpdateDisplay 4849 if (VBVAUpdateDisplay(pThis) == VINF_SUCCESS) 4831 4850 { 4832 4851 PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect); … … 4843 4862 if (pThis->fRemappedVGA) 4844 4863 { 4845 IOMM MIOResetRegion(PDMDevHlpGetVM(pDevIns), 0x000a0000);4864 IOMMmioResetRegion(PDMDevHlpGetVM(pDevIns), pDevIns, pThis->hMmioLegacy); 4846 4865 pThis->fRemappedVGA = false; 4847 4866 } … … 4874 4893 if (pThis->fRemappedVGA) 4875 4894 { 4876 IOMM MIOResetRegion(PDMDevHlpGetVM(pDevIns), 0x000a0000);4895 IOMMmioResetRegion(PDMDevHlpGetVM(pDevIns), pDevIns, pThis->hMmioLegacy); 4877 4896 pThis->fRemappedVGA = false; 4878 4897 } … … 6055 6074 if (pThis->fRemappedVGA) 6056 6075 { 6057 IOMM MIOResetRegion(PDMDevHlpGetVM(pDevIns), 0x000a0000);6076 IOMMmioResetRegion(PDMDevHlpGetVM(pDevIns), pDevIns, pThis->hMmioLegacy); 6058 6077 pThis->fRemappedVGA = false; 6059 6078 } … … 6624 6643 # undef REG_PORT 6625 6644 6626 /* vga mmio */6627 rc = PDMDevHlpMMIORegisterEx(pDevIns, 0x000a0000, 0x00020000, NULL /*pvUser*/,6628 IOMMMIO_FLAGS_READ_PASSTHRU | IOMMMIO_FLAGS_WRITE_PASSTHRU,6629 vgaMMIOWrite, vgaMMIORead, vgaMMIOFill, "VGA - VGA Video Buffer");6630 AssertRCReturn(rc, rc);6631 if (pDevIns->fRCEnabled)6632 {6633 rc = PDMDevHlpMMIORegisterRCEx(pDevIns, 0x000a0000, 0x00020000, NIL_RTRCPTR /*pvUser*/,6634 "vgaMMIOWrite", "vgaMMIORead", "vgaMMIOFill");6635 if (RT_FAILURE(rc))6636 return rc;6637 }6638 if (pDevIns->fR0Enabled)6639 {6640 rc = PDMDevHlpMMIORegisterR0Ex(pDevIns, 0x000a0000, 0x00020000, NIL_RTR0PTR /*pvUser*/,6641 "vgaMMIOWrite", "vgaMMIORead", "vgaMMIOFill");6642 if (RT_FAILURE(rc))6643 return rc;6644 }6645 6646 6645 /* vga bios */ 6647 6646 rc = PDMDevHlpIoPortCreateAndMap(pDevIns, VBE_PRINTF_PORT, 1 /*cPorts*/, vgaIoPortWriteBios, vgaIoPortReadBios, 6648 6647 "VGA BIOS debug/panic", NULL /*paExtDescs*/, &pThis->hIoPortBios); 6648 AssertRCReturn(rc, rc); 6649 6650 /* 6651 * The MDA/CGA/EGA/VGA/whatever fixed MMIO area. 6652 */ 6653 rc = PDMDevHlpMmioCreateExAndMap(pDevIns, 0x000a0000, 0x00020000, 6654 IOMMMIO_FLAGS_READ_PASSTHRU | IOMMMIO_FLAGS_WRITE_PASSTHRU | IOMMMIO_FLAGS_ABS, 6655 NULL /*pPciDev*/, UINT32_MAX /*iPciRegion*/, 6656 vgaMmioWrite, vgaMmioRead, vgaMmioFill, NULL /*pvUser*/, 6657 "VGA - VGA Video Buffer", &pThis->hMmioLegacy); 6649 6658 AssertRCReturn(rc, rc); 6650 6659 … … 7014 7023 LogoHdr.fu8FadeIn = 1; 7015 7024 else if (RT_FAILURE(rc)) 7016 return PDMDEV_SET_ERROR(pDevIns, rc, 7017 N_("Configuration error: Querying \"FadeIn\" as integer failed")); 7025 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Querying \"FadeIn\" as integer failed")); 7018 7026 7019 7027 rc = pHlp->pfnCFGMQueryU8(pCfg, "FadeOut", &LogoHdr.fu8FadeOut); … … 7021 7029 LogoHdr.fu8FadeOut = 1; 7022 7030 else if (RT_FAILURE(rc)) 7023 return PDMDEV_SET_ERROR(pDevIns, rc, 7024 N_("Configuration error: Querying \"FadeOut\" as integer failed")); 7031 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Querying \"FadeOut\" as integer failed")); 7025 7032 7026 7033 rc = pHlp->pfnCFGMQueryU16(pCfg, "LogoTime", &LogoHdr.u16LogoMillies); … … 7028 7035 LogoHdr.u16LogoMillies = 0; 7029 7036 else if (RT_FAILURE(rc)) 7030 return PDMDEV_SET_ERROR(pDevIns, rc, 7031 N_("Configuration error: Querying \"LogoTime\" as integer failed")); 7037 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Querying \"LogoTime\" as integer failed")); 7032 7038 7033 7039 rc = pHlp->pfnCFGMQueryU8(pCfg, "ShowBootMenu", &LogoHdr.fu8ShowBootMenu); … … 7035 7041 LogoHdr.fu8ShowBootMenu = 0; 7036 7042 else if (RT_FAILURE(rc)) 7037 return PDMDEV_SET_ERROR(pDevIns, rc, 7038 N_("Configuration error: Querying \"ShowBootMenu\" as integer failed")); 7043 return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Querying \"ShowBootMenu\" as integer failed")); 7039 7044 7040 7045 # if defined(DEBUG) && !defined(DEBUG_sunlover) && !defined(DEBUG_michael) … … 7209 7214 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatRZMemoryWrite, STAMTYPE_PROFILE, "RZ/MMIO-Write", STAMUNIT_TICKS_PER_CALL, "Profiling of the VGAGCMemoryWrite() body."); 7210 7215 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatR3MemoryWrite, STAMTYPE_PROFILE, "R3/MMIO-Write", STAMUNIT_TICKS_PER_CALL, "Profiling of the VGAGCMemoryWrite() body."); 7211 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMapPage, STAMTYPE_COUNTER, "MapPageCalls", STAMUNIT_OCCURENCES, "Calls to IOMM MIOMapMMIO2Page.");7216 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMapPage, STAMTYPE_COUNTER, "MapPageCalls", STAMUNIT_OCCURENCES, "Calls to IOMMmioMapMmio2Page."); 7212 7217 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatUpdateDisp, STAMTYPE_COUNTER, "UpdateDisplay", STAMUNIT_OCCURENCES, "Calls to vgaR3PortUpdateDisplay()."); 7213 7218 # endif … … 7298 7303 AssertReturn(!pThis->fVMSVGAEnabled, VERR_INVALID_STATE); 7299 7304 # endif 7305 7306 /* 7307 * MMIO. 7308 */ 7309 rc = PDMDevHlpMmioSetUpContextEx(pDevIns, pThis->hMmioLegacy, vgaMmioWrite, vgaMmioRead, vgaMmioFill, NULL /*pvUser*/); 7310 AssertRCReturn(rc, rc); 7300 7311 7301 7312 /* -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r82088 r82094 563 563 } pendingVhwaCommands; 564 564 565 /** The MMIO handle of the legacy graphics buffer/regs at 0xa0000-0xbffff. */ 566 PGMMMIO2HANDLE hMmioLegacy; 567 565 568 /** @name I/O ports for range 0x3c0-3cf. 566 569 * @{ */ -
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r82026 r82094 813 813 814 814 815 #if 0 /* not used any more */ 815 816 /** 816 817 * Mapping an MMIO2 page in place of an MMIO page for direct access. … … 884 885 return VINF_SUCCESS; 885 886 } 887 #endif /* unused */ 886 888 887 889 #if 0 /* not used any more */ … … 942 944 #endif 943 945 944 946 #if 0 /* unused */ 945 947 /** 946 948 * Reset a previously modified MMIO region; restore the access flags. … … 1003 1005 return rc; 1004 1006 } 1005 1007 #endif /*unused */ -
trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp
r82026 r82094 1056 1056 * for the time being. 1057 1057 */ 1058 VMM _INT_DECL(int) IOMMmioMapMmio2Page(PVMCC pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS offRegion,1059 1058 VMMDECL(int) IOMMmioMapMmio2Page(PVMCC pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS offRegion, 1059 uint64_t hMmio2, RTGCPHYS offMmio2, uint64_t fPageFlags) 1060 1060 { 1061 1061 /* Currently only called from the VGA device during MMIO. */ … … 1109 1109 * Do the aliasing; page align the addresses since PGM is picky. 1110 1110 */ 1111 #if 0 /** @todo fix when DevVGA is converted to new model. */ 1112 rc = PGMHandlerPhysicalPageAlias(pVM, GCPhys, GCPhys + (offRange & ~(RTGCPHYS)PAGE_OFFSET_MASK), 1113 pDevIns, hMmio2, offMmio2); 1114 #else 1115 AssertFailed(); 1116 rc = VERR_NOT_IMPLEMENTED; 1117 RT_NOREF(offMmio2, hMmio2); 1118 #endif 1111 rc = PGMHandlerPhysicalPageAliasMmio2(pVM, GCPhys, GCPhys + (offRegion & ~(RTGCPHYS)PAGE_OFFSET_MASK), 1112 pDevIns, hMmio2, offMmio2); 1119 1113 } 1120 1114 else … … 1230 1224 * @param hRegion The handle to the MMIO region. 1231 1225 */ 1232 VMM _INT_DECL(int) IOMMmioResetRegion(PVMCC pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion)1226 VMMDECL(int) IOMMmioResetRegion(PVMCC pVM, PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion) 1233 1227 { 1234 1228 Log(("IOMMMIOResetRegion %#RX64\n", hRegion)); -
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r81153 r82094 29 29 #include <VBox/vmm/stam.h> 30 30 #include <VBox/vmm/dbgf.h> 31 #ifdef IN_RING0 32 # include <VBox/vmm/pdmdev.h> 33 #endif 31 34 #include "PGMInternal.h" 32 35 #include <VBox/vmm/vmcc.h> … … 1103 1106 * 1104 1107 * This is used in pair with PGMHandlerPhysicalPageTempOff(), 1105 * PGMHandlerPhysicalPageAlias () or PGMHandlerPhysicalPageAliasHC().1108 * PGMHandlerPhysicalPageAliasMmio2() or PGMHandlerPhysicalPageAliasHC(). 1106 1109 * 1107 1110 * @returns VBox status code. … … 1283 1286 1284 1287 /** 1288 * Resolves an MMIO2 page. 1289 * 1290 * Caller as taken the PGM lock. 1291 * 1292 * @returns Pointer to the page if valid, NULL otherwise 1293 * @param pVM The cross context VM structure. 1294 * @param pDevIns The device owning it. 1295 * @param hMmio2 The MMIO2 region. 1296 * @param offMmio2Page The offset into the region. 1297 */ 1298 static PPGMPAGE pgmPhysResolveMmio2PageLocked(PVMCC pVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS offMmio2Page) 1299 { 1300 /* Only works if the handle is in the handle table! */ 1301 AssertReturn(hMmio2 != 0, NULL); 1302 hMmio2--; 1303 1304 /* Must check the first one for PGMREGMMIO2RANGE_F_FIRST_CHUNK. */ 1305 AssertReturn(hMmio2 < RT_ELEMENTS(pVM->pgm.s.apMmio2RangesR3), NULL); 1306 PPGMREGMMIO2RANGE pCur = pVM->pgm.s.CTX_SUFF(apMmio2Ranges)[hMmio2]; 1307 AssertReturn(pCur, NULL); 1308 AssertReturn(pCur->fFlags & PGMREGMMIO2RANGE_F_FIRST_CHUNK, NULL); 1309 1310 /* Loop thru the sub-ranges till we find the one covering offMmio2. */ 1311 for (;;) 1312 { 1313 AssertReturn(pCur->fFlags & PGMREGMMIO2RANGE_F_MMIO2, NULL); 1314 #ifdef IN_RING3 1315 AssertReturn(pCur->pDevInsR3 == pDevIns, NULL); 1316 #else 1317 AssertReturn(pCur->pDevInsR3 == pDevIns->pDevInsForR3, NULL); 1318 #endif 1319 1320 /* Does it match the offset? */ 1321 if (offMmio2Page < pCur->cbReal) 1322 return &pCur->RamRange.aPages[offMmio2Page >> PAGE_SHIFT]; 1323 1324 /* Advance if we can. */ 1325 AssertReturn(!(pCur->fFlags & PGMREGMMIO2RANGE_F_LAST_CHUNK), NULL); 1326 offMmio2Page -= pCur->cbReal; 1327 hMmio2++; 1328 AssertReturn(hMmio2 < RT_ELEMENTS(pVM->pgm.s.apMmio2RangesR3), NULL); 1329 pCur = pVM->pgm.s.CTX_SUFF(apMmio2Ranges)[hMmio2]; 1330 AssertReturn(pCur, NULL); 1331 } 1332 } 1333 1334 /** 1285 1335 * Replaces an MMIO page with an MMIO2 page. 1286 1336 * … … 1309 1359 * start and end pages. 1310 1360 * @param GCPhysPage The physical address of the page to turn off 1311 * access monitoring for. 1361 * access monitoring for and replace with the MMIO2 1362 * page. 1312 1363 * @param GCPhysPageRemap The physical address of the MMIO2 page that 1313 1364 * serves as backing memory. … … 1322 1373 * 1323 1374 */ 1324 VMMDECL(int) PGMHandlerPhysicalPageAlias (PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage, RTGCPHYS GCPhysPageRemap)1325 { 1326 /// Assert(!IOMIsLockOwner(pVM)); /* We mustn't own any other locks when calling this */ 1375 VMMDECL(int) PGMHandlerPhysicalPageAliasMmio2(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage, 1376 PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2, RTGCPHYS offMMio2PageRemap) 1377 { 1327 1378 pgmLock(pVM); 1379 1380 /* 1381 * Resolve the MMIO2 reference. 1382 */ 1383 PPGMPAGE pPageRemap = pgmPhysResolveMmio2PageLocked(pVM, pDevIns, hMmio2, offMMio2PageRemap); 1384 if (RT_LIKELY(pPageRemap)) 1385 AssertMsgReturnStmt(PGM_PAGE_GET_TYPE(pPageRemap) == PGMPAGETYPE_MMIO2, 1386 ("hMmio2=%RU64 offMMio2PageRemap=%RGp %R[pgmpage]\n", hMmio2, offMMio2PageRemap, pPageRemap), 1387 pgmUnlock(pVM), VERR_PGM_PHYS_NOT_MMIO2); 1388 else 1389 { 1390 pgmUnlock(pVM); 1391 return VERR_OUT_OF_RANGE; 1392 } 1328 1393 1329 1394 /* … … 1342 1407 1343 1408 /* 1344 * Get and validate the two pages.1409 * Validate the page. 1345 1410 */ 1346 PPGMPAGE pPageRemap;1347 int rc = pgmPhysGetPageEx(pVM, GCPhysPageRemap, &pPageRemap);1348 AssertReturnStmt(RT_SUCCESS_NP(rc), pgmUnlock(pVM), rc);1349 AssertMsgReturnStmt(PGM_PAGE_GET_TYPE(pPageRemap) == PGMPAGETYPE_MMIO2,1350 ("GCPhysPageRemap=%RGp %R[pgmpage]\n", GCPhysPageRemap, pPageRemap),1351 pgmUnlock(pVM), VERR_PGM_PHYS_NOT_MMIO2);1352 1353 1411 PPGMPAGE pPage; 1354 rc = pgmPhysGetPageEx(pVM, GCPhysPage, &pPage);1412 int rc = pgmPhysGetPageEx(pVM, GCPhysPage, &pPage); 1355 1413 AssertReturnStmt(RT_SUCCESS_NP(rc), pgmUnlock(pVM), rc); 1356 1414 if (PGM_PAGE_GET_TYPE(pPage) != PGMPAGETYPE_MMIO) … … 1369 1427 * to an MMIO/ZERO page before doing the new mapping. 1370 1428 */ 1371 Log(("PGMHandlerPhysicalPageAlias : GCPhysPage=%RGp (%R[pgmpage]; %RHp -> %RHp\n",1429 Log(("PGMHandlerPhysicalPageAliasMmio2: GCPhysPage=%RGp (%R[pgmpage]; %RHp -> %RHp\n", 1372 1430 GCPhysPage, pPage, PGM_PAGE_GET_HCPHYS(pPage), PGM_PAGE_GET_HCPHYS(pPageRemap))); 1373 1431 pgmHandlerPhysicalResetAliasedPage(pVM, pPage, GCPhysPage, false /*fDoAccounting*/); … … 1380 1438 * This page now serves as an alias for the backing memory specified. 1381 1439 */ 1382 LogFlow(("PGMHandlerPhysicalPageAlias : %RGp (%R[pgmpage]) alias for%RGp (%R[pgmpage])\n",1383 GCPhysPage, pPage, GCPhysPageRemap, pPageRemap ));1440 LogFlow(("PGMHandlerPhysicalPageAliasMmio2: %RGp (%R[pgmpage]) alias for %RU64/%RGp (%R[pgmpage])\n", 1441 GCPhysPage, pPage, hMmio2, offMMio2PageRemap, pPageRemap )); 1384 1442 PGM_PAGE_SET_HCPHYS(pVM, pPage, PGM_PAGE_GET_HCPHYS(pPageRemap)); 1385 1443 PGM_PAGE_SET_TYPE(pVM, pPage, PGMPAGETYPE_MMIO2_ALIAS_MMIO); … … 1402 1460 PGM_PAGE_SET_NEM_STATE(pPage, u2State); 1403 1461 } 1404 LogFlow(("PGMHandlerPhysicalPageAlias : => %R[pgmpage]\n", pPage));1462 LogFlow(("PGMHandlerPhysicalPageAliasMmio2: => %R[pgmpage]\n", pPage)); 1405 1463 pgmUnlock(pVM); 1406 1464 return VINF_SUCCESS; … … 1422 1480 * Replaces an MMIO page with an arbitrary HC page in the shadow page tables. 1423 1481 * 1424 * This differs from PGMHandlerPhysicalPageAlias in that the page doesn't need1425 * to be a known MMIO2 page and that only shadow paging may access the page.1426 * The latter distinction is important because the only use for this featureis1427 * f or mapping the special APIC access page that VT-x uses to detect APIC MMIO1428 * operations, the page is shared between all guest CPUs and actually not1429 * written to. At least at the moment.1482 * This differs from PGMHandlerPhysicalPageAliasMmio2 in that the page doesn't 1483 * need to be a known MMIO2 page and that only shadow paging may access the 1484 * page. The latter distinction is important because the only use for this 1485 * feature is for mapping the special APIC access page that VT-x uses to detect 1486 * APIC MMIO operations, the page is shared between all guest CPUs and actually 1487 * not written to. At least at the moment. 1430 1488 * 1431 1489 * The caller must do required page table modifications. You can get away … … 1490 1548 * specified as far as shadow paging is concerned. 1491 1549 */ 1492 LogFlow(("PGMHandlerPhysicalPageAlias : %RGp (%R[pgmpage]) alias for %RHp\n",1550 LogFlow(("PGMHandlerPhysicalPageAliasHC: %RGp (%R[pgmpage]) alias for %RHp\n", 1493 1551 GCPhysPage, pPage, HCPhysPageRemap)); 1494 1552 PGM_PAGE_SET_HCPHYS(pVM, pPage, HCPhysPageRemap); -
trunk/src/VBox/VMM/VMMR0/VMMR0.def
r80531 r82094 39 39 PDMR0DeviceRegisterModule 40 40 PDMR0DeviceDeregisterModule 41 IOMM MIOResetRegion42 IOMM MIOMapMMIO2Page41 IOMMmioResetRegion 42 IOMMmioMapMmio2Page 43 43 RTLogDefaultInstance 44 44 RTLogDefaultInstanceEx
Note:
See TracChangeset
for help on using the changeset viewer.