Changeset 45739 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Apr 25, 2013 7:44:05 PM (12 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/HM.cpp
r45728 r45739 837 837 static void hmR3DisableRawMode(PVM pVM) 838 838 { 839 /* Disable mapping of the hypervisor into the shadow page table. */840 PGMR3MappingsDisable(pVM);841 842 839 /* Reinit the paging mode to force the new shadow mode. */ 843 840 for (VMCPUID i = 0; i < pVM->cCpus; i++) -
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r45701 r45739 1226 1226 * Init the structure. 1227 1227 */ 1228 #ifdef PGM_WITHOUT_MAPPINGS1229 pVM->pgm.s.fMappingsDisabled = true;1230 #endif1231 1228 pVM->pgm.s.offVM = RT_OFFSETOF(VM, pgm.s); 1232 1229 pVM->pgm.s.offVCpuPGM = RT_OFFSETOF(VMCPU, pgm.s); -
trunk/src/VBox/VMM/VMMR3/PGMMap.cpp
r44528 r45739 514 514 VMMR3DECL(int) PGMR3MappingsFix(PVM pVM, RTGCPTR GCPtrBase, uint32_t cb) 515 515 { 516 Log(("PGMR3MappingsFix: GCPtrBase=%RGv cb=%#x (fMappingsFixed=%RTbool fMappingsDisabled=%RTbool)\n",517 GCPtrBase, cb, pVM->pgm.s.fMappingsFixed, p VM->pgm.s.fMappingsDisabled));516 Log(("PGMR3MappingsFix: GCPtrBase=%RGv cb=%#x (fMappingsFixed=%RTbool MappingEnabled=%RTbool)\n", 517 GCPtrBase, cb, pVM->pgm.s.fMappingsFixed, pgmMapAreMappingsEnabled(pVM))); 518 518 519 519 #ifndef PGM_WITHOUT_MAPPINGS … … 684 684 685 685 686 687 /**688 * Interface for disabling the guest mappings when switching to HM mode689 * during VM creation and VM reset.690 *691 * (This doesn't touch the intermediate table!)692 *693 * @returns VBox status code.694 * @param pVM Pointer to the VM.695 */696 VMMR3DECL(int) PGMR3MappingsDisable(PVM pVM)697 {698 AssertReturn(!pVM->pgm.s.fMappingsFixed, VERR_PGM_MAPPINGS_FIXED);699 AssertReturn(!pVM->pgm.s.fMappingsFixedRestored, VERR_PGM_MAPPINGS_FIXED);700 if (pVM->pgm.s.fMappingsDisabled)701 return VINF_SUCCESS;702 703 #ifdef VBOX_WITH_RAW_MODE704 /*705 * Deactivate (only applies to Virtual CPU #0).706 */707 if (pVM->aCpus[0].pgm.s.pShwPageCR3R3)708 {709 pgmLock(pVM); /* to avoid assertions */710 int rc = pgmMapDeactivateCR3(pVM, pVM->aCpus[0].pgm.s.pShwPageCR3R3);711 pgmUnlock(pVM);712 AssertRCReturn(rc, rc);713 }714 #endif /* VBOX_WITH_RAW_MODE */715 716 /*717 * Mark the mappings as disabled and trigger a CR3 re-sync.718 */719 pVM->pgm.s.fMappingsDisabled = true;720 for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)721 {722 pVM->aCpus[idCpu].pgm.s.fSyncFlags &= ~PGM_SYNC_MONITOR_CR3;723 VMCPU_FF_SET(&pVM->aCpus[idCpu], VMCPU_FF_PGM_SYNC_CR3);724 }725 return VINF_SUCCESS;726 }727 728 729 686 /** 730 687 * Unfixes the mappings. … … 739 696 VMMR3DECL(int) PGMR3MappingsUnfix(PVM pVM) 740 697 { 741 Log(("PGMR3MappingsUnfix: fMappingsFixed=%RTbool fMappingsDisabled=%RTbool\n", pVM->pgm.s.fMappingsFixed, pVM->pgm.s.fMappingsDisabled));698 Log(("PGMR3MappingsUnfix: fMappingsFixed=%RTbool MappingsEnabled=%RTbool\n", pVM->pgm.s.fMappingsFixed, pgmMapAreMappingsEnabled(pVM))); 742 699 if ( pgmMapAreMappingsEnabled(pVM) 743 700 && ( pVM->pgm.s.fMappingsFixed … … 1057 1014 Pde.u = PGM_PDFLAGS_MAPPING | X86_PDE_P | X86_PDE_A | X86_PDE_RW | X86_PDE_US | (uint32_t)pMap->aPTs[i].HCPhysPT; 1058 1015 pPGM->pInterPD->a[iNewPDE] = Pde; 1016 1059 1017 /* 1060 1018 * PAE. … … 1458 1416 { 1459 1417 NOREF(pszArgs); 1460 if ( pVM->pgm.s.fMappingsDisabled)1418 if (!pgmMapAreMappingsEnabled(pVM)) 1461 1419 pHlp->pfnPrintf(pHlp, "\nThe mappings are DISABLED.\n"); 1462 1420 else if (pVM->pgm.s.fMappingsFixed)
Note:
See TracChangeset
for help on using the changeset viewer.