VirtualBox

Changeset 60740 in vbox


Ignore:
Timestamp:
Apr 28, 2016 12:51:47 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106930
Message:

VMM, recompiler: Fix APIC to update pending interrupts to IRR when the force-flag is set, rather
than in PDMGetInterrupt() which gets called only with EFLAGS.IF set in certain places.

Location:
trunk/src
Files:
7 edited

Legend:

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

    r60720 r60740  
    23152315        && pXApicPage->svr.u.fApicSoftwareEnable)
    23162316    {
    2317         APICUpdatePendingInterrupts(pVCpu);
    23182317        int const irrv = apicGetLastSetBit(&pXApicPage->irr, -1);
    23192318        if (RT_LIKELY(irrv >= 0))
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r60732 r60740  
    3030#include <VBox/vmm/tm.h>
    3131#include <VBox/vmm/gim.h>
     32#ifdef VBOX_WITH_NEW_APIC
     33# include <VBox/vmm/apic.h>
     34#endif
    3235#include "HMInternal.h"
    3336#include <VBox/vmm/vm.h>
     
    26602663    else if (VMCPU_FF_IS_PENDING(pVCpu, (VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC)))
    26612664    {
     2665
     2666#ifdef VBOX_WITH_NEW_APIC
     2667        if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_APIC))
     2668            APICUpdatePendingInterrupts(pVCpu);
     2669#endif
    26622670        /*
    26632671         * Check if the guest can receive external interrupts (PIC/APIC). Once we do PDMGetInterrupt() we -must- deliver
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r60732 r60740  
    3434#ifdef VBOX_WITH_REM
    3535# include <VBox/vmm/rem.h>
     36#endif
     37#ifdef VBOX_WITH_NEW_APIC
     38# include <VBox/vmm/apic.h>
    3639#endif
    3740#include "HMInternal.h"
     
    74377440             && !pVCpu->hm.s.fSingleInstruction)
    74387441    {
     7442#ifdef VBOX_WITH_NEW_APIC
     7443        if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_APIC))
     7444            APICUpdatePendingInterrupts(pVCpu);
     7445#endif
    74397446        Assert(!DBGFIsStepping(pVCpu));
    74407447        int rc = hmR0VmxSaveGuestRflags(pVCpu, pMixedCtx);
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r60683 r60740  
    4949#ifdef VBOX_WITH_REM
    5050# include <VBox/vmm/rem.h>
     51#endif
     52#ifdef VBOX_WITH_NEW_APIC
     53# include <VBox/vmm/apic.h>
    5154#endif
    5255#include <VBox/vmm/tm.h>
     
    19341937            if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC))
    19351938            {
     1939#ifdef VBOX_WITH_NEW_APIC
     1940                if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_APIC))
     1941                    APICUpdatePendingInterrupts(pVCpu);
     1942#endif
    19361943                /* Note: it's important to make sure the return code from TRPMR3InjectEvent isn't ignored! */
    19371944                /** @todo this really isn't nice, should properly handle this */
  • trunk/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp

    r60716 r60740  
    2828#include <VBox/vmm/em.h>
    2929#include <VBox/vmm/gim.h>
     30#ifdef VBOX_WITH_NEW_APIC
     31# include <VBox/vmm/apic.h>
     32#endif
    3033#include <VBox/vmm/csam.h>
    3134#include <VBox/vmm/patm.h>
     
    255258           )
    256259        {
     260#ifdef VBOX_WITH_NEW_APIC
     261            /* The EFLAGS are checked in TRPMForwardTrap() below. */
     262            if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_APIC))
     263                APICUpdatePendingInterrupts(pVCpu);
     264#endif
    257265            uint8_t u8Interrupt;
    258266            rc = PDMGetInterrupt(pVCpu, &u8Interrupt);
  • trunk/src/recompiler/Makefile.kmk

    r56301 r60740  
    7070ifdef IEM_VERIFICATION_MODE
    7171 VBoxRemPrimary_DEFS          += IEM_VERIFICATION_MODE
     72endif
     73ifdef VBOX_WITH_NEW_APIC
     74 VBoxRemPrimary_DEFS          += VBOX_WITH_NEW_APIC
    7275endif
    7376ifdef VBOX_WITH_RAW_MODE
  • trunk/src/recompiler/VBoxRecompiler.c

    r58536 r60740  
    5050#include <VBox/vmm/dbgf.h>
    5151#include <VBox/dbg.h>
     52#ifdef VBOX_WITH_NEW_APIC
     53# include <VBox/vmm/apic.h>
     54#endif
    5255#include <VBox/vmm/hm.h>
    5356#include <VBox/vmm/patm.h>
     
    25172520    if (    pVM->rem.s.u32PendingInterrupt != REM_NO_PENDING_IRQ
    25182521        ||  VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC))
     2522    {
     2523#ifdef VBOX_WITH_NEW_APIC
     2524        if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_APIC))
     2525            APICUpdatePendingInterrupts(pVCpu);
     2526#endif
    25192527        pVM->rem.s.Env.interrupt_request |= CPU_INTERRUPT_HARD;
     2528    }
    25202529
    25212530    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette