- Timestamp:
- Feb 17, 2009 4:19:51 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r16801 r16859 1506 1506 /* The flags will be corrected when entering and leaving long mode. */ 1507 1507 } 1508 1509 CPUMSetHyperCR3(pVM, (uint32_t)pVM->pgm.s.HCPhysShw32BitPD);1510 1508 #endif 1511 1509 -
trunk/src/VBox/VMM/PGMShw.h
r16376 r16859 195 195 pVM->pgm.s.HCPhysShwCR3 = pVM->pgm.s.HCPhysShwNestedRoot; 196 196 #endif 197 198 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY 199 CPUMSetHyperCR3(pVM, PGMGetHyperCR3(pVM)); 200 #endif 201 197 202 return VINF_SUCCESS; 198 203 } -
trunk/src/VBox/VMM/VMM.cpp
r16107 r16859 1071 1071 for (;;) 1072 1072 { 1073 Assert(CPUMGetHyperCR3(pVM) == PGMGetHyperCR3(pVM)); 1073 1074 int rc; 1074 1075 do … … 1207 1208 { 1208 1209 int rc; 1210 Assert(CPUMGetHyperCR3(pVM) == PGMGetHyperCR3(pVM)); 1209 1211 do 1210 1212 { … … 1263 1265 { 1264 1266 int rc; 1267 Assert(CPUMGetHyperCR3(pVM) == PGMGetHyperCR3(pVM)); 1265 1268 do 1266 1269 { -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r15416 r16859 126 126 { 127 127 pVM->cpum.s.Hyper.cr3 = cr3; 128 129 #ifdef IN_RC 130 /* Update the current CR3. */ 131 ASMSetCR3(cr3); 132 #endif 133 } 134 135 VMMDECL(uint32_t) CPUMGetHyperCR3(PVM pVM) 136 { 137 return pVM->cpum.s.Hyper.cr3; 128 138 } 129 139 -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r16842 r16859 4672 4672 # endif 4673 4673 4674 # ifdef IN_RC 4675 /* Update the current CR3. */ 4676 ASMSetCR3(pVM->pgm.s.HCPhysShwCR3); 4677 # endif 4674 /* Set the current hypervisor CR3. */ 4675 CPUMSetHyperCR3(pVM, PGMGetHyperCR3(pVM)); 4678 4676 4679 4677 /* Clean up the old CR3 root. */ -
trunk/src/VBox/VMM/VMMSwitcher.cpp
r16847 r16859 462 462 463 463 *uSrc.pu32 = PGMGetInterAmd64CR3(pVM); 464 break;465 }466 467 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY468 /* @todo No need for three GetHyper calls; one and the same base is used */469 #endif470 /*471 * Store the 32-Bit CR3 (32-bit) for the hypervisor (shadow) memory context.472 */473 case FIX_HYPER_32BIT_CR3:474 {475 *uSrc.pu32 = PGMGetHyper32BitCR3(pVM);476 break;477 }478 479 /*480 * Store the PAE CR3 (32-bit) for the hypervisor (shadow) memory context.481 */482 case FIX_HYPER_PAE_CR3:483 {484 *uSrc.pu32 = PGMGetHyperPaeCR3(pVM);485 464 break; 486 465 } -
trunk/src/VBox/VMM/VMMSwitcher/32BitTo32Bit.asm
r8155 r16859 28 28 %define SWITCHER_FIX_INTER_CR3_HC FIX_INTER_32BIT_CR3 29 29 %define SWITCHER_FIX_INTER_CR3_GC FIX_INTER_32BIT_CR3 30 %define SWITCHER_FIX_HYPER_CR3 FIX_HYPER_32BIT_CR331 30 32 31 ;******************************************************************************* -
trunk/src/VBox/VMM/VMMSwitcher/32BitToPAE.asm
r8155 r16859 28 28 %define SWITCHER_FIX_INTER_CR3_HC FIX_INTER_32BIT_CR3 29 29 %define SWITCHER_FIX_INTER_CR3_GC FIX_INTER_PAE_CR3 30 %define SWITCHER_FIX_HYPER_CR3 FIX_HYPER_PAE_CR331 30 %define NEED_PAE_ON_32BIT_HOST 1 32 31 -
trunk/src/VBox/VMM/VMMSwitcher/AMD64To32Bit.asm
r14169 r16859 30 30 ;%define SWITCHER_FIX_INTER_CR3_HC FIX_INTER_AMD64_CR3 31 31 %define SWITCHER_FIX_INTER_CR3_GC FIX_INTER_32BIT_CR3 32 %define SWITCHER_FIX_HYPER_CR3 FIX_HYPER_32BIT_CR333 32 34 33 -
trunk/src/VBox/VMM/VMMSwitcher/AMD64ToPAE.asm
r14167 r16859 30 30 ;%define SWITCHER_FIX_INTER_CR3_HC FIX_INTER_AMD64_CR3 31 31 %define SWITCHER_FIX_INTER_CR3_GC FIX_INTER_PAE_CR3 32 %define SWITCHER_FIX_HYPER_CR3 FIX_HYPER_PAE_CR333 32 34 33 -
trunk/src/VBox/VMM/VMMSwitcher/AMD64andLegacy.mac
r15414 r16859 329 329 DEBUG_CHAR('1') ; trashes esi 330 330 331 ; Store the hypervisor cr3 for later loading 332 mov ebp, [rdx + CPUM.Hyper.cr3] 333 331 334 ;; 332 335 ;; Load Intermediate memory context. … … 438 441 ;jnz .delay_loop 439 442 ; load final cr3 and do far jump to load cs. 440 FIXUP SWITCHER_FIX_HYPER_CR3, 1 441 mov eax, 0ffffffffh 442 mov cr3, eax 443 mov cr3, ebp ; ebp set above 443 444 DEBUG_CHAR('0') 444 445 -
trunk/src/VBox/VMM/VMMSwitcher/PAETo32Bit.asm
r8155 r16859 28 28 %define SWITCHER_FIX_INTER_CR3_HC FIX_INTER_PAE_CR3 29 29 %define SWITCHER_FIX_INTER_CR3_GC FIX_INTER_32BIT_CR3 30 %define SWITCHER_FIX_HYPER_CR3 FIX_HYPER_32BIT_CR331 30 %define NEED_32BIT_ON_PAE_HOST 1 32 31 -
trunk/src/VBox/VMM/VMMSwitcher/PAEToPAE.asm
r8155 r16859 28 28 %define SWITCHER_FIX_INTER_CR3_HC FIX_INTER_PAE_CR3 29 29 %define SWITCHER_FIX_INTER_CR3_GC FIX_INTER_PAE_CR3 30 %define SWITCHER_FIX_HYPER_CR3 FIX_HYPER_PAE_CR331 30 32 31 ;******************************************************************************* -
trunk/src/VBox/VMM/VMMSwitcher/PAEand32Bit.mac
r14192 r16859 215 215 DEBUG_CHAR('1') ; trashes esi 216 216 217 ; Store the hypervisor cr3 for later loading 218 mov ebp, [edx + CPUM.Hyper.cr3] 219 217 220 ;; 218 221 ;; Load Intermediate memory context. … … 269 272 DEBUG_CHAR('-') 270 273 ; load final cr3 and do far jump to load cs. 271 FIXUP SWITCHER_FIX_HYPER_CR3, 1 272 mov eax, 0ffffffffh 273 mov cr3, eax 274 mov cr3, ebp ; ebp set above 274 275 DEBUG_CHAR('0') 275 276 -
trunk/src/VBox/VMM/VMMSwitcher/VMMSwitcher.h
r16847 r16859 43 43 #define FIX_INTER_PAE_CR3 13 44 44 #define FIX_INTER_AMD64_CR3 14 45 #define FIX_HYPER_32BIT_CR3 1546 #define FIX_HYPER_PAE_CR3 1647 45 #define FIX_HYPER_CS 18 48 46 #define FIX_HYPER_DS 19 -
trunk/src/VBox/VMM/VMMSwitcher/VMMSwitcher.mac
r16847 r16859 87 87 %define FIX_INTER_PAE_CR3 13 88 88 %define FIX_INTER_AMD64_CR3 14 89 %define FIX_HYPER_32BIT_CR3 1590 %define FIX_HYPER_PAE_CR3 1691 89 %define FIX_HYPER_CS 18 92 90 %define FIX_HYPER_DS 19
Note:
See TracChangeset
for help on using the changeset viewer.