VirtualBox

Ignore:
Timestamp:
Aug 30, 2021 2:04:48 PM (3 years ago)
Author:
vboxsync
Message:

VMM,PDM,PGM: Restrict the VMSetError and VMSetRuntimeError APIs to ring-3, these never worked properly in ring-0 or raw-mode. A PAEmode runtime error was the only place any of these were used, but given that the VMSetRuntimeError codepath starts with an assertion, it can't have been used/tested. The PAEmode runtime error shouldn't necessarily be triggered by PGM anyway, but IEM. Removed VMMCALLRING3_VM_SET_ERROR and VMMCALLRING3_VM_SET_RUNTIME_ERROR. bugref:10093

File:
1 edited

Legend:

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

    r90784 r90997  
    11971197
    11981198
    1199 /** @interface_method_impl{PDMDRVHLPR3,pfnVMSetError} */
    1200 static DECLCALLBACK(int) pdmR3DrvHlp_VMSetError(PPDMDRVINS pDrvIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...)
    1201 {
    1202     PDMDRV_ASSERT_DRVINS(pDrvIns);
    1203     va_list args;
    1204     va_start(args, pszFormat);
    1205     int rc2 = VMSetErrorV(pDrvIns->Internal.s.pVMR3, rc, RT_SRC_POS_ARGS, pszFormat, args); Assert(rc2 == rc); NOREF(rc2);
    1206     va_end(args);
    1207     return rc;
    1208 }
    1209 
    1210 
    12111199/** @interface_method_impl{PDMDRVHLPR3,pfnVMSetErrorV} */
    12121200static DECLCALLBACK(int) pdmR3DrvHlp_VMSetErrorV(PPDMDRVINS pDrvIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
     
    12141202    PDMDRV_ASSERT_DRVINS(pDrvIns);
    12151203    int rc2 = VMSetErrorV(pDrvIns->Internal.s.pVMR3, rc, RT_SRC_POS_ARGS, pszFormat, va); Assert(rc2 == rc); NOREF(rc2);
    1216     return rc;
    1217 }
    1218 
    1219 
    1220 /** @interface_method_impl{PDMDRVHLPR3,pfnVMSetRuntimeError} */
    1221 static DECLCALLBACK(int) pdmR3DrvHlp_VMSetRuntimeError(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...)
    1222 {
    1223     PDMDRV_ASSERT_DRVINS(pDrvIns);
    1224     va_list args;
    1225     va_start(args, pszFormat);
    1226     int rc = VMSetRuntimeErrorV(pDrvIns->Internal.s.pVMR3, fFlags, pszErrorId, pszFormat, args);
    1227     va_end(args);
    12281204    return rc;
    12291205}
     
    20372013    pdmR3DrvHlp_AssertEMT,
    20382014    pdmR3DrvHlp_AssertOther,
    2039     pdmR3DrvHlp_VMSetError,
    20402015    pdmR3DrvHlp_VMSetErrorV,
    2041     pdmR3DrvHlp_VMSetRuntimeError,
    20422016    pdmR3DrvHlp_VMSetRuntimeErrorV,
    20432017    pdmR3DrvHlp_VMState,
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