VirtualBox

Changeset 53611 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 30, 2014 8:23:08 PM (10 years ago)
Author:
vboxsync
Message:

HMVMXR0.cpp: Use assertions better.

File:
1 edited

Legend:

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

    r53325 r53611  
    11481148    }
    11491149    else
    1150     {
    1151         AssertMsgFailed(("hmR0VmxSetMsrPermission: Invalid MSR %#RX32\n", uMsr));
    1152         return;
    1153     }
     1150        AssertMsgFailedReturnVoid(("hmR0VmxSetMsrPermission: Invalid MSR %#RX32\n", uMsr));
    11541151
    11551152    Assert(iBit <= 0x1fff);
     
    11971194    }
    11981195    else
    1199     {
    1200         AssertMsgFailed(("hmR0VmxGetMsrPermission: Invalid MSR %#RX32\n", uMsr));
    1201         return VERR_NOT_SUPPORTED;
    1202     }
     1196        AssertMsgFailedReturn(("hmR0VmxGetMsrPermission: Invalid MSR %#RX32\n", uMsr), VERR_NOT_SUPPORTED);
    12031197
    12041198    Assert(iBit <= 0x1fff);
     
    30673061     * is effectively what the CPU does for "scaling by 8". TI is always 0 and RPL should be too in most cases.
    30683062     */
    3069     if ((uSelTR | X86_SEL_RPL_LDT) > Gdtr.cbGdt)
    3070     {
    3071         AssertMsgFailed(("hmR0VmxSaveHostSegmentRegs: TR selector exceeds limit. TR=%RTsel cbGdt=%#x\n", uSelTR, Gdtr.cbGdt));
    3072         return VERR_VMX_INVALID_HOST_STATE;
    3073     }
     3063    AssertMsgReturn((uSelTR | X86_SEL_RPL_LDT) <= Gdtr.cbGdt,
     3064                    ("hmR0VmxSaveHostSegmentRegs: TR selector exceeds limit. TR=%RTsel cbGdt=%#x\n", uSelTR, Gdtr.cbGdt),
     3065                    VERR_VMX_INVALID_HOST_STATE);
    30743066
    30753067    PCX86DESCHC pDesc = (PCX86DESCHC)(Gdtr.pGdt + (uSelTR & X86_SEL_MASK));
     
    1129811290        case VMX_APIC_ACCESS_TYPE_LINEAR_READ:
    1129911291        {
    11300             if (  (pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_USE_TPR_SHADOW)
    11301                 && VMX_EXIT_QUALIFICATION_APIC_ACCESS_OFFSET(pVmxTransient->uExitQualification) == 0x80)
    11302             {
    11303                 AssertMsgFailed(("hmR0VmxExitApicAccess: can't access TPR offset while using TPR shadowing.\n"));
    11304             }
     11292            AssertMsg(   !(pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_USE_TPR_SHADOW)
     11293                      || VMX_EXIT_QUALIFICATION_APIC_ACCESS_OFFSET(pVmxTransient->uExitQualification) != 0x80,
     11294                      ("hmR0VmxExitApicAccess: can't access TPR offset while using TPR shadowing.\n"));
    1130511295
    1130611296            RTGCPHYS GCPhys = pMixedCtx->msrApicBase;   /* Always up-to-date, msrApicBase is not part of the VMCS. */
     
    1131211302
    1131311303            VBOXSTRICTRC rc2 = IOMMMIOPhysHandler(pVM, pVCpu,
    11314                                                   (uAccessType == VMX_APIC_ACCESS_TYPE_LINEAR_READ) ? 0 : X86_TRAP_PF_RW,
     11304                                                  uAccessType == VMX_APIC_ACCESS_TYPE_LINEAR_READ ? 0 : X86_TRAP_PF_RW,
    1131511305                                                  CPUMCTX2CORE(pMixedCtx), GCPhys);
    1131611306            rc = VBOXSTRICTRC_VAL(rc2);
Note: See TracChangeset for help on using the changeset viewer.

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