Changeset 61703 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 15, 2016 9:24:43 AM (9 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0A.asm
r61692 r61703 1207 1207 dec xCX 1208 1208 mov eax, [ss:xDX + VMCSCACHE.Read.aField + xCX * 4] 1209 ; Note! This leaves the high 32 bits of the cache entry unmodified!! 1209 1210 vmread [ss:xDX + VMCSCACHE.Read.aFieldVal + xCX * 8], xAX 1210 mov dword [ss:xDX + VMCSCACHE.Read.aFieldVal + xCX * 8 + 4], 01211 1211 cmp xCX, 0 1212 1212 jnz %%cached_read32 -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r61648 r61703 3315 3315 Log4(("Load[%RU32]: VMX_VMCS_CTRL_EXIT_HOST_ADDR_SPACE_SIZE\n", pVCpu->idCpu)); 3316 3316 #else 3317 if (CPUMIsGuestInLongModeEx(pMixedCtx)) 3317 Assert( pVCpu->hm.s.vmx.pfnStartVM == VMXR0SwitcherStartVM64 3318 || pVCpu->hm.s.vmx.pfnStartVM == VMXR0StartVM32); 3319 /* Set the host address-space size based on the switcher, not guest state. See @bugref{8432}. */ 3320 if (pVCpu->hm.s.vmx.pfnStartVM == VMXR0SwitcherStartVM64) 3318 3321 { 3319 3322 /* The switcher returns to long mode, EFER is managed by the switcher. */ … … 4846 4849 } 4847 4850 pVCpu->hm.s.vmx.pfnStartVM = VMXR0SwitcherStartVM64; 4851 4852 /* Mark that we've switched to 64-bit handler, we can't safely switch back to 32-bit for 4853 the rest of the VM run (until VM reset). See @bugref{8432#c7}. */ 4854 pVCpu->hm.s.vmx.fSwitchedTo64on32 = true; 4848 4855 } 4849 4856 #else … … 4856 4863 /* Guest is not in long mode, use the 32-bit handler. */ 4857 4864 #if HC_ARCH_BITS == 32 4858 if ( pVCpu->hm.s.vmx.pfnStartVM != VMXR0StartVM32 4859 && pVCpu->hm.s.vmx.pfnStartVM != NULL) /* Very first entry would have saved host-state already, ignore it. */ 4865 if ( pVCpu->hm.s.vmx.pfnStartVM != VMXR0StartVM32 4866 && !pVCpu->hm.s.vmx.fSwitchedTo64on32 /* If set, guest mode change does not imply switcher change. */ 4867 && pVCpu->hm.s.vmx.pfnStartVM != NULL) /* Very first entry would have saved host-state already, ignore it. */ 4860 4868 { 4861 4869 /* Currently, all mode changes sends us back to ring-3, so these should be set. See @bugref{6944}. */ … … 4864 4872 | HM_CHANGED_GUEST_EFER_MSR), ("flags=%#x\n", HMCPU_CF_VALUE(pVCpu))); 4865 4873 } 4874 # ifdef VBOX_ENABLE_64_BITS_GUESTS 4875 /* Keep using the 64-bit switcher even though we're in 32-bit because of bad Intel design. See @bugref{8432#c7}. */ 4876 if (!pVCpu->hm.s.vmx.fSwitchedTo64on32) 4877 pVCpu->hm.s.vmx.pfnStartVM = VMXR0StartVM32; 4878 else 4879 Assert(pVCpu->hm.s.vmx.pfnStartVM == VMXR0SwitcherStartVM64); 4880 # else 4881 pVCpu->hm.s.vmx.pfnStartVM = VMXR0StartVM32; 4882 # endif 4883 #else 4884 pVCpu->hm.s.vmx.pfnStartVM = VMXR0StartVM32; 4866 4885 #endif 4867 pVCpu->hm.s.vmx.pfnStartVM = VMXR0StartVM32;4868 4886 } 4869 4887 Assert(pVCpu->hm.s.vmx.pfnStartVM); -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r61648 r61703 1861 1861 HMCPU_CF_RESET_TO(pVCpu, HM_CHANGED_HOST_CONTEXT | HM_CHANGED_ALL_GUEST); 1862 1862 1863 pVCpu->hm.s.vmx.u32CR0Mask = 0; 1864 pVCpu->hm.s.vmx.u32CR4Mask = 0; 1865 pVCpu->hm.s.fActive = false; 1866 pVCpu->hm.s.Event.fPending = false; 1867 pVCpu->hm.s.vmx.fWasInRealMode = true; 1868 pVCpu->hm.s.vmx.u64MsrApicBase = 0; 1863 pVCpu->hm.s.vmx.u32CR0Mask = 0; 1864 pVCpu->hm.s.vmx.u32CR4Mask = 0; 1865 pVCpu->hm.s.fActive = false; 1866 pVCpu->hm.s.Event.fPending = false; 1867 pVCpu->hm.s.vmx.fWasInRealMode = true; 1868 pVCpu->hm.s.vmx.u64MsrApicBase = 0; 1869 pVCpu->hm.s.vmx.fSwitchedTo64on32 = false; 1870 1871 1869 1872 1870 1873 /* Reset the contents of the read cache. */ -
trunk/src/VBox/VMM/include/HMInternal.h
r61648 r61703 809 809 /** Set if guest was executing in real mode (extra checks). */ 810 810 bool fWasInRealMode; 811 uint8_t u8Alignment1[7]; 811 /** Set if guest switched to 64-bit mode on a 32-bit host. */ 812 bool fSwitchedTo64on32; 813 814 uint8_t u8Alignment1[6]; 812 815 } vmx; 813 816
Note:
See TracChangeset
for help on using the changeset viewer.