VirtualBox

Changeset 44509 in vbox


Ignore:
Timestamp:
Feb 1, 2013 1:11:17 PM (12 years ago)
Author:
vboxsync
Message:

Document PIC and APIC callback method locking rules.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmdev.h

    r44508 r44509  
    820820     * @param   iLevel          IRQ level. See the PDM_IRQ_LEVEL_* \#defines.
    821821     * @param   uTagSrc         The IRQ tag and source (for tracing).
     822     * @remarks Caller enters the PDM critical section.
    822823     */
    823824    DECLR3CALLBACKMEMBER(void, pfnSetIrqR3,(PPDMDEVINS pDevIns, int iIrq, int iLevel, uint32_t uTagSrc));
     
    829830     * @param   pDevIns         Device instance of the PIC.
    830831     * @param   puTagSrc        Where to return the IRQ tag and source.
     832     * @remarks Caller enters the PDM critical section.
    831833     */
    832834    DECLR3CALLBACKMEMBER(int, pfnGetInterruptR3,(PPDMDEVINS pDevIns, uint32_t *puTagSrc));
     
    10411043     * @param   idCpu           The VCPU Id.
    10421044     * @param   puTagSrc        Where to return the tag source.
     1045     * @remarks Caller enters the PDM critical section
    10431046     */
    10441047    DECLR3CALLBACKMEMBER(int, pfnGetInterruptR3,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint32_t *puTagSrc));
     
    10501053     * @param   pDevIns         Device instance of the APIC.
    10511054     * @param   idCpu           The VCPU Id.
     1055     * @remarks Unlike the other callbacks, the PDM lock may not always be entered
     1056     *          prior to calling this method.
    10521057     */
    10531058    DECLR3CALLBACKMEMBER(bool, pfnHasPendingIrqR3,(PPDMDEVINS pDevIns, VMCPUID idCpu));
     
    10591064     * @param   idCpu           The VCPU Id.
    10601065     * @param   u64Base         The new base.
     1066     * @remarks Caller enters the PDM critical section.
    10611067     */
    10621068    DECLR3CALLBACKMEMBER(void, pfnSetBaseR3,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint64_t u64Base));
     
    10681074     * @param   pDevIns         Device instance of the APIC.
    10691075     * @param   idCpu           The VCPU Id.
     1076     * @remarks Caller enters the PDM critical section.
    10701077     */
    10711078    DECLR3CALLBACKMEMBER(uint64_t, pfnGetBaseR3,(PPDMDEVINS pDevIns, VMCPUID idCpu));
     
    10771084     * @param   idCpu           The VCPU id.
    10781085     * @param   u8TPR           The new TPR.
     1086     * @remarks Caller enters the PDM critical section.
    10791087     */
    10801088    DECLR3CALLBACKMEMBER(void, pfnSetTPRR3,(PPDMDEVINS pDevIns, VMCPUID idCpu, uint8_t u8TPR));
     
    10861094     * @param   pDevIns         Device instance of the APIC.
    10871095     * @param   idCpu           VCPU id
     1096     * @remarks Caller enters the PDM critical section.
    10881097     */
    10891098    DECLR3CALLBACKMEMBER(uint8_t, pfnGetTPRR3,(PPDMDEVINS pDevIns, VMCPUID idCpu));
     
    11351144     * @param   u8TriggerMode   See APIC implementation.
    11361145     * @param   uTagSrc         The IRQ tag and source (for tracing).
     1146     * @remarks Caller enters the PDM critical section
    11371147     */
    11381148    DECLR3CALLBACKMEMBER(int,  pfnBusDeliverR3,(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode, uint8_t u8DeliveryMode,
     
    11501160     * @param   u8Level         The level.
    11511161     * @param   uTagSrc         The IRQ tag and source (for tracing).
     1162     * @remarks Caller enters the PDM critical section
    11521163     */
    11531164    DECLR3CALLBACKMEMBER(int,  pfnLocalInterruptR3,(PPDMDEVINS pDevIns, uint8_t u8Pin, uint8_t u8Level));
  • trunk/src/VBox/Devices/PC/DevAPIC.cpp

    r44311 r44509  
    55
    66/*
    7  * Copyright (C) 2006-2011 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
  • trunk/src/VBox/Devices/PC/DevPIC.cpp

    r40907 r44509  
    929929{
    930930    PDEVPIC         pThis = PDMINS_2_DATA(pDevIns, PDEVPIC);
    931     PDMPICREG       PicReg;
    932931    int             rc;
    933932    bool            fGCEnabled;
     
    973972     * Register us as the PIC with PDM.
    974973     */
     974    PDMPICREG PicReg;
    975975    PicReg.u32Version           = PDM_PICREG_VERSION;
    976976    PicReg.pfnSetIrqR3          = picSetIrq;
  • trunk/src/VBox/VMM/VMMAll/PDMAll.cpp

    r44351 r44509  
    318318 *
    319319 * @remarks No-long-jump zone!!!
    320 */
     320 */
    321321VMMDECL(int) PDMApicGetTPR(PVMCPU pVCpu, uint8_t *pu8TPR, bool *pfPending)
    322322{
     
    324324    if (pVM->pdm.s.Apic.CTX_SUFF(pDevIns))
    325325    {
     326        /*
     327         * Note! We don't acquire the PDM lock here as we're just reading
     328         *       information. Doing so causes massive contention as this
     329         *       function is called very often by each and every VCPU.
     330         */
    326331        Assert(pVM->pdm.s.Apic.CTX_SUFF(pfnGetTPR));
    327         /* We don't acquire the PDM lock here as we're just reading information. Doing so causes massive
    328          * contention as this function is called very often by each and every VCPU.
    329          */
    330332        *pu8TPR = pVM->pdm.s.Apic.CTX_SUFF(pfnGetTPR)(pVM->pdm.s.Apic.CTX_SUFF(pDevIns), pVCpu->idCpu);
    331333        if (pfPending)
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