VirtualBox

Changeset 92525 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Nov 21, 2021 12:08:49 AM (3 years ago)
Author:
vboxsync
Message:

VMM/NEM-linux: Exit history updates. bugref:9044

Location:
trunk/src/VBox/VMM/VMMR3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/NEMR3.cpp

    r92444 r92525  
    393393    switch ((NEMEXITTYPE)uExit)
    394394    {
     395        case NEMEXITTYPE_INTTERRUPT_WINDOW:             return "NEM interrupt window";
     396        case NEMEXITTYPE_HALT:                          return "NEM halt";
     397
    395398        case NEMEXITTYPE_UNRECOVERABLE_EXCEPTION:       return "NEM unrecoverable exception";
    396399        case NEMEXITTYPE_INVALID_VP_REGISTER_VALUE:     return "NEM invalid vp register value";
    397         case NEMEXITTYPE_INTTERRUPT_WINDOW:             return "NEM interrupt window";
    398         case NEMEXITTYPE_HALT:                          return "NEM halt";
    399400        case NEMEXITTYPE_XCPT_UD:                       return "NEM #UD";
    400401        case NEMEXITTYPE_XCPT_DB:                       return "NEM #DB";
     
    402403        case NEMEXITTYPE_CANCELED:                      return "NEM canceled";
    403404        case NEMEXITTYPE_MEMORY_ACCESS:                 return "NEM memory access";
     405
     406        case NEMEXITTYPE_INTERNAL_ERROR_EMULATION:      return "NEM emulation IPE";
     407        case NEMEXITTYPE_INTERNAL_ERROR_FATAL:          return "NEM fatal IPE";
     408        case NEMEXITTYPE_INTERRUPTED:                   return "NEM interrupted";
     409        case NEMEXITTYPE_FAILED_ENTRY:                  return "NEM failed VT-x/AMD-V entry";
     410
     411        case NEMEXITTYPE_INVALID:
     412        case NEMEXITTYPE_END:
     413            break;
    404414    }
    405415
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-linux.cpp

    r92522 r92525  
    621621 *
    622622 * The KVM_SET_CPUID2 call replaces any previous leaves, so we have to redo
    623  * everything when there really just are single bit changes.
     623 * everything when there really just are single bit changes.  That said, it
     624 * looks like KVM update the XCR/XSAVE related stuff as well as the APIC enabled
     625 * bit(s), so it should suffice if we do this at startup, I hope.
    624626 */
    625627static int nemR3LnxUpdateCpuIdsLeaves(PVM pVM, PVMCPU pVCpu)
     
    20662068         pRun->internal.suberror, pRun->internal.ndata, sizeof(pRun->internal.data), &pRun->internal.data[0]));
    20672069
    2068     EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, KVM_EXIT_INTERNAL_ERROR),
    2069                      pRun->s.regs.regs.rip + pRun->s.regs.sregs.cs.base, ASMReadTSC());
    2070 
    20712070    /*
    20722071     * Deal with each suberror, returning if we don't want IEM to handle it.
     
    20762075        case KVM_INTERNAL_ERROR_EMULATION:
    20772076        {
     2077            EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, NEMEXITTYPE_INTERNAL_ERROR_EMULATION),
     2078                             pRun->s.regs.regs.rip + pRun->s.regs.sregs.cs.base, ASMReadTSC());
    20782079            STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitInternalErrorEmulation);
    20792080            break;
     
    20852086        default:
    20862087        {
     2088            EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, NEMEXITTYPE_INTERNAL_ERROR_FATAL),
     2089                             pRun->s.regs.regs.rip + pRun->s.regs.sregs.cs.base, ASMReadTSC());
     2090            STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitInternalErrorFatal);
    20872091            const char *pszName;
    20882092            switch (pRun->internal.suberror)
     
    20942098                default:                                        pszName = "unknown"; break;
    20952099            }
    2096             STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitInternalErrorFatal);
    20972100            LogRel(("NEM: KVM_EXIT_INTERNAL_ERROR! suberror=%#x (%s) ndata=%u data=%.*Rhxs\n", pRun->internal.suberror, pszName,
    20982101                    pRun->internal.ndata, sizeof(pRun->internal.data), &pRun->internal.data[0]));
     
    22682271
    22692272        case KVM_EXIT_IRQ_WINDOW_OPEN:
    2270             EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, KVM_EXIT_IRQ_WINDOW_OPEN),
     2273            EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, NEMEXITTYPE_INTTERRUPT_WINDOW),
    22712274                             pRun->s.regs.regs.rip + pRun->s.regs.sregs.cs.base, ASMReadTSC());
    22722275            STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitIrqWindowOpen);
     
    22962299
    22972300        case KVM_EXIT_HLT:
    2298             EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, KVM_EXIT_HLT),
     2301            EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, NEMEXITTYPE_HALT),
    22992302                             pRun->s.regs.regs.rip + pRun->s.regs.sregs.cs.base, ASMReadTSC());
    23002303            STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitHalt);
     
    23032306
    23042307        case KVM_EXIT_INTR: /* EINTR */
    2305             EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, KVM_EXIT_INTR),
     2308            EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, NEMEXITTYPE_INTERRUPTED),
    23062309                             pRun->s.regs.regs.rip + pRun->s.regs.sregs.cs.base, ASMReadTSC());
    23072310            STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatExitIntr);
     
    23482351            LogRel(("NEM: KVM_EXIT_FAIL_ENTRY! hardware_entry_failure_reason=%#x cpu=%#x\n",
    23492352                    pRun->fail_entry.hardware_entry_failure_reason, pRun->fail_entry.cpu));
     2353            EMHistoryAddExit(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_NEM, NEMEXITTYPE_FAILED_ENTRY),
     2354                             pRun->s.regs.regs.rip + pRun->s.regs.sregs.cs.base, ASMReadTSC());
    23502355            return VERR_NEM_IPE_1;
    23512356
     
    25562561        int rcLnx = ioctl(pVCpu->nem.s.fdVCpu, KVM_RUN, 0UL);
    25572562        pRun->immediate_exit = 0;
    2558         Log(("NEM/%u: Flushed stateful exit -> %d/%d exit_reason=%d\n", pVCpu->idCpu, rcLnx, errno, pRun->exit_reason));
     2563        Log(("NEM/%u: Flushed stateful exit -> %d/%d exit_reason=%d\n", pVCpu->idCpu, rcLnx, errno, pRun->exit_reason)); RT_NOREF(rcLnx);
    25592564        STAM_REL_COUNTER_INC(&pVCpu->nem.s.StatFlushExitOnReturn);
    25602565    }
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