Changeset 71755 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Apr 9, 2018 8:10:23 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 121857
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r71697 r71755 1001 1001 /* 1002 1002 * Setup the PAT MSR (applicable for Nested Paging only). 1003 * The default value should be 0x0007040600070406ULL, but we want to treat all guest memory as WB, 1004 * so choose type 6 for all PAT slots. 1003 * 1004 * While guests can modify and see the modified values throug the shadow values, 1005 * we shall not honor any guest modifications of this MSR to ensure caching is always 1006 * enabled similar to how we always run with CR0.CD and NW bits cleared. 1005 1007 */ 1006 pVmcb->guest.u64 GPAT = UINT64_C(0x0006060606060606);1008 pVmcb->guest.u64PAT = MSR_IA32_CR_PAT_INIT_VAL; 1007 1009 1008 1010 /* Setup Nested Paging. This doesn't change throughout the execution time of the VM. */ … … 1754 1756 pVmcb->guest.u64SFMASK = pCtx->msrSFMASK; 1755 1757 pVmcb->guest.u64KernelGSBase = pCtx->msrKERNELGSBASE; 1758 1759 /* We don't honor guest modifications to its PAT MSR (similar to ignoring CR0.CD, NW bits). */ 1756 1760 } 1757 1761 … … 2417 2421 pVmcbNstGstCache->u64CR4 = pVmcbNstGstState->u64CR4; 2418 2422 pVmcbNstGstCache->u64EFER = pVmcbNstGstState->u64EFER; 2423 pVmcbNstGstCache->u64PAT = pVmcbNstGstState->u64PAT; 2419 2424 pVmcbNstGstCache->u64DBGCTL = pVmcbNstGstState->u64DBGCTL; 2420 2425 pVmcbNstGstCache->u64IOPMPhysAddr = pVmcbNstGstCtrl->u64IOPMPhysAddr; … … 2470 2475 pVmcbNstGstCtrl->LbrVirt.n.u1LbrVirt = pVmcb->ctrl.LbrVirt.n.u1LbrVirt; 2471 2476 pVmcbNstGst->guest.u64DBGCTL = pVmcb->guest.u64DBGCTL; 2477 2478 /* Override nested-guest PAT MSR, see @bugref{7243#c109}. */ 2479 pVmcbNstGst->guest.u64PAT = MSR_IA32_CR_PAT_INIT_VAL; 2472 2480 } 2473 2481 else … … 3919 3927 Log4(("guest.u64SFMASK %#RX64\n", pVmcb->guest.u64SFMASK)); 3920 3928 Log4(("guest.u64KernelGSBase %#RX64\n", pVmcb->guest.u64KernelGSBase)); 3921 Log4(("guest.u64 GPAT %#RX64\n", pVmcb->guest.u64GPAT));3929 Log4(("guest.u64PAT %#RX64\n", pVmcb->guest.u64PAT)); 3922 3930 Log4(("guest.u64DBGCTL %#RX64\n", pVmcb->guest.u64DBGCTL)); 3923 3931 Log4(("guest.u64BR_FROM %#RX64\n", pVmcb->guest.u64BR_FROM));
Note:
See TracChangeset
for help on using the changeset viewer.