VirtualBox

Changeset 70447 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Jan 3, 2018 5:26:39 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120053
Message:

VMM/HMSVMR0: Handle SVM_EXIT_INVALID and unlikely VMRUN failure while executing the nested-guest.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r70415 r70447  
    47644764        hmR0SvmPostRunGuestNested(pVM, pVCpu, pCtx, &SvmTransient, rc);
    47654765
    4766         /** @todo This needs some work... we probably should cause a \#VMEXIT on
    4767          *        SVM_EXIT_INVALID and handle rc != VINF_SUCCESS differently. */
    4768         if (RT_UNLIKELY(   rc != VINF_SUCCESS                               /* Check for VMRUN errors. */
    4769                         || SvmTransient.u64ExitCode == SVM_EXIT_INVALID))   /* Check for invalid guest-state errors. */
    4770         {
    4771             if (rc == VINF_SUCCESS)
    4772                 rc = VERR_SVM_INVALID_GUEST_STATE;
    4773             STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExit1, x);
    4774             hmR0SvmReportWorldSwitchError(pVM, pVCpu, rc, pCtx);
     4766        if (RT_LIKELY(   rc == VINF_SUCCESS
     4767                      && SvmTransient.u64ExitCode != SVM_EXIT_INVALID))
     4768        { /* extremely likely */ }
     4769        else
     4770        {
     4771            /* VMRUN failed, shouldn't really happen, Guru. */
     4772            if (rc != VINF_SUCCESS)
     4773                break;
     4774
     4775            /* Invalid nested-guest state. Cause a #VMEXIT but assert on strict builds. */
     4776            AssertMsgFailed(("Invalid nested-guest state. rc=%Rrc u64ExitCode=%#RX64\n", rc, SvmTransient.u64ExitCode));
     4777            rc = VBOXSTRICTRC_TODO(IEMExecSvmVmexit(pVCpu, SVM_EXIT_INVALID, 0, 0));
    47754778            break;
    47764779        }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette