VirtualBox

Changeset 51324 in vbox for trunk/src/VBox/Devices/Graphics


Ignore:
Timestamp:
May 21, 2014 1:29:34 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
93805
Message:

DevVGA: fix IRQ handling racing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp

    r51260 r51324  
    18921892}
    18931893
     1894static DECLCALLBACK(int) vbvaRaiseIrqEMT(PVGASTATE pVGAState, uint32_t fFlags)
     1895{
     1896    VBVARaiseIrq(pVGAState, fFlags);
     1897    return VINF_SUCCESS;
     1898}
     1899
    18941900void VBVARaiseIrqNoWait(PVGASTATE pVGAState, uint32_t fFlags)
    18951901{
    1896     PPDMDEVINS pDevIns = pVGAState->pDevInsR3;
    1897     PDMCritSectEnter(&pVGAState->CritSect, VERR_SEM_BUSY);
    1898 
    1899     HGSMISetHostGuestFlags(pVGAState->pHGSMI, HGSMIHOSTFLAGS_IRQ | fFlags);
    1900     PDMDevHlpPCISetIrqNoWait(pDevIns, 0, PDM_IRQ_LEVEL_HIGH);
    1901 
    1902     PDMCritSectLeave(&pVGAState->CritSect);
     1902    /* we can not use PDMDevHlpPCISetIrqNoWait here, because we need to set IRG host flag and raise IRQ atomically,
     1903     * otherwise there might be a situation, when:
     1904     * 1. Flag is set
     1905     * 2. guest issues an IRQ clean request, that cleans up the flag and the interrupt
     1906     * 3. IRQ is set */
     1907    VMR3ReqCallNoWait(PDMDevHlpGetVM(pVGAState->pDevInsR3), VMCPUID_ANY, (PFNRT)vbvaRaiseIrqEMT, 2, pVGAState, fFlags);
    19031908}
    19041909
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