VirtualBox

Changeset 78808 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
May 28, 2019 9:47:11 AM (6 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Nested VMX: bugref:9180 Use HMVMX_UNEXPECTED_EXIT_RET consistently.

File:
1 edited

Legend:

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

    r78807 r78808  
    153153
    154154/** Helper macro for VM-exit handlers called unexpectedly. */
    155 #define HMVMX_UNEXPECTED_EXIT_RET(a_pVCpu, a_pVmxTransient) \
     155#define HMVMX_UNEXPECTED_EXIT_RET(a_pVCpu, a_HmError) \
    156156    do { \
    157         (a_pVCpu)->hm.s.u32HMError = (a_pVmxTransient)->uExitReason; \
     157        (a_pVCpu)->hm.s.u32HMError = (a_HmError); \
    158158        return VERR_VMX_UNEXPECTED_EXIT; \
    159159    } while (0)
     
    1321413214    {
    1321513215        AssertMsgFailed(("Unexpected NMI-window exit.\n"));
    13216         HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient);
     13216        HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient->uExitReason);
    1321713217    }
    1321813218
     
    1333513335        return VINF_EM_RAW_EMULATE_INSTR;
    1333613336
    13337     AssertMsgFailed(("hmR0VmxExitGetsec: unexpected VM-exit when CR4.SMXE is 0.\n"));
    13338     HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient);
     13337    AssertMsgFailed(("hmR0VmxExitGetsec: Unexpected VM-exit when CR4.SMXE is 0.\n"));
     13338    HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient->uExitReason);
    1333913339}
    1334013340
     
    1376113761    HMVMX_VALIDATE_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient);
    1376213762    AssertMsgFailed(("Unexpected VM-exit %u\n", pVmxTransient->uExitReason));
    13763     HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient);
     13763    HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient->uExitReason);
    1376413764}
    1376513765
     
    1378013780        return VERR_EM_INTERPRETER;
    1378113781    AssertMsgFailed(("Unexpected XDTR access\n"));
    13782     HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient);
     13782    HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient->uExitReason);
    1378313783}
    1378413784
     
    1379613796        return VERR_EM_INTERPRETER;
    1379713797    AssertMsgFailed(("Unexpected RDRAND exit\n"));
    13798     HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient);
     13798    HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient->uExitReason);
    1379913799}
    1380013800
     
    1383313833        {
    1383413834            AssertMsgFailed(("Unexpected RDMSR for an MSR in the auto-load/store area in the VMCS. ecx=%#RX32\n", idMsr));
    13835             HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient);
     13835            HMVMX_UNEXPECTED_EXIT_RET(pVCpu, idMsr);
    1383613836        }
    1383713837        if (hmR0VmxIsLazyGuestMsr(pVCpu, idMsr))
     
    1384213842            {
    1384313843                AssertMsgFailed(("Unexpected RDMSR for a passthru lazy-restore MSR. ecx=%#RX32\n", idMsr));
    13844                 HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient);
     13844                HMVMX_UNEXPECTED_EXIT_RET(pVCpu, idMsr);
    1384513845            }
    1384613846        }
     
    1396313963                {
    1396413964                    AssertMsgFailed(("Unexpected WRMSR for an MSR in the VMCS. ecx=%#RX32\n", idMsr));
    13965                     HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient);
     13965                    HMVMX_UNEXPECTED_EXIT_RET(pVCpu, idMsr);
    1396613966                }
    1396713967
     
    1397613976                            AssertMsgFailed(("Unexpected WRMSR for an MSR in the auto-load/store area in the VMCS. ecx=%#RX32\n",
    1397713977                                             idMsr));
    13978                             HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient);
     13978                            HMVMX_UNEXPECTED_EXIT_RET(pVCpu, idMsr);
    1397913979                        }
    1398013980                    }
     
    1398713987                        {
    1398813988                            AssertMsgFailed(("Unexpected WRMSR for passthru, lazy-restore MSR. ecx=%#RX32\n", idMsr));
    13989                             HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient);
     13989                            HMVMX_UNEXPECTED_EXIT_RET(pVCpu, idMsr);
    1399013990                        }
    1399113991                    }
     
    1418114181        default:
    1418214182        {
    14183             pVCpu->hm.s.u32HMError = uAccessType;
    14184             AssertMsgFailedReturn(("Invalid access-type in Mov CRx VM-exit qualification %#x\n", uAccessType),
    14185                                   VERR_VMX_UNEXPECTED_EXIT);
     14183            AssertMsgFailed(("Unrecognized Mov CRX access type %#x\n", uAccessType));
     14184            HMVMX_UNEXPECTED_EXIT_RET(pVCpu, uAccessType);
    1418614185        }
    1418714186    }
     
    1459514594    {
    1459614595        AssertMsgFailed(("Unexpected MOV DRx exit\n"));
    14597         HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient);
     14596        HMVMX_UNEXPECTED_EXIT_RET(pVCpu, pVmxTransient->uExitReason);
    1459814597    }
    1459914598
     
    1594515944            else
    1594615945            {
    15947                 pVCpu->hm.s.u32HMError = iCrReg;
    15948                 AssertMsgFailedReturn(("MOV from CR%d VM-exit must not happen\n", iCrReg), VERR_VMX_UNEXPECTED_EXIT);
     15946                AssertMsgFailed(("MOV from CR%d VM-exit must not happen\n", iCrReg));
     15947                HMVMX_UNEXPECTED_EXIT_RET(pVCpu, iCrReg);
    1594915948            }
    1595015949            break;
     
    1600316002        default:
    1600416003        {
    16005             pVCpu->hm.s.u32HMError = uAccessType;
    16006             AssertMsgFailedReturn(("Invalid access-type in Mov CRx VM-exit qualification %#x\n", uAccessType),
    16007                                   VERR_VMX_UNEXPECTED_EXIT);
     16004            AssertMsgFailed(("Unrecognized Mov CRX access type %#x\n", uAccessType));
     16005            HMVMX_UNEXPECTED_EXIT_RET(pVCpu, uAccessType);
    1600816006        }
    1600916007    }
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