VirtualBox

Changeset 91327 in vbox


Ignore:
Timestamp:
Sep 22, 2021 3:15:08 PM (3 years ago)
Author:
vboxsync
Message:

Devices/Security/DrvTpmEmuTpms: Store the TPM state in the power off callback because the NVRAM store driver below is already destroyed when the destruction callback is called, bugref:10075

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Security/DrvTpmEmuTpms.cpp

    r91311 r91327  
    747747    PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns);
    748748
     749    PDRVTPMEMU pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMEMU);
     750
    749751    TPMLIB_Terminate();
     752
     753    int rc;
     754    if (pThis->pDrvVfs)
     755        rc = drvTpmEmuTpmsNvramStoreToVfs(pThis);
     756    else
     757        rc = drvTpmEmuTpmsNvramStore(pThis);
     758    AssertRC(rc);
    750759}
    751760
     
    758767    PDRVTPMEMU pThis = PDMINS_2_DATA(pDrvIns, PDRVTPMEMU);
    759768    LogFlow(("%s\n", __FUNCTION__));
    760 
    761     if (!pThis->fSsmCalled)
    762     {
    763         int rc;
    764         if (pThis->pDrvVfs)
    765             rc = drvTpmEmuTpmsNvramStoreToVfs(pThis);
    766         else
    767             rc = drvTpmEmuTpmsNvramStore(pThis);
    768         AssertRC(rc);
    769     }
    770769
    771770    if (pThis->pvNvPermall)
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