Changeset 82199 in vbox
- Timestamp:
- Nov 25, 2019 8:54:14 PM (5 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
r82127 r82199 5287 5287 5288 5288 Log(("vmsvgaR3PciIORegionFifoMapUnmap: iRegion=%d GCPhysAddress=%RGp cb=%RGp enmType=%d\n", iRegion, GCPhysAddress, cb, enmType)); 5289 AssertReturn(iRegion == pThis->pciRegions.iFIFO && enmType == PCI_ADDRESS_SPACE_MEM_PREFETCH, VERR_INTERNAL_ERROR); 5289 AssertReturn( iRegion == pThis->pciRegions.iFIFO 5290 && ( enmType == PCI_ADDRESS_SPACE_MEM 5291 || (enmType == PCI_ADDRESS_SPACE_MEM_PREFETCH /* got wrong in 6.1.0RC1 */ && pThis->fStateLoaded)) 5292 , VERR_INTERNAL_ERROR); 5290 5293 if (GCPhysAddress != NIL_RTGCPHYS) 5291 5294 { -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r82178 r82199 5612 5612 RT_NOREF(pPciDev, cb); 5613 5613 5614 AssertReturn(iRegion == pThis->pciRegions.iVRAM && enmType == PCI_ADDRESS_SPACE_MEM_PREFETCH, VERR_INTERNAL_ERROR); 5614 AssertReturn( iRegion == pThis->pciRegions.iVRAM 5615 && ( enmType == PCI_ADDRESS_SPACE_MEM_PREFETCH 5616 || (enmType == PCI_ADDRESS_SPACE_MEM && pThis->fVMSVGAEnabled && pThis->fStateLoaded)) 5617 , VERR_INTERNAL_ERROR); 5615 5618 Assert(pPciDev == pDevIns->apPciDevs[0]); 5616 5619 … … 5724 5727 if (iRegion == pThis->pciRegions.iFIFO) 5725 5728 { 5726 /* Make sure it's still 32-bit memory. Ignore fluxtuations in the prefetch flag */5729 /* Make sure it's still 32-bit memory. Ignore fluxtuations in the prefetch flag. */ 5727 5730 AssertLogRelMsgReturn(!(enmType & (PCI_ADDRESS_SPACE_IO | PCI_ADDRESS_SPACE_BAR64)), ("enmType=%#x\n", enmType), 5728 5731 VERR_VGA_UNEXPECTED_PCI_REGION_LOAD_CHANGE); … … 5749 5752 } 5750 5753 5754 /* 5755 * VRAM used to be non-prefetchable till 6.1.0, so we end up here when restoring 5756 * states older than that with 6.1.0 and later. We just have to check that 5757 * the size and basic type matches, then return VINF_SUCCESS to ACK it. 5758 */ 5759 if (iRegion == pThis->pciRegions.iVRAM) 5760 { 5761 /* Make sure it's still 32-bit memory. Ignore fluxtuations in the prefetch flag. */ 5762 AssertLogRelMsgReturn(!(enmType & (PCI_ADDRESS_SPACE_IO | PCI_ADDRESS_SPACE_BAR64)), ("enmType=%#x\n", enmType), 5763 VERR_VGA_UNEXPECTED_PCI_REGION_LOAD_CHANGE); 5764 /* The size must be the same. */ 5765 AssertLogRelMsgReturn(cbRegion == pThis->vram_size, 5766 ("cbRegion=%#RGp vram_size=%#x\n", cbRegion, pThis->vram_size), 5767 VERR_SSM_LOAD_CONFIG_MISMATCH); 5768 return VINF_SUCCESS; 5769 } 5770 5751 5771 /* Emulate callbacks for 5.1 and older saved states by recursion. */ 5752 5772 if (iRegion == UINT32_MAX) … … 5808 5828 } 5809 5829 5830 5810 5831 /** 5811 5832 * @callback_method_impl{FNSSMDEVSAVEDONE} … … 5821 5842 # endif 5822 5843 } 5844 5823 5845 5824 5846 /** … … 5877 5899 5878 5900 /** 5901 * @callback_method_impl{FNSSMDEVLOADPREP} 5902 */ 5903 static DECLCALLBACK(int) vgaR3LoadPrep(PPDMDEVINS pDevIns, PSSMHANDLE pSSM) 5904 { 5905 PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE); 5906 RT_NOREF(pSSM); 5907 pThis->fStateLoaded = true; 5908 return VINF_SUCCESS; 5909 } 5910 5911 5912 /** 5879 5913 * @callback_method_impl{FNSSMDEVLOADEXEC} 5880 5914 */ … … 5885 5919 PCPDMDEVHLPR3 pHlp = pDevIns->pHlpR3; 5886 5920 int rc; 5921 5922 pThis->fStateLoaded = true; 5887 5923 5888 5924 if (uVersion < VGA_SAVEDSTATE_VERSION_ANCIENT || uVersion > VGA_SAVEDSTATE_VERSION) … … 6587 6623 6588 6624 rc = PDMDevHlpPCIIORegionCreateMmio2Ex(pDevIns, pThis->pciRegions.iFIFO, pThis->svga.cbFIFO, 6589 PCI_ADDRESS_SPACE_MEM _PREFETCH, 0 /*fFlags*/, vmsvgaR3PciIORegionFifoMapUnmap,6625 PCI_ADDRESS_SPACE_MEM, 0 /*fFlags*/, vmsvgaR3PciIORegionFifoMapUnmap, 6590 6626 "VMSVGA-FIFO", (void **)&pThisCC->svga.pau32FIFO, &pThis->hMmio2VmSvgaFifo); 6591 6627 AssertRCReturn(rc, PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS, … … 6796 6832 NULL, vgaR3LiveExec, NULL, 6797 6833 vgaR3SavePrep, vgaR3SaveExec, vgaR3SaveDone, 6798 NULL,vgaR3LoadExec, vgaR3LoadDone);6834 vgaR3LoadPrep, vgaR3LoadExec, vgaR3LoadDone); 6799 6835 AssertRCReturn(rc, rc); 6800 6836 -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r82114 r82199 362 362 /** Whether 3D is enabled for the VM. */ 363 363 bool f3DEnabled; 364 /** Set if state has been restored. */ 365 bool fStateLoaded; 364 366 #ifdef VBOX_WITH_VMSVGA 365 367 /* Whether the SVGA emulation is enabled or not. */ … … 367 369 bool fVMSVGAPciId; 368 370 bool fVMSVGAPciBarLayout; 369 bool Padding4[ 4];371 bool Padding4[3]; 370 372 #else 371 bool Padding4[3+ 4];373 bool Padding4[3+3]; 372 374 #endif 373 375
Note:
See TracChangeset
for help on using the changeset viewer.