VirtualBox

Changeset 78948 in vbox


Ignore:
Timestamp:
Jun 4, 2019 5:20:39 AM (6 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Nested VMX: bugref:9180 APIC-write, Virtualized-EOI VM-exit handling.

File:
1 edited

Legend:

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

    r78932 r78948  
    447447static FNVMXEXITHANDLERNSRC        hmR0VmxExitTprBelowThresholdNested;
    448448static FNVMXEXITHANDLER            hmR0VmxExitApicAccessNested;
     449static FNVMXEXITHANDLER            hmR0VmxExitApicWriteNested;
     450static FNVMXEXITHANDLER            hmR0VmxExitVirtEoiNested;
    449451//static FNVMXEXITHANDLER            hmR0VmxExitEptViolation;
    450452//static FNVMXEXITHANDLER            hmR0VmxExitEptMisconfig;
     
    1269412696        case VMX_EXIT_MTF:                      return hmR0VmxExitMtfNested(pVCpu, pVmxTransient);
    1269512697        case VMX_EXIT_APIC_ACCESS:              return hmR0VmxExitApicAccessNested(pVCpu, pVmxTransient);
     12698        case VMX_EXIT_APIC_WRITE:               return hmR0VmxExitApicWriteNested(pVCpu, pVmxTransient);
     12699        case VMX_EXIT_VIRTUALIZED_EOI:          return hmR0VmxExitVirtEoiNested(pVCpu, pVmxTransient);
    1269612700        case VMX_EXIT_MOV_CRX:                  return hmR0VmxExitMovCRxNested(pVCpu, pVmxTransient);
    1269712701        case VMX_EXIT_INT_WINDOW:               return hmR0VmxExitIntWindowNested(pVCpu, pVmxTransient);
     12702        case VMX_EXIT_NMI_WINDOW:               return hmR0VmxExitNmiWindowNested(pVCpu, pVmxTransient);
    1269812703        case VMX_EXIT_TPR_BELOW_THRESHOLD:      return hmR0VmxExitTprBelowThresholdNested(pVCpu, pVmxTransient);
    1269912704        case VMX_EXIT_MWAIT:                    return hmR0VmxExitMwaitNested(pVCpu, pVmxTransient);
     
    1271012715        case VMX_EXIT_RDPMC:                    return hmR0VmxExitRdpmcNested(pVCpu, pVmxTransient);
    1271112716
    12712 
    1271312717        case VMX_EXIT_VMREAD:
    1271412718        case VMX_EXIT_VMWRITE:                  return hmR0VmxExitVmreadVmwriteNested(pVCpu, pVmxTransient);
    1271512719
    1271612720        case VMX_EXIT_TRIPLE_FAULT:             return hmR0VmxExitTripleFaultNested(pVCpu, pVmxTransient);
    12717         case VMX_EXIT_NMI_WINDOW:               return hmR0VmxExitNmiWindowNested(pVCpu, pVmxTransient);
    12718 
    12719         case VMX_EXIT_ERR_INVALID_GUEST_STATE:
    12720         {
    12721             /** @todo NSTVMX: Invalid guest state. */
    12722             return hmR0VmxExitErrUnexpected(pVCpu, pVmxTransient);
    12723         }
     12721        case VMX_EXIT_ERR_INVALID_GUEST_STATE:  return hmR0VmxExitErrInvalidGuestState(pVCpu, pVmxTransient);
    1272412722
    1272512723        case VMX_EXIT_INIT_SIGNAL:
     
    1273012728        case VMX_EXIT_ERR_MACHINE_CHECK:
    1273112729        case VMX_EXIT_PML_FULL:
    12732         case VMX_EXIT_VIRTUALIZED_EOI:
    12733         case VMX_EXIT_APIC_WRITE:
    1273412730        case VMX_EXIT_RSM:
    1273512731        default:
    1273612732        {
    12737             /** @todo NSTVMX: implement me! */
    1273812733            return hmR0VmxExitErrUnexpected(pVCpu, pVmxTransient);
    1273912734        }
     
    1640516400
    1640616401/**
     16402 * Nested-guest VM-exit handler for APIC write emulation (VMX_EXIT_APIC_WRITE).
     16403 * Conditional VM-exit.
     16404 */
     16405HMVMX_EXIT_DECL hmR0VmxExitApicWriteNested(PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient)
     16406{
     16407    HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient);
     16408
     16409    Assert(CPUMIsGuestVmxProcCtls2Set(pVCpu, &pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_APIC_REG_VIRT));
     16410    int rc = hmR0VmxReadExitQualVmcs(pVCpu, pVmxTransient);
     16411    AssertRCReturn(rc, rc);
     16412
     16413    return IEMExecVmxVmexit(pVCpu, pVmxTransient->uExitReason, pVmxTransient->uExitQual);
     16414}
     16415
     16416
     16417/**
     16418 * Nested-guest VM-exit handler for virtualized EOI (VMX_EXIT_VIRTUALIZED_EOI).
     16419 * Conditional VM-exit.
     16420 */
     16421HMVMX_EXIT_DECL hmR0VmxExitVirtEoiNested(PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient)
     16422{
     16423    HMVMX_VALIDATE_NESTED_EXIT_HANDLER_PARAMS(pVCpu, pVmxTransient);
     16424
     16425    Assert(CPUMIsGuestVmxProcCtls2Set(pVCpu, &pVCpu->cpum.GstCtx, VMX_PROC_CTLS2_VIRT_INT_DELIVERY));
     16426    int rc = hmR0VmxReadExitQualVmcs(pVCpu, pVmxTransient);
     16427    AssertRCReturn(rc, rc);
     16428
     16429    return IEMExecVmxVmexit(pVCpu, pVmxTransient->uExitReason, pVmxTransient->uExitQual);
     16430}
     16431
     16432
     16433/**
    1640716434 * Nested-guest VM-exit handler for RDTSCP (VMX_EXIT_RDTSCP). Conditional VM-exit.
    1640816435 */
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