Changeset 61013 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 17, 2016 8:36:27 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 107271
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r60874 r61013 3848 3848 * in the VMCS. 3849 3849 * 3850 * @returns VBox status code. 3850 * @returns VBox strict status code. 3851 * @retval VINF_EM_RESCHEDULE_REM if we try to emulate non-paged guest code 3852 * without unrestricted guest access and the VMMDev is not presently 3853 * mapped (e.g. EFI32). 3854 * 3851 3855 * @param pVCpu The cross context virtual CPU structure. 3852 3856 * @param pMixedCtx Pointer to the guest-CPU context. The data may be … … 3856 3860 * @remarks No-long-jump zone!!! 3857 3861 */ 3858 static inthmR0VmxLoadGuestCR3AndCR4(PVMCPU pVCpu, PCPUMCTX pMixedCtx)3862 static VBOXSTRICTRC hmR0VmxLoadGuestCR3AndCR4(PVMCPU pVCpu, PCPUMCTX pMixedCtx) 3859 3863 { 3860 3864 int rc = VINF_SUCCESS; … … 3925 3929 RTGCPHYS GCPhys; 3926 3930 Assert(pVM->hm.s.vmx.pNonPagingModeEPTPageTable); 3927 Assert(PDMVmmDevHeapIsEnabled(pVM));3928 3931 3929 3932 /* We obtain it here every time as the guest could have relocated this PCI region. */ 3930 3933 rc = PDMVmmDevHeapR3ToGCPhys(pVM, pVM->hm.s.vmx.pNonPagingModeEPTPageTable, &GCPhys); 3931 AssertRCReturn(rc, rc); 3934 if (RT_SUCCESS(rc)) 3935 { /* likely */ } 3936 else if (rc == VERR_PDM_DEV_HEAP_R3_TO_GCPHYS) 3937 { 3938 Log4(("Load[%RU32]: VERR_PDM_DEV_HEAP_R3_TO_GCPHYS -> VINF_EM_RESCHEDULE_REM\n", pVCpu->idCpu)); 3939 return VINF_EM_RESCHEDULE_REM; /* We cannot execute now, switch to REM/IEM till the guest maps in VMMDev. */ 3940 } 3941 else 3942 AssertMsgFailedReturn(("%Rrc\n", rc), rc); 3932 3943 3933 3944 GCPhysGuestCR3 = GCPhys; … … 8227 8238 * the guest CPU mode. 8228 8239 * 8229 * @returns VBox status code. 8240 * @returns VBox strict status code. 8241 * @retval VINF_EM_RESCHEDULE_REM if we try to emulate non-paged guest code 8242 * without unrestricted guest access and the VMMDev is not presently 8243 * mapped (e.g. EFI32). 8244 * 8230 8245 * @param pVM The cross context VM structure. 8231 8246 * @param pVCpu The cross context virtual CPU structure. … … 8234 8249 * before using them. 8235 8250 * 8236 * @remarks No-long-jump zone!!! 8237 */ 8238 static int hmR0VmxLoadGuestState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx) 8251 * @remarks No-long-jump zone!!! (Disables and enables long jmps for itself, 8252 * caller disables then again on successfull return. Confusing.) 8253 */ 8254 static VBOXSTRICTRC hmR0VmxLoadGuestState(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx) 8239 8255 { 8240 8256 AssertPtr(pVM); … … 8277 8293 AssertLogRelMsgRCReturn(rc, ("hmR0VmxLoadGuestActivityState! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); 8278 8294 8279 rc = hmR0VmxLoadGuestCR3AndCR4(pVCpu, pMixedCtx); 8280 AssertLogRelMsgRCReturn(rc, ("hmR0VmxLoadGuestCR3AndCR4: rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); 8295 VBOXSTRICTRC rcStrict = hmR0VmxLoadGuestCR3AndCR4(pVCpu, pMixedCtx); 8296 if (rcStrict == VINF_SUCCESS) 8297 { /* likely */ } 8298 else 8299 { 8300 VMMRZCallRing3Enable(pVCpu); 8301 Assert(rcStrict == VINF_EM_RESCHEDULE_REM || RT_FAILURE_NP(rcStrict)); 8302 return rcStrict; 8303 } 8281 8304 8282 8305 /* Assumes pMixedCtx->cr0 is up-to-date (strict builds require CR0 for segment register validation checks). */ … … 8375 8398 * 8376 8399 * @returns Strict VBox status code (i.e. informational status codes too). 8400 * @retval VINF_EM_RESCHEDULE_REM if we try to emulate non-paged guest code 8401 * without unrestricted guest access and the VMMDev is not presently 8402 * mapped (e.g. EFI32). 8403 * 8377 8404 * @param pVM The cross context VM structure. 8378 8405 * @param pVCpu The cross context virtual CPU structure. … … 8410 8437 else 8411 8438 { 8412 AssertLogRelMsgFailedReturn(("hmR0VmxLoadGuestStateOptimal: hmR0VmxLoadGuestState failed! rc=%Rrc\n", 8413 VBOXSTRICTRC_VAL(rcStrict)), rcStrict); 8439 AssertLogRelMsg(rcStrict == VINF_EM_RESCHEDULE_REM, 8440 ("hmR0VmxLoadGuestStateOptimal: hmR0VmxLoadGuestState failed! rc=%Rrc\n", VBOXSTRICTRC_VAL(rcStrict))); 8441 return rcStrict; 8414 8442 } 8415 8443 STAM_COUNTER_INC(&pVCpu->hm.s.StatLoadFull);
Note:
See TracChangeset
for help on using the changeset viewer.