VirtualBox

Changeset 92520 in vbox


Ignore:
Timestamp:
Nov 20, 2021 2:19:53 AM (3 years ago)
Author:
vboxsync
Message:

VMM/NEM-linux,EM: The interrupt injection code in emR3ForcedActions is ASSUMING that no interrupt state is external when it's considering calling TRPMR3InjectEvent. So, make sure the NEM-linux code import this state when returning to the EM loop and make sure we don't try inject more than one interrupt at a time. bugref:9044

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

Legend:

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

    r92493 r92520  
    19021902         * Guest event injection.
    19031903         */
     1904        Assert(!(pVCpu->cpum.GstCtx.fExtrn & (CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI)));
    19041905        bool fWakeupPending = false;
    19051906        if (   !VM_FF_IS_SET(pVM, VM_FF_PGM_NO_MEMORY)
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-linux.cpp

    r92519 r92520  
    19051905static VBOXSTRICTRC nemHCLnxHandleInterruptFF(PVM pVM, PVMCPU pVCpu, struct kvm_run *pRun)
    19061906{
    1907     Assert(!TRPMHasTrap(pVCpu));
    19081907    RT_NOREF_PV(pVM);
     1908
     1909    /*
     1910     * Do not doing anything if TRPM has something pending already as we can
     1911     * only inject one event per KVM_RUN call.  This can only happend if we
     1912     * can directly from the loop in EM, so the inhibit bits must be internal.
     1913     */
     1914    if (!TRPMHasTrap(pVCpu))
     1915    { /* semi likely */ }
     1916    else
     1917    {
     1918        Assert(!(pVCpu->cpum.GstCtx.fExtrn & (CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI)));
     1919        Log8(("nemHCLnxHandleInterruptFF: TRPM has an pending event already\n"));
     1920        return VINF_SUCCESS;
     1921    }
    19091922
    19101923    /*
     
    25372550    {
    25382551        /* Try anticipate what we might need. */
    2539         uint64_t fImport = IEM_CPUMCTX_EXTRN_MUST_MASK;
     2552        uint64_t fImport = CPUMCTX_EXTRN_INHIBIT_INT | CPUMCTX_EXTRN_INHIBIT_NMI /* Required for processing APIC,PIC,NMI & SMI FFs. */
     2553                         | IEM_CPUMCTX_EXTRN_MUST_MASK /*?*/;
    25402554        if (   (rcStrict >= VINF_EM_FIRST && rcStrict <= VINF_EM_LAST)
    25412555            || RT_FAILURE(rcStrict))
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