VirtualBox

Ignore:
Timestamp:
Nov 18, 2019 12:14:05 PM (5 years ago)
Author:
vboxsync
Message:

DevIoApic,PDM: Refactored the IOAPIC registration to be done directly for each context. Converted CFGM calls. Use default device prefix for statistics. bugref:9218

File:
1 edited

Legend:

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

    r81909 r81938  
    109109 */
    110110
    111 /** @interface_method_impl{PDMIOAPICHLPR3,pfnApicBusDeliver} */
     111/** @interface_method_impl{PDMIOAPICHLP,pfnApicBusDeliver} */
    112112static DECLCALLBACK(int) pdmR3IoApicHlp_ApicBusDeliver(PPDMDEVINS pDevIns, uint8_t u8Dest, uint8_t u8DestMode,
    113113                                                       uint8_t u8DeliveryMode, uint8_t uVector, uint8_t u8Polarity,
     
    122122
    123123
    124 /** @interface_method_impl{PDMIOAPICHLPR3,pfnLock} */
     124/** @interface_method_impl{PDMIOAPICHLP,pfnLock} */
    125125static DECLCALLBACK(int) pdmR3IoApicHlp_Lock(PPDMDEVINS pDevIns, int rc)
    126126{
     
    131131
    132132
    133 /** @interface_method_impl{PDMIOAPICHLPR3,pfnUnlock} */
     133/** @interface_method_impl{PDMIOAPICHLP,pfnUnlock} */
    134134static DECLCALLBACK(void) pdmR3IoApicHlp_Unlock(PPDMDEVINS pDevIns)
    135135{
     
    140140
    141141
    142 /** @interface_method_impl{PDMIOAPICHLPR3,pfnGetRCHelpers} */
    143 static DECLCALLBACK(PCPDMIOAPICHLPRC) pdmR3IoApicHlp_GetRCHelpers(PPDMDEVINS pDevIns)
    144 {
    145     PDMDEV_ASSERT_DEVINS(pDevIns);
    146     PVM pVM = pDevIns->Internal.s.pVMR3;
    147     VM_ASSERT_EMT(pVM);
    148 
    149     RTRCPTR pRCHelpers = NIL_RTRCPTR;
    150     if (VM_IS_RAW_MODE_ENABLED(pVM))
    151     {
    152         int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCIoApicHlp", &pRCHelpers);
    153         AssertReleaseRC(rc);
    154         AssertRelease(pRCHelpers);
    155     }
    156 
    157     LogFlow(("pdmR3IoApicHlp_GetRCHelpers: caller='%s'/%d: returns %RRv\n",
    158              pDevIns->pReg->szName, pDevIns->iInstance, pRCHelpers));
    159     return pRCHelpers;
    160 }
    161 
    162 
    163 /** @interface_method_impl{PDMIOAPICHLPR3,pfnGetR0Helpers} */
    164 static DECLCALLBACK(PCPDMIOAPICHLPR0) pdmR3IoApicHlp_GetR0Helpers(PPDMDEVINS pDevIns)
    165 {
    166     PDMDEV_ASSERT_DEVINS(pDevIns);
    167     PVM pVM = pDevIns->Internal.s.pVMR3;
    168     VM_ASSERT_EMT(pVM);
    169     PCPDMIOAPICHLPR0 pR0Helpers = 0;
    170     int rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0IoApicHlp", &pR0Helpers);
    171     AssertReleaseRC(rc);
    172     AssertRelease(pR0Helpers);
    173     LogFlow(("pdmR3IoApicHlp_GetR0Helpers: caller='%s'/%d: returns %RHv\n",
    174              pDevIns->pReg->szName, pDevIns->iInstance, pR0Helpers));
    175     return pR0Helpers;
    176 }
    177 
    178 
    179142/**
    180143 * I/O APIC Device Helpers.
    181144 */
    182 const PDMIOAPICHLPR3 g_pdmR3DevIoApicHlp =
    183 {
    184     PDM_IOAPICHLPR3_VERSION,
     145const PDMIOAPICHLP g_pdmR3DevIoApicHlp =
     146{
     147    PDM_IOAPICHLP_VERSION,
    185148    pdmR3IoApicHlp_ApicBusDeliver,
    186149    pdmR3IoApicHlp_Lock,
    187150    pdmR3IoApicHlp_Unlock,
    188     pdmR3IoApicHlp_GetRCHelpers,
    189     pdmR3IoApicHlp_GetR0Helpers,
    190     PDM_IOAPICHLPR3_VERSION /* the end */
     151    PDM_IOAPICHLP_VERSION /* the end */
    191152};
    192153
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