VirtualBox

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


Ignore:
Timestamp:
May 22, 2023 10:36:30 AM (21 months ago)
Author:
vboxsync
Message:

VMM/NEMR3Native-darwin-armv8: Workaround for WFI/WFE leading to a guest hang currently and set the interrupt pending state properly for IRQ and FIQ interrupts, bugref:10390

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin-armv8.cpp

    r99749 r99888  
    10231023            return nemR3DarwinHandleExitExceptionTrappedHvcInsn(pVM, pVCpu, uIss);
    10241024        case ARMV8_ESR_EL2_EC_TRAPPED_WFX:
    1025             return VINF_EM_HALT;
     1025            return VINF_SUCCESS; /** @todo VINF_EM_HALT; We don't get notified about the vTimer if halting here currently leading to a guest hang...*/
    10261026        case ARMV8_ESR_EL2_EC_UNKNOWN:
    10271027        default:
     
    11371137
    11381138    /* Set the pending interrupt state. */
    1139     if (VMCPU_FF_IS_ANY_SET(pVCpu, VMCPU_FF_INTERRUPT_IRQ | VMCPU_FF_INTERRUPT_FIQ))
    1140     {
    1141         hv_return_t hrc = HV_SUCCESS;
    1142 
    1143         if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INTERRUPT_IRQ))
    1144         {
    1145             hrc = hv_vcpu_set_pending_interrupt(pVCpu->nem.s.hVCpu, HV_INTERRUPT_TYPE_IRQ, true);
    1146             AssertReturn(hrc == HV_SUCCESS, VERR_NEM_IPE_9);
     1139    hv_return_t hrc = HV_SUCCESS;
     1140    if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INTERRUPT_IRQ))
     1141    {
     1142        hrc = hv_vcpu_set_pending_interrupt(pVCpu->nem.s.hVCpu, HV_INTERRUPT_TYPE_IRQ, true);
     1143        AssertReturn(hrc == HV_SUCCESS, VERR_NEM_IPE_9);
    11471144#ifdef LOG_ENABLED
    1148             fIrq = true;
     1145        fIrq = true;
    11491146#endif
    1150         }
    1151 
    1152         if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INTERRUPT_FIQ))
    1153         {
    1154             hrc = hv_vcpu_set_pending_interrupt(pVCpu->nem.s.hVCpu, HV_INTERRUPT_TYPE_FIQ, true);
    1155             AssertReturn(hrc == HV_SUCCESS, VERR_NEM_IPE_9);
     1147    }
     1148    else
     1149    {
     1150        hrc = hv_vcpu_set_pending_interrupt(pVCpu->nem.s.hVCpu, HV_INTERRUPT_TYPE_IRQ, false);
     1151        AssertReturn(hrc == HV_SUCCESS, VERR_NEM_IPE_9);
     1152    }
     1153
     1154    if (VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INTERRUPT_FIQ))
     1155    {
     1156        hrc = hv_vcpu_set_pending_interrupt(pVCpu->nem.s.hVCpu, HV_INTERRUPT_TYPE_FIQ, true);
     1157        AssertReturn(hrc == HV_SUCCESS, VERR_NEM_IPE_9);
    11561158#ifdef LOG_ENABLED
    1157             fFiq = true;
     1159        fFiq = true;
    11581160#endif
    1159         }
    11601161    }
    11611162    else
    11621163    {
    1163         hv_return_t hrc = hv_vcpu_set_pending_interrupt(pVCpu->nem.s.hVCpu, HV_INTERRUPT_TYPE_IRQ, false);
    1164         AssertReturn(hrc == HV_SUCCESS, VERR_NEM_IPE_9);
    1165 
    11661164        hrc = hv_vcpu_set_pending_interrupt(pVCpu->nem.s.hVCpu, HV_INTERRUPT_TYPE_FIQ, false);
    11671165        AssertReturn(hrc == HV_SUCCESS, VERR_NEM_IPE_9);
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