VirtualBox

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


Ignore:
Timestamp:
Sep 25, 2024 6:43:43 AM (4 months ago)
Author:
vboxsync
Message:

VMM/NEMR3Native-darwin-armv8.cpp: Need to skip past the wfi instruction for an ARMV8_ESR_EL2_EC_TRAPPED_WFX exit, fixes sluggish behavior in the UEFI firmware boot menu, some logging fixes, bugref:10390

File:
1 edited

Legend:

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

    r106061 r106145  
    13751375                          "Setting MPIDR_EL1 failed on vCPU %u: %#x (%Rrc)", idCpu, hrc, nemR3DarwinHvSts2Rc(hrc));
    13761376
     1377#if 0 /* Will triger an VM-exit if the guest hits a breakpoint, handy for debugging the MS bootloader. */
     1378    hrc != hv_vcpu_set_trap_debug_exceptions(pVCpu->nem.s.hVCpu, true);
     1379    if (hrc != HV_SUCCESS)
     1380        return VMSetError(pVM, VERR_NEM_VM_CREATE_FAILED, RT_SRC_POS,
     1381                          "Trapping debug exceptions on vCPU %u: %#x (%Rrc)", idCpu, hrc, nemR3DarwinHvSts2Rc(hrc));
     1382#endif
     1383
    13771384    return VINF_SUCCESS;
    13781385}
     
    16751682        u64Val = nemR3DarwinGetGReg(pVCpu, uReg);
    16761683        rcStrict = PGMPhysWrite(pVM, GCPhysDataAbrt, &u64Val, cbAcc, PGMACCESSORIGIN_HM);
    1677         Log4(("MmioExit/%u: %08RX64: WRITE %#x LB %u, %.*Rhxs -> rcStrict=%Rrc\n",
     1684        Log4(("MmioExit/%u: %08RX64: WRITE %#RGp LB %u, %.*Rhxs -> rcStrict=%Rrc\n",
    16781685              pVCpu->idCpu, pVCpu->cpum.GstCtx.Pc.u64, GCPhysDataAbrt, cbAcc, cbAcc,
    16791686              &u64Val, VBOXSTRICTRC_VAL(rcStrict) ));
     
    16821689    {
    16831690        rcStrict = PGMPhysRead(pVM, GCPhysDataAbrt, &u64Val, cbAcc, PGMACCESSORIGIN_HM);
    1684         Log4(("MmioExit/%u: %08RX64: READ %#x LB %u -> %.*Rhxs rcStrict=%Rrc\n",
     1691        Log4(("MmioExit/%u: %08RX64: READ %#RGp LB %u -> %.*Rhxs rcStrict=%Rrc\n",
    16851692              pVCpu->idCpu, pVCpu->cpum.GstCtx.Pc.u64, GCPhysDataAbrt, cbAcc, cbAcc,
    16861693              &u64Val, VBOXSTRICTRC_VAL(rcStrict) ));
     
    18981905            /* No need to halt if there is an interrupt pending already. */
    18991906            if (VMCPU_FF_IS_ANY_SET(pVCpu, (VMCPU_FF_INTERRUPT_IRQ | VMCPU_FF_INTERRUPT_FIQ)))
     1907            {
     1908                LogFlowFunc(("IRQ | FIQ set => VINF_SUCCESS\n"));
     1909                pVCpu->cpum.GstCtx.Pc.u64 += fInsn32Bit ? sizeof(uint32_t) : sizeof(uint16_t);
    19001910                return VINF_SUCCESS;
     1911            }
    19011912
    19021913            /* Set the vTimer expiration in order to get out of the halt at the right point in time. */
     
    19081919                /* Check whether it expired and start executing guest code. */
    19091920                if (cTicksVTimer >= pVCpu->cpum.GstCtx.CntvCValEl0)
     1921                {
     1922                    LogFlowFunc(("Guest timer expired (cTicksVTimer=%RU64 CntvCValEl0=%RU64) => VINF_SUCCESS\n",
     1923                                 cTicksVTimer, pVCpu->cpum.GstCtx.CntvCValEl0));
     1924                    pVCpu->cpum.GstCtx.Pc.u64 += fInsn32Bit ? sizeof(uint32_t) : sizeof(uint16_t);
    19101925                    return VINF_SUCCESS;
     1926                }
    19111927
    19121928                uint64_t cTicksVTimerToExpire = pVCpu->cpum.GstCtx.CntvCValEl0 - cTicksVTimer;
     
    19201936                 */
    19211937                if (cNanoSecsVTimerToExpire < 2 * RT_NS_1MS)
     1938                {
     1939                    LogFlowFunc(("Guest timer expiration < 2ms (cNanoSecsVTimerToExpire=%RU64) => VINF_SUCCESS\n",
     1940                                 cNanoSecsVTimerToExpire));
     1941                    pVCpu->cpum.GstCtx.Pc.u64 += fInsn32Bit ? sizeof(uint32_t) : sizeof(uint16_t);
    19221942                    return VINF_SUCCESS;
     1943                }
    19231944
    19241945                LogFlowFunc(("Set vTimer activation to cNanoSecsVTimerToExpire=%#RX64 (CntvCValEl0=%#RX64, u64VTimerOff=%#RX64 cTicksVTimer=%#RX64 u64CntFrqHz=%#RX64)\n",
     
    19291950                TMCpuSetVTimerNextActivation(pVCpu, UINT64_MAX);
    19301951
     1952            pVCpu->cpum.GstCtx.Pc.u64 += fInsn32Bit ? sizeof(uint32_t) : sizeof(uint16_t);
    19311953            return VINF_EM_HALT;
    19321954        }
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