VirtualBox

Changeset 60716 in vbox for trunk/src/VBox/VMM/VMMRC


Ignore:
Timestamp:
Apr 27, 2016 1:11:46 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106902
Message:

VMM: Fixed TPR thresholding and related PDM interfaces.
Cleaned up the PDM interface and merged apicHasPendingIrq with apicGetTpr.
Fixed raw-mode with the new APIC code due to busted GC mapping relocation.

This finally fixes the NT4 VM boot-up issue with the new APIC code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMRC/TRPMRCHandlers.cpp

    r58123 r60716  
    249249        else if (VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_TRPM_SYNC_IDT))
    250250            rc = VINF_EM_RAW_TO_R3;
    251         /* Pending interrupt: dispatch it. */
     251        /* Possibly pending interrupt: dispatch it. */
    252252        else if (    VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC)
    253253                 && !VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS)
     
    258258            rc = PDMGetInterrupt(pVCpu, &u8Interrupt);
    259259            Log(("trpmGCExitTrap: u8Interrupt=%d (%#x) rc=%Rrc\n", u8Interrupt, u8Interrupt, rc));
    260             AssertFatalMsgRC(rc, ("PDMGetInterrupt failed with %Rrc\n", rc));
    261             rc = TRPMForwardTrap(pVCpu, pRegFrame, (uint32_t)u8Interrupt, 0, TRPM_TRAP_NO_ERRORCODE, TRPM_HARDWARE_INT, uOldActiveVector);
    262             /* can't return if successful */
    263             Assert(rc != VINF_SUCCESS);
    264 
    265             /* Stop the profile counter that was started in TRPMGCHandlersA.asm */
    266             Assert(uOldActiveVector <= 16);
    267             STAM_PROFILE_ADV_STOP(&pVM->trpm.s.aStatGCTraps[uOldActiveVector], a);
    268 
    269             /* Assert the trap and go to the recompiler to dispatch it. */
    270             TRPMAssertTrap(pVCpu, u8Interrupt, TRPM_HARDWARE_INT);
    271 
    272             STAM_PROFILE_ADV_START(&pVM->trpm.s.aStatGCTraps[uOldActiveVector], a);
    273             rc = VINF_EM_RAW_INTERRUPT_PENDING;
     260            if (RT_SUCCESS(rc))
     261            {
     262                rc = TRPMForwardTrap(pVCpu, pRegFrame, (uint32_t)u8Interrupt, 0, TRPM_TRAP_NO_ERRORCODE, TRPM_HARDWARE_INT, uOldActiveVector);
     263                /* can't return if successful */
     264                Assert(rc != VINF_SUCCESS);
     265
     266                /* Stop the profile counter that was started in TRPMRCHandlersA.asm */
     267                Assert(uOldActiveVector <= 16);
     268                STAM_PROFILE_ADV_STOP(&pVM->trpm.s.aStatGCTraps[uOldActiveVector], a);
     269
     270                /* Assert the trap and go to the recompiler to dispatch it. */
     271                TRPMAssertTrap(pVCpu, u8Interrupt, TRPM_HARDWARE_INT);
     272
     273                STAM_PROFILE_ADV_START(&pVM->trpm.s.aStatGCTraps[uOldActiveVector], a);
     274                rc = VINF_EM_RAW_INTERRUPT_PENDING;
     275            }
     276            else if (   rc == VERR_APIC_INTR_MASKED_BY_TPR  /* Can happen if TPR is too high for the newly arrived interrupt. */
     277                     || rc == VERR_NO_DATA)                 /* Can happen if the APIC is disabled. */
     278            {
     279                STAM_PROFILE_ADV_STOP(&pVM->trpm.s.aStatGCTraps[uOldActiveVector], a);
     280                rc = VINF_SUCCESS;
     281            }
     282            else
     283                AssertFatalMsgRC(rc, ("PDMGetInterrupt failed. rc=%Rrc\n", rc));
    274284        }
    275285        /*
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