VirtualBox

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


Ignore:
Timestamp:
Sep 28, 2016 3:42:09 PM (8 years ago)
Author:
vboxsync
Message:

VMM/APIC: Pass rcBusy to acpiSetEoi() so we return the appropriate error code when calling from an MMIO or MSR
handler as the lines between this gets blurred when using Hyper-V APIC MSR accesses while in xAPIC mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/APICAll.cpp

    r63843 r64086  
    12311231 * @param   pVCpu                   The cross context virtual CPU structure.
    12321232 * @param   uEoi                    The EOI value.
     1233 * @param   rcBusy                  The busy return code when the write cannot
     1234 *                                  be completed successfully in this context.
    12331235 * @param   fForceX2ApicBehaviour   Pretend the APIC is in x2APIC mode during
    12341236 *                                  this write.
    12351237 */
    1236 static VBOXSTRICTRC apicSetEoi(PVMCPU pVCpu, uint32_t uEoi, bool fForceX2ApicBehaviour)
     1238static VBOXSTRICTRC apicSetEoi(PVMCPU pVCpu, uint32_t uEoi, int rcBusy, bool fForceX2ApicBehaviour)
    12371239{
    12381240    VMCPU_ASSERT_EMT(pVCpu);
     
    12661268            { /* likely */ }
    12671269            else
    1268                 return fX2ApicMode ? VINF_CPUM_R3_MSR_WRITE : VINF_IOM_R3_MMIO_WRITE;
     1270                return rcBusy;
    12691271
    12701272            /*
     
    17791781        case XAPIC_OFF_EOI:
    17801782        {
    1781             rcStrict = apicSetEoi(pVCpu, uValue, false /* fForceX2ApicBehaviour */);
     1783            rcStrict = apicSetEoi(pVCpu, uValue, VINF_IOM_R3_MMIO_WRITE, false /* fForceX2ApicBehaviour */);
    17821784            break;
    17831785        }
     
    20692071            case MSR_IA32_X2APIC_EOI:
    20702072            {
    2071                 rcStrict = apicSetEoi(pVCpu, u32Value, false /* fForceX2ApicBehaviour */);
     2073                rcStrict = apicSetEoi(pVCpu, u32Value, VINF_CPUM_R3_MSR_WRITE, false /* fForceX2ApicBehaviour */);
    20722074                break;
    20732075            }
     
    31073109    Assert(pVCpu);
    31083110    VMCPU_ASSERT_EMT_OR_NOT_RUNNING(pVCpu);
    3109     return apicSetEoi(pVCpu, uEoi, true /* fForceX2ApicBehaviour */);
    3110 }
    3111 
     3111    return apicSetEoi(pVCpu, uEoi, VINF_CPUM_R3_MSR_WRITE, true /* fForceX2ApicBehaviour */);
     3112}
     3113
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