Changeset 1269 in vbox
- Timestamp:
- Mar 6, 2007 12:48:07 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 19215
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMM.cpp
r1258 r1269 2938 2938 int rc; 2939 2939 PCPUMCTX pHyperCtx, pGuestCtx; 2940 RTGCPHYS CR3Phys = 0x0; /* fake address */ 2940 2941 2941 2942 if (!HWACCMR3IsAllowed(pVM)) … … 2953 2954 /* Enable mapping of the hypervisor into the shadow page table. */ 2954 2955 PGMR3ChangeShwPDMappings(pVM, true); 2956 2957 CPUMQueryHyperCtxPtr(pVM, &pHyperCtx); 2958 2959 pHyperCtx->cr0 = X86_CR0_PE | X86_CR0_WP | X86_CR0_PG | X86_CR0_TS | X86_CR0_ET | X86_CR0_NE | X86_CR0_MP; 2960 pHyperCtx->cr4 = X86_CR4_PGE | X86_CR4_OSFSXR | X86_CR4_OSXMMEEXCPT; 2961 PGMChangeMode(pVM, pHyperCtx->cr0, pHyperCtx->cr4, 0); 2962 PGMSyncCR3(pVM, pHyperCtx->cr0, CR3Phys, pHyperCtx->cr4, true); 2955 2963 2956 2964 VM_FF_CLEAR(pVM, VM_FF_TO_R3); 2957 2965 VM_FF_CLEAR(pVM, VM_FF_TIMER); 2958 2966 VM_FF_CLEAR(pVM, VM_FF_REQUEST); 2959 2960 CPUMQueryHyperCtxPtr(pVM, &pHyperCtx);2961 2962 pHyperCtx->cr0 = X86_CR0_PE | X86_CR0_WP | X86_CR0_PG | X86_CR0_TS | X86_CR0_ET | X86_CR0_NE | X86_CR0_MP;2963 pHyperCtx->cr4 = X86_CR4_PGE | X86_CR4_OSFSXR | X86_CR4_OSXMMEEXCPT;2964 2967 2965 2968 /* … … 3008 3011 /* Copy the hypervisor context to make sure we have a valid guest context. */ 3009 3012 *pGuestCtx = *pHyperCtx; 3010 3011 pGuestCtx->csHid.u32Base = 0; 3012 pGuestCtx->csHid.u32Limit = 0xffffffff; 3013 pGuestCtx->cr3 = CR3Phys; 3014 3015 VM_FF_CLEAR(pVM, VM_FF_TO_R3); 3016 VM_FF_CLEAR(pVM, VM_FF_TIMER); 3013 3017 3014 3018 uint64_t TickThisStart = ASMReadTSC();
Note:
See TracChangeset
for help on using the changeset viewer.