Changeset 95571 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Jul 8, 2022 3:01:07 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGMSavedState.cpp
r93922 r95571 467 467 { 468 468 void const *pvPage; 469 rc = pgmPhysPageMapReadOnly(pVM, pPage, GCPhys, &pvPage); 469 #ifdef VBOX_WITH_PGM_NEM_MODE 470 if (!PGMROMPROT_IS_ROM(enmProt)) 471 pvPage = &pRom->pbR3Alternate[iPage << GUEST_PAGE_SHIFT]; 472 else 473 #endif 474 rc = pgmPhysPageMapReadOnly(pVM, pPage, GCPhys, &pvPage); 470 475 if (RT_SUCCESS(rc)) 471 476 memcpy(abPage, pvPage, GUEST_PAGE_SIZE); … … 553 558 { 554 559 void const *pvPage; 555 rc = pgmPhysPageMapReadOnly(pVM, pPage, GCPhys, &pvPage); 560 #ifdef VBOX_WITH_PGM_NEM_MODE 561 if (PGMROMPROT_IS_ROM(enmProt)) 562 pvPage = &pRom->pbR3Alternate[iPage << GUEST_PAGE_SHIFT]; 563 else 564 #endif 565 rc = pgmPhysPageMapReadOnly(pVM, pPage, GCPhys, &pvPage); 556 566 if (RT_SUCCESS(rc)) 557 567 memcpy(abPage, pvPage, GUEST_PAGE_SIZE); … … 2882 2892 default: AssertLogRelFailedReturn(VERR_IPE_NOT_REACHED_DEFAULT_CASE); /* shut up gcc */ 2883 2893 } 2894 #ifdef VBOX_WITH_PGM_NEM_MODE 2895 bool const fAltPage = pRealPage != NULL; 2896 #endif 2884 2897 if (!pRealPage) 2885 2898 { … … 2902 2915 case PGM_STATE_REC_ROM_VIRGIN: 2903 2916 case PGM_STATE_REC_ROM_SHW_RAW: 2904 { 2905 rc = pgmPhysPageMakeWritableAndMap(pVM, pRealPage, GCPhys, &pvDstPage); 2906 AssertLogRelMsgRCReturn(rc, ("GCPhys=%RGp rc=%Rrc\n", GCPhys, rc), rc); 2917 #ifdef VBOX_WITH_PGM_NEM_MODE 2918 if (fAltPage) 2919 pvDstPage = &pRom->pbR3Alternate[iPage << GUEST_PAGE_SHIFT]; 2920 else 2921 #endif 2922 { 2923 rc = pgmPhysPageMakeWritableAndMap(pVM, pRealPage, GCPhys, &pvDstPage); 2924 AssertLogRelMsgRCReturn(rc, ("GCPhys=%RGp rc=%Rrc\n", GCPhys, rc), rc); 2925 } 2907 2926 break; 2908 }2909 2927 } 2910 2928
Note:
See TracChangeset
for help on using the changeset viewer.