VirtualBox

儲存庫 vbox 的更動 60387


忽略:
時間撮記:
2016-4-8 上午08:32:13 (9 年 以前)
作者:
vboxsync
訊息:

PDM: Call pfnInitComplete after both ring-0 and raw-mode is fully initialized. Used to call this immediately after the devices were initialized.

位置:
trunk
檔案:
修改 6 筆資料

圖例:

未更動
新增
刪除
  • trunk/include/VBox/vmm/pdmapi.h

    r60377 r60387  
    3232
    3333#include <VBox/vmm/pdmcommon.h>
     34#ifdef IN_RING3
     35# include <VBox/vmm/vmapi.h>
     36#endif
    3437#include <VBox/sup.h>
    3538
     
    6063
    6164
     65#if defined(IN_RING3) || defined(DOXYGEN_RUNNING)
    6266/** @defgroup grp_pdm_r3    The PDM Host Context Ring-3 API
    6367 * @{
    6468 */
    65 
    6669VMMR3_INT_DECL(int)     PDMR3InitUVM(PUVM pUVM);
    6770VMMR3_INT_DECL(int)     PDMR3LdrLoadVMMR0U(PUVM pUVM);
    6871VMMR3_INT_DECL(int)     PDMR3Init(PVM pVM);
     72VMMR3_INT_DECL(int)     PDMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat);
    6973VMMR3DECL(void)         PDMR3PowerOn(PVM pVM);
    7074VMMR3_INT_DECL(void)    PDMR3ResetCpu(PVMCPU pVCpu);
     
    161165VMMR3_INT_DECL(int)     PDMR3TracingQueryConfig(PVM pVM, char *pszConfig, size_t cbConfig);
    162166/** @} */
     167#endif /* IN_RING3 */
    163168
    164169
  • trunk/include/VBox/vmm/pdmdev.h

    r60309 r60387  
    227227
    228228/**
    229  * Init complete notification.
     229 * Init complete notification (after ring-0 & RC init since 5.1).
     230 *
    230231 * This can be done to do communication with other devices and other
    231232 * initialization which requires everything to be in place.
  • trunk/src/VBox/VMM/VMMR3/PDM.cpp

    r60364 r60387  
    441441    LogFlow(("PDMR3Init: returns %Rrc\n", rc));
    442442    return rc;
     443}
     444
     445
     446/**
     447 * Init phase completed callback.
     448 *
     449 * We use this for calling PDMDEVREG::pfnInitComplete callback after everything
     450 * else has been initialized.
     451 *
     452 * @returns VBox status code.
     453 * @param   pVM         The cross context VM structure.
     454 * @param   enmWhat     The phase that was completed.
     455 */
     456VMMR3_INT_DECL(int) PDMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat)
     457{
     458#ifdef VBOX_WITH_RAW_MODE
     459    if (enmWhat == VMINITCOMPLETED_RC)
     460#else
     461    if (enmWhat == VMINITCOMPLETED_RING0)
     462#endif
     463        return pdmR3DevInitComplete(pVM);
     464    return VINF_SUCCESS;
    443465}
    444466
  • trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp

    r60307 r60387  
    412412#endif
    413413
     414    LogFlow(("pdmR3DevInit: returns %Rrc\n", VINF_SUCCESS));
     415    return VINF_SUCCESS;
     416}
     417
     418
     419/**
     420 * Performs the init complete callback after ring-0 and raw-mode has been
     421 * initialized.
     422 *
     423 * @returns VBox status code.
     424 * @param   pVM     The cross context VM structure.
     425 */
     426int pdmR3DevInitComplete(PVM pVM)
     427{
     428    int rc;
    414429
    415430    /*
     
    447462
    448463#ifdef VBOX_WITH_USB
    449     /* ditto for USB Devices. */
    450464    rc = pdmR3UsbVMInitComplete(pVM);
    451465    if (RT_FAILURE(rc))
     466    {
     467        Log(("pdmR3DevInit: returns %Rrc\n", rc));
    452468        return rc;
     469    }
    453470#endif
    454471
  • trunk/src/VBox/VMM/VMMR3/VM.cpp

    r60377 r60387  
    11941194    }
    11951195#endif
     1196    if (RT_SUCCESS(rc))
     1197        rc = PDMR3InitCompleted(pVM, enmWhat);
    11961198    return rc;
    11971199}
  • trunk/src/VBox/VMM/include/PDMInternal.h

    r60309 r60387  
    12761276
    12771277int         pdmR3DevInit(PVM pVM);
     1278int         pdmR3DevInitComplete(PVM pVM);
    12781279PPDMDEV     pdmR3DevLookup(PVM pVM, const char *pszName);
    12791280int         pdmR3DevFindLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMLUN *ppLun);
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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