VirtualBox

Changeset 90997 in vbox


Ignore:
Timestamp:
Aug 30, 2021 2:04:48 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146637
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

Location:
trunk
Files:
14 edited

Legend:

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

    r90502 r90997  
    24232423
    24242424/** Current PDMDEVHLPR3 version number. */
    2425 #define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 48, 1)
     2425#define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 49, 1)
    24262426
    24272427/**
     
    31813181     * @param   SRC_POS             Use RT_SRC_POS.
    31823182     * @param   pszFormat           Error message format string.
    3183      * @param   ...                 Error message arguments.
    3184      */
    3185     DECLR3CALLBACKMEMBER(int, pfnVMSetError,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL,
    3186                                              const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7));
    3187 
    3188     /**
    3189      * Set the VM error message
    3190      *
    3191      * @returns rc.
    3192      * @param   pDevIns             The device instance.
    3193      * @param   rc                  VBox status code.
    3194      * @param   SRC_POS             Use RT_SRC_POS.
    3195      * @param   pszFormat           Error message format string.
    31963183     * @param   va                  Error message arguments.
    31973184     */
    31983185    DECLR3CALLBACKMEMBER(int, pfnVMSetErrorV,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL,
    31993186                                              const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(6, 0));
    3200 
    3201     /**
    3202      * Set the VM runtime error message
    3203      *
    3204      * @returns VBox status code.
    3205      * @param   pDevIns             The device instance.
    3206      * @param   fFlags              The action flags. See VMSETRTERR_FLAGS_*.
    3207      * @param   pszErrorId          Error ID string.
    3208      * @param   pszFormat           Error message format string.
    3209      * @param   ...                 Error message arguments.
    3210      */
    3211     DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId,
    3212                                                     const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(4, 5));
    32133187
    32143188    /**
     
    48024776
    48034777    /**
    4804      * Set the VM error message
    4805      *
    4806      * @returns rc.
    4807      * @param   pDevIns         Driver instance.
    4808      * @param   rc              VBox status code.
    4809      * @param   SRC_POS         Use RT_SRC_POS.
    4810      * @param   pszFormat       Error message format string.
    4811      * @param   ...             Error message arguments.
    4812      */
    4813     DECLRCCALLBACKMEMBER(int, pfnVMSetError,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL,
    4814                                              const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7));
    4815 
    4816     /**
    4817      * Set the VM error message
    4818      *
    4819      * @returns rc.
    4820      * @param   pDevIns         Driver instance.
    4821      * @param   rc              VBox status code.
    4822      * @param   SRC_POS         Use RT_SRC_POS.
    4823      * @param   pszFormat       Error message format string.
    4824      * @param   va              Error message arguments.
    4825      */
    4826     DECLRCCALLBACKMEMBER(int, pfnVMSetErrorV,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL,
    4827                                               const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(6, 0));
    4828 
    4829     /**
    4830      * Set the VM runtime error message
    4831      *
    4832      * @returns VBox status code.
    4833      * @param   pDevIns         Device instance.
    4834      * @param   fFlags          The action flags. See VMSETRTERR_FLAGS_*.
    4835      * @param   pszErrorId      Error ID string.
    4836      * @param   pszFormat       Error message format string.
    4837      * @param   ...             Error message arguments.
    4838      */
    4839     DECLRCCALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId,
    4840                                                     const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(4, 5));
    4841 
    4842     /**
    4843      * Set the VM runtime error message
    4844      *
    4845      * @returns VBox status code.
    4846      * @param   pDevIns         Device instance.
    4847      * @param   fFlags          The action flags. See VMSETRTERR_FLAGS_*.
    4848      * @param   pszErrorId      Error ID string.
    4849      * @param   pszFormat       Error message format string.
    4850      * @param   va              Error message arguments.
    4851      */
    4852     DECLRCCALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId,
    4853                                                      const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(4, 0));
    4854 
    4855     /**
    48564778     * Gets the VM handle. Restricted API.
    48574779     *
     
    50744996
    50754997/** Current PDMDEVHLP version number. */
    5076 #define PDM_DEVHLPRC_VERSION                    PDM_VERSION_MAKE(0xffe6, 17, 0)
     4998#define PDM_DEVHLPRC_VERSION                    PDM_VERSION_MAKE(0xffe6, 18, 0)
    50774999
    50785000
     
    52625184     */
    52635185    DECLR0CALLBACKMEMBER(VMSTATE, pfnVMState, (PPDMDEVINS pDevIns));
    5264 
    5265     /**
    5266      * Set the VM error message
    5267      *
    5268      * @returns rc.
    5269      * @param   pDevIns         Driver instance.
    5270      * @param   rc              VBox status code.
    5271      * @param   SRC_POS         Use RT_SRC_POS.
    5272      * @param   pszFormat       Error message format string.
    5273      * @param   ...             Error message arguments.
    5274      */
    5275     DECLR0CALLBACKMEMBER(int, pfnVMSetError,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL,
    5276                                              const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7));
    5277 
    5278     /**
    5279      * Set the VM error message
    5280      *
    5281      * @returns rc.
    5282      * @param   pDevIns         Driver instance.
    5283      * @param   rc              VBox status code.
    5284      * @param   SRC_POS         Use RT_SRC_POS.
    5285      * @param   pszFormat       Error message format string.
    5286      * @param   va              Error message arguments.
    5287      */
    5288     DECLR0CALLBACKMEMBER(int, pfnVMSetErrorV,(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL,
    5289                                               const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(6, 0));
    5290 
    5291     /**
    5292      * Set the VM runtime error message
    5293      *
    5294      * @returns VBox status code.
    5295      * @param   pDevIns         Device instance.
    5296      * @param   fFlags          The action flags. See VMSETRTERR_FLAGS_*.
    5297      * @param   pszErrorId      Error ID string.
    5298      * @param   pszFormat       Error message format string.
    5299      * @param   ...             Error message arguments.
    5300      */
    5301     DECLR0CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId,
    5302                                                     const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(4, 5));
    5303 
    5304     /**
    5305      * Set the VM runtime error message
    5306      *
    5307      * @returns VBox status code.
    5308      * @param   pDevIns         Device instance.
    5309      * @param   fFlags          The action flags. See VMSETRTERR_FLAGS_*.
    5310      * @param   pszErrorId      Error ID string.
    5311      * @param   pszFormat       Error message format string.
    5312      * @param   va              Error message arguments.
    5313      */
    5314     DECLR0CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId,
    5315                                                      const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(4, 0));
    53165186
    53175187    /**
     
    56165486
    56175487/** Current PDMDEVHLP version number. */
    5618 #define PDM_DEVHLPR0_VERSION                    PDM_VERSION_MAKE(0xffe5, 20, 0)
     5488#define PDM_DEVHLPR0_VERSION                    PDM_VERSION_MAKE(0xffe5, 21, 0)
    56195489
    56205490
     
    68706740
    68716741#ifdef IN_RING3
     6742
    68726743/**
    68736744 * @copydoc PDMDEVHLPR3::pfnVMTeleportedAndNotFullyResumedYet
     
    68776748    return pDevIns->pHlpR3->pfnVMTeleportedAndNotFullyResumedYet(pDevIns);
    68786749}
    6879 #endif /* IN_RING3 */
    68806750
    68816751/**
     
    69056775    return rc;
    69066776}
     6777
     6778#endif /* IN_RING3 */
    69076779
    69086780/**
  • trunk/include/VBox/vmm/pdmdrv.h

    r90383 r90997  
    572572
    573573    /**
    574      * Set the VM error message
    575      *
    576      * @returns rc.
    577      * @param   pDrvIns         Driver instance.
    578      * @param   rc              VBox status code.
    579      * @param   SRC_POS         Use RT_SRC_POS.
    580      * @param   pszFormat       Error message format string.
    581      * @param   ...             Error message arguments.
    582      */
    583     DECLRCCALLBACKMEMBER(int, pfnVMSetError,(PPDMDRVINS pDrvIns, int rc, RT_SRC_POS_DECL,
    584                                              const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7));
    585 
    586     /**
    587      * Set the VM error message
    588      *
    589      * @returns rc.
    590      * @param   pDrvIns         Driver instance.
    591      * @param   rc              VBox status code.
    592      * @param   SRC_POS         Use RT_SRC_POS.
    593      * @param   pszFormat       Error message format string.
    594      * @param   va              Error message arguments.
    595      */
    596     DECLRCCALLBACKMEMBER(int, pfnVMSetErrorV,(PPDMDRVINS pDrvIns, int rc, RT_SRC_POS_DECL,
    597                                               const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(6, 0));
    598 
    599     /**
    600      * Set the VM runtime error message
    601      *
    602      * @returns VBox status code.
    603      * @param   pDrvIns         Driver instance.
    604      * @param   fFlags          The action flags. See VMSETRTERR_FLAGS_*.
    605      * @param   pszErrorId      Error ID string.
    606      * @param   pszFormat       Error message format string.
    607      * @param   ...             Error message arguments.
    608      */
    609     DECLRCCALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId,
    610                                                     const char *pszFormat, ...)  RT_IPRT_FORMAT_ATTR(4, 5));
    611 
    612     /**
    613      * Set the VM runtime error message
    614      *
    615      * @returns VBox status code.
    616      * @param   pDrvIns         Driver instance.
    617      * @param   fFlags          The action flags. See VMSETRTERR_FLAGS_*.
    618      * @param   pszErrorId      Error ID string.
    619      * @param   pszFormat       Error message format string.
    620      * @param   va              Error message arguments.
    621      */
    622     DECLRCCALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId,
    623                                                      const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(4, 0));
    624 
    625     /**
    626574     * Assert that the current thread is the emulation thread.
    627575     *
     
    674622} PDMDRVHLPRC;
    675623/** Current PDMDRVHLPRC version number. */
    676 #define PDM_DRVHLPRC_VERSION                    PDM_VERSION_MAKE(0xf0f9, 5, 0)
     624#define PDM_DRVHLPRC_VERSION                    PDM_VERSION_MAKE(0xf0f9, 6, 0)
    677625
    678626
     
    684632    /** Structure version. PDM_DRVHLPR0_VERSION defines the current version. */
    685633    uint32_t                    u32Version;
    686 
    687     /**
    688      * Set the VM error message
    689      *
    690      * @returns rc.
    691      * @param   pDrvIns         Driver instance.
    692      * @param   rc              VBox status code.
    693      * @param   SRC_POS         Use RT_SRC_POS.
    694      * @param   pszFormat       Error message format string.
    695      * @param   ...             Error message arguments.
    696      */
    697     DECLR0CALLBACKMEMBER(int, pfnVMSetError,(PPDMDRVINS pDrvIns, int rc, RT_SRC_POS_DECL,
    698                                              const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7));
    699 
    700     /**
    701      * Set the VM error message
    702      *
    703      * @returns rc.
    704      * @param   pDrvIns         Driver instance.
    705      * @param   rc              VBox status code.
    706      * @param   SRC_POS         Use RT_SRC_POS.
    707      * @param   pszFormat       Error message format string.
    708      * @param   va              Error message arguments.
    709      */
    710     DECLR0CALLBACKMEMBER(int, pfnVMSetErrorV,(PPDMDRVINS pDrvIns, int rc, RT_SRC_POS_DECL,
    711                                               const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(6, 0));
    712 
    713     /**
    714      * Set the VM runtime error message
    715      *
    716      * @returns VBox status code.
    717      * @param   pDrvIns         Driver instance.
    718      * @param   fFlags          The action flags. See VMSETRTERR_FLAGS_*.
    719      * @param   pszErrorId      Error ID string.
    720      * @param   pszFormat       Error message format string.
    721      * @param   ...             Error message arguments.
    722      */
    723     DECLR0CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId,
    724                                                     const char *pszFormat, ...)  RT_IPRT_FORMAT_ATTR(4, 5));
    725 
    726     /**
    727      * Set the VM runtime error message
    728      *
    729      * @returns VBox status code.
    730      * @param   pDrvIns         Driver instance.
    731      * @param   fFlags          The action flags. See VMSETRTERR_FLAGS_*.
    732      * @param   pszErrorId      Error ID string.
    733      * @param   pszFormat       Error message format string.
    734      * @param   va              Error message arguments.
    735      */
    736     DECLR0CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId,
    737                                                      const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(4, 0));
    738634
    739635    /**
     
    789685} PDMDRVHLPR0;
    790686/** Current DRVHLP version number. */
    791 #define PDM_DRVHLPR0_VERSION                    PDM_VERSION_MAKE(0xf0f8, 5, 0)
     687#define PDM_DRVHLPR0_VERSION                    PDM_VERSION_MAKE(0xf0f8, 6, 0)
    792688
    793689
     
    878774     * @param   SRC_POS         Use RT_SRC_POS.
    879775     * @param   pszFormat       Error message format string.
    880      * @param   ...             Error message arguments.
    881      */
    882     DECLR3CALLBACKMEMBER(int, pfnVMSetError,(PPDMDRVINS pDrvIns, int rc, RT_SRC_POS_DECL,
    883                                              const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7));
    884 
    885     /**
    886      * Set the VM error message
    887      *
    888      * @returns rc.
    889      * @param   pDrvIns         Driver instance.
    890      * @param   rc              VBox status code.
    891      * @param   SRC_POS         Use RT_SRC_POS.
    892      * @param   pszFormat       Error message format string.
    893776     * @param   va              Error message arguments.
    894777     */
    895778    DECLR3CALLBACKMEMBER(int, pfnVMSetErrorV,(PPDMDRVINS pDrvIns, int rc, RT_SRC_POS_DECL,
    896779                                              const char *pszFormat, va_list va) RT_IPRT_FORMAT_ATTR(6, 0));
    897 
    898     /**
    899      * Set the VM runtime error message
    900      *
    901      * @returns VBox status code.
    902      * @param   pDrvIns         Driver instance.
    903      * @param   fFlags          The action flags. See VMSETRTERR_FLAGS_*.
    904      * @param   pszErrorId      Error ID string.
    905      * @param   pszFormat       Error message format string.
    906      * @param   ...             Error message arguments.
    907      */
    908     DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId,
    909                                                     const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(4, 5));
    910780
    911781    /**
     
    14311301} PDMDRVHLPR3;
    14321302/** Current DRVHLP version number. */
    1433 #define PDM_DRVHLPR3_VERSION                    PDM_VERSION_MAKE(0xf0fb, 7, 0)
    1434 
    1435 #endif /* IN_RING3 */
     1303#define PDM_DRVHLPR3_VERSION                    PDM_VERSION_MAKE(0xf0fb, 8, 0)
    14361304
    14371305
     
    14941362}
    14951363
    1496 
     1364#endif /* IN_RING3 */
    14971365
    14981366/** @def PDMDRV_ASSERT_EMT
  • trunk/include/VBox/vmm/vmapi.h

    r90834 r90997  
    7373typedef FNVMATERROR *PFNVMATERROR;
    7474
     75#ifdef IN_RING3
    7576VMMDECL(int)    VMSetError(PVMCC pVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(6, 7);
    7677VMMDECL(int)    VMSetErrorV(PVMCC pVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(6, 7);
     78#endif
    7779
    7880/** @def VM_SET_ERROR
     
    124126typedef FNVMATRUNTIMEERROR *PFNVMATRUNTIMEERROR;
    125127
     128#ifdef IN_RING3
    126129VMMDECL(int) VMSetRuntimeError(PVMCC pVM, uint32_t fFlags, const char *pszErrorId,
    127130                               const char *pszFormat, ...) RT_IPRT_FORMAT_ATTR(4, 5);
    128131VMMDECL(int) VMSetRuntimeErrorV(PVMCC pVM, uint32_t fFlags, const char *pszErrorId,
    129132                                const char *pszFormat, va_list args) RT_IPRT_FORMAT_ATTR(4, 0);
     133#endif
    130134
    131135/** @name VMSetRuntimeError fFlags
  • trunk/include/VBox/vmm/vmm.h

    r90991 r90997  
    5757    /** Signal a ring 0 assertion. */
    5858    VMMCALLRING3_VM_R0_ASSERTION,
    59     /** Set the VM error message. */
    60     VMMCALLRING3_VM_SET_ERROR,
    61     /** Set the VM runtime error message. */
    62     VMMCALLRING3_VM_SET_RUNTIME_ERROR,
     59
    6360    /** Grow the PGM shadow page pool. */
    6461    VMMCALLRING3_PGM_POOL_GROW,
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r90992 r90997  
    32403240        case PGMMODE_PAE:
    32413241            if (!pVM->cpum.ro.GuestFeatures.fPae)
     3242#ifdef IN_RING3 /** @todo r=bird: wrong place, probably hasn't really worked for a while. */
    32423243                return VMSetRuntimeError(pVM, VMSETRTERR_FLAGS_FATAL, "PAEmode",
    32433244                                         N_("The guest is trying to switch to the PAE mode which is currently disabled by default in VirtualBox. PAE support can be enabled using the VM settings (System/Processor)"));
     3245#else
     3246                AssertLogRelMsgFailedReturn(("enmGuestMode=%s - Try enable PAE for the guest!\n", PGMGetModeName(enmGuestMode)), VERR_PGM_MODE_IPE);
     3247
     3248#endif
    32443249            GCPhysCR3 = CPUMGetGuestCR3(pVCpu) & X86_CR3_PAE_PAGE_MASK;
    32453250            break;
  • trunk/src/VBox/VMM/VMMAll/VMAll.cpp

    r82968 r90997  
    3333
    3434
     35#ifdef IN_RING3
     36
    3537/**
    3638 * Sets the error message.
     
    7375VMMDECL(int) VMSetErrorV(PVMCC pVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list args)
    7476{
    75 #ifdef IN_RING3
     77# ifdef IN_RING3
    7678    /*
    7779     * Switch to EMT.
     
    8385    va_end(va2);
    8486
    85 #else
     87# else
    8688    /*
    8789     * We're already on the EMT thread and can safely create a VMERROR chunk.
     
    8991    vmSetErrorCopy(pVM, rc, RT_SRC_POS_ARGS, pszFormat, args);
    9092    VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_VM_SET_ERROR, 0);
    91 #endif
     93# endif
    9294    return rc;
    9395}
     
    111113{
    112114    NOREF(pVM); NOREF(rc); RT_SRC_POS_NOREF(); NOREF(pszFormat); NOREF(args);
    113 #if 0 /// @todo implement Ring-0 and GC VMSetError
     115# if 0 /// @todo implement Ring-0 and GC VMSetError
    114116    /*
    115117     * Create the untranslated message copy.
     
    169171        pVM->vm.s.pErrorR3 = MMHyper2HC(pVM, (uintptr_t)pArgs.pErr);
    170172    }
    171 #endif
    172 }
    173 
     173# endif
     174}
     175
     176#endif /* IN_RING3 */
     177#ifdef IN_RING3
    174178
    175179/**
     
    245249    Assert(RTStrEnd(pszFormat, 512) != NULL);
    246250
    247 #ifdef IN_RING3
     251# ifdef IN_RING3
    248252    /*
    249253     * Switch to EMT.
     
    274278    }
    275279
    276 #else
     280# else
    277281    /*
    278282     * We're already on the EMT and can safely create a VMRUNTIMEERROR chunk.
     
    282286
    283287    int rc = VMMRZCallRing3NoCpu(pVM, VMMCALLRING3_VM_SET_RUNTIME_ERROR, 0);
    284 #endif
     288# endif
    285289
    286290    Log(("VMSetRuntimeErrorV: returns %Rrc (pszErrorId=%s)\n", rc, pszErrorId));
     
    307311{
    308312    NOREF(pVM); NOREF(fFlags); NOREF(pszErrorId); NOREF(pszFormat); NOREF(va);
    309 #if 0 /// @todo implement Ring-0 and GC VMSetError
     313# if 0 /// @todo implement Ring-0 and GC VMSetError
    310314    /*
    311315     * Create the untranslated message copy.
     
    356360        pVM->vm.s.pErrorRuntimeR3 = MMHyper2HC(pVM, (uintptr_t)pArgs.pErr);
    357361    }
    358 #endif
    359 }
    360 
     362# endif
     363}
     364
     365#endif /* IN_RING3 */
    361366
    362367/**
  • trunk/src/VBox/VMM/VMMR0/PDMR0DevHlp.cpp

    r90759 r90997  
    350350
    351351
    352 /** @interface_method_impl{PDMDEVHLPR0,pfnVMSetError} */
    353 static DECLCALLBACK(int) pdmR0DevHlp_VMSetError(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...)
    354 {
    355     PDMDEV_ASSERT_DEVINS(pDevIns);
    356     va_list args;
    357     va_start(args, pszFormat);
    358     int rc2 = VMSetErrorV(pDevIns->Internal.s.pGVM, rc, RT_SRC_POS_ARGS, pszFormat, args); Assert(rc2 == rc); NOREF(rc2);
    359     va_end(args);
    360     return rc;
    361 }
    362 
    363 
    364 /** @interface_method_impl{PDMDEVHLPR0,pfnVMSetErrorV} */
    365 static DECLCALLBACK(int) pdmR0DevHlp_VMSetErrorV(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
    366 {
    367     PDMDEV_ASSERT_DEVINS(pDevIns);
    368     int rc2 = VMSetErrorV(pDevIns->Internal.s.pGVM, rc, RT_SRC_POS_ARGS, pszFormat, va); Assert(rc2 == rc); NOREF(rc2);
    369     return rc;
    370 }
    371 
    372 
    373 /** @interface_method_impl{PDMDEVHLPR0,pfnVMSetRuntimeError} */
    374 static DECLCALLBACK(int) pdmR0DevHlp_VMSetRuntimeError(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...)
    375 {
    376     PDMDEV_ASSERT_DEVINS(pDevIns);
    377     va_list va;
    378     va_start(va, pszFormat);
    379     int rc = VMSetRuntimeErrorV(pDevIns->Internal.s.pGVM, fFlags, pszErrorId, pszFormat, va);
    380     va_end(va);
    381     return rc;
    382 }
    383 
    384 
    385 /** @interface_method_impl{PDMDEVHLPR0,pfnVMSetRuntimeErrorV} */
    386 static DECLCALLBACK(int) pdmR0DevHlp_VMSetRuntimeErrorV(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va)
    387 {
    388     PDMDEV_ASSERT_DEVINS(pDevIns);
    389     int rc = VMSetRuntimeErrorV(pDevIns->Internal.s.pGVM, fFlags, pszErrorId, pszFormat, va);
    390     return rc;
    391 }
    392 
    393 
    394 
    395352/** @interface_method_impl{PDMDEVHLPR0,pfnGetVM} */
    396353static DECLCALLBACK(PVMCC)  pdmR0DevHlp_GetVM(PPDMDEVINS pDevIns)
     
    13891346    pdmR0DevHlp_A20IsEnabled,
    13901347    pdmR0DevHlp_VMState,
    1391     pdmR0DevHlp_VMSetError,
    1392     pdmR0DevHlp_VMSetErrorV,
    1393     pdmR0DevHlp_VMSetRuntimeError,
    1394     pdmR0DevHlp_VMSetRuntimeErrorV,
    13951348    pdmR0DevHlp_GetVM,
    13961349    pdmR0DevHlp_GetVMCPU,
     
    15021455    pdmR0DevHlp_A20IsEnabled,
    15031456    pdmR0DevHlp_VMState,
    1504     pdmR0DevHlp_VMSetError,
    1505     pdmR0DevHlp_VMSetErrorV,
    1506     pdmR0DevHlp_VMSetRuntimeError,
    1507     pdmR0DevHlp_VMSetRuntimeErrorV,
    15081457    pdmR0DevHlp_GetVM,
    15091458    pdmR0DevHlp_GetVMCPU,
  • trunk/src/VBox/VMM/VMMR0/PDMR0Driver.cpp

    r90382 r90997  
    4343 */
    4444
    45 /** @interface_method_impl{PDMDRVHLPR0,pfnVMSetError} */
    46 static DECLCALLBACK(int) pdmR0DrvHlp_VMSetError(PPDMDRVINS pDrvIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...)
    47 {
    48     PDMDRV_ASSERT_DRVINS(pDrvIns);
    49     va_list args;
    50     va_start(args, pszFormat);
    51     int rc2 = VMSetErrorV(pDrvIns->Internal.s.pVMR0, rc, RT_SRC_POS_ARGS, pszFormat, args); Assert(rc2 == rc); NOREF(rc2);
    52     va_end(args);
    53     return rc;
    54 }
    55 
    56 
    57 /** @interface_method_impl{PDMDRVHLPR0,pfnVMSetErrorV} */
    58 static DECLCALLBACK(int) pdmR0DrvHlp_VMSetErrorV(PPDMDRVINS pDrvIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
    59 {
    60     PDMDRV_ASSERT_DRVINS(pDrvIns);
    61     int rc2 = VMSetErrorV(pDrvIns->Internal.s.pVMR0, rc, RT_SRC_POS_ARGS, pszFormat, va); Assert(rc2 == rc); NOREF(rc2);
    62     return rc;
    63 }
    64 
    65 
    66 /** @interface_method_impl{PDMDRVHLPR0,pfnVMSetRuntimeError} */
    67 static DECLCALLBACK(int) pdmR0DrvHlp_VMSetRuntimeError(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId,
    68                                                        const char *pszFormat, ...)
    69 {
    70     PDMDRV_ASSERT_DRVINS(pDrvIns);
    71     va_list va;
    72     va_start(va, pszFormat);
    73     int rc = VMSetRuntimeErrorV(pDrvIns->Internal.s.pVMR0, fFlags, pszErrorId, pszFormat, va);
    74     va_end(va);
    75     return rc;
    76 }
    77 
    78 
    79 /** @interface_method_impl{PDMDRVHLPR0,pfnVMSetRuntimeErrorV} */
    80 static DECLCALLBACK(int) pdmR0DrvHlp_VMSetRuntimeErrorV(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId,
    81                                                         const char *pszFormat, va_list va)
    82 {
    83     PDMDRV_ASSERT_DRVINS(pDrvIns);
    84     int rc = VMSetRuntimeErrorV(pDrvIns->Internal.s.pVMR0, fFlags, pszErrorId, pszFormat, va);
    85     return rc;
    86 }
    87 
    88 
    8945/** @interface_method_impl{PDMDRVHLPR0,pfnAssertEMT} */
    9046static DECLCALLBACK(bool) pdmR0DrvHlp_AssertEMT(PPDMDRVINS pDrvIns, const char *pszFile, unsigned iLine, const char *pszFunction)
     
    224180{
    225181    PDM_DRVHLPRC_VERSION,
    226     pdmR0DrvHlp_VMSetError,
    227     pdmR0DrvHlp_VMSetErrorV,
    228     pdmR0DrvHlp_VMSetRuntimeError,
    229     pdmR0DrvHlp_VMSetRuntimeErrorV,
    230182    pdmR0DrvHlp_AssertEMT,
    231183    pdmR0DrvHlp_AssertOther,
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r90981 r90997  
    14061406                    STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMAllocHandy);
    14071407                    break;
    1408                 case VMMCALLRING3_VM_SET_ERROR:
    1409                     STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallVMSetError);
    1410                     break;
    1411                 case VMMCALLRING3_VM_SET_RUNTIME_ERROR:
    1412                     STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallVMSetRuntimeError);
    1413                     break;
    14141408                case VMMCALLRING3_VM_R0_ASSERTION:
    14151409                default:
  • trunk/src/VBox/VMM/VMMR0/VMMR0.def

    r90829 r90997  
    6464    TMTimerUnlock
    6565    VMMGetSvnRev
    66     VMSetError
    67     VMSetErrorV
    6866
    6967    ; Internal Networking
  • trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp

    r90502 r90997  
    11301130
    11311131
    1132 /** @interface_method_impl{PDMDEVHLPR3,pfnVMSetError} */
    1133 static DECLCALLBACK(int) pdmR3DevHlp_VMSetError(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...)
    1134 {
    1135     PDMDEV_ASSERT_DEVINS(pDevIns);
    1136     va_list args;
    1137     va_start(args, pszFormat);
    1138     int rc2 = VMSetErrorV(pDevIns->Internal.s.pVMR3, rc, RT_SRC_POS_ARGS, pszFormat, args); Assert(rc2 == rc); NOREF(rc2);
    1139     va_end(args);
    1140     return rc;
    1141 }
    1142 
    1143 
    11441132/** @interface_method_impl{PDMDEVHLPR3,pfnVMSetErrorV} */
    11451133static DECLCALLBACK(int) pdmR3DevHlp_VMSetErrorV(PPDMDEVINS pDevIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
     
    11471135    PDMDEV_ASSERT_DEVINS(pDevIns);
    11481136    int rc2 = VMSetErrorV(pDevIns->Internal.s.pVMR3, rc, RT_SRC_POS_ARGS, pszFormat, va); Assert(rc2 == rc); NOREF(rc2);
    1149     return rc;
    1150 }
    1151 
    1152 
    1153 /** @interface_method_impl{PDMDEVHLPR3,pfnVMSetRuntimeError} */
    1154 static DECLCALLBACK(int) pdmR3DevHlp_VMSetRuntimeError(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...)
    1155 {
    1156     PDMDEV_ASSERT_DEVINS(pDevIns);
    1157     va_list args;
    1158     va_start(args, pszFormat);
    1159     int rc = VMSetRuntimeErrorV(pDevIns->Internal.s.pVMR3, fFlags, pszErrorId, pszFormat, args);
    1160     va_end(args);
    11611137    return rc;
    11621138}
     
    45054481    pdmR3DevHlp_VMState,
    45064482    pdmR3DevHlp_VMTeleportedAndNotFullyResumedYet,
    4507     pdmR3DevHlp_VMSetError,
    45084483    pdmR3DevHlp_VMSetErrorV,
    4509     pdmR3DevHlp_VMSetRuntimeError,
    45104484    pdmR3DevHlp_VMSetRuntimeErrorV,
    45114485    pdmR3DevHlp_DBGFStopV,
     
    48714845    pdmR3DevHlp_VMState,
    48724846    pdmR3DevHlp_VMTeleportedAndNotFullyResumedYet,
    4873     pdmR3DevHlp_VMSetError,
    48744847    pdmR3DevHlp_VMSetErrorV,
    4875     pdmR3DevHlp_VMSetRuntimeError,
    48764848    pdmR3DevHlp_VMSetRuntimeErrorV,
    48774849    pdmR3DevHlp_DBGFStopV,
     
    53945366    pdmR3DevHlp_VMState,
    53955367    pdmR3DevHlp_VMTeleportedAndNotFullyResumedYet,
    5396     pdmR3DevHlp_VMSetError,
    53975368    pdmR3DevHlp_VMSetErrorV,
    5398     pdmR3DevHlp_VMSetRuntimeError,
    53995369    pdmR3DevHlp_VMSetRuntimeErrorV,
    54005370    pdmR3DevHlp_DBGFStopV,
  • 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,
  • trunk/src/VBox/VMM/VMMR3/VMM.cpp

    r90992 r90997  
    434434    STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMMapChunk,        STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMMapChunk",      STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_MAP_CHUNK calls.");
    435435    STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMAllocHandy,      STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMAllocHandy",    STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_PGM_ALLOCATE_HANDY_PAGES calls.");
    436     STAM_REG(pVM, &pVM->vmm.s.StatRZCallVMSetError,         STAMTYPE_COUNTER, "/VMM/RZCallR3/VMSetError",       STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_VM_SET_ERROR calls.");
    437     STAM_REG(pVM, &pVM->vmm.s.StatRZCallVMSetRuntimeError,  STAMTYPE_COUNTER, "/VMM/RZCallR3/VMRuntimeError",   STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_VM_SET_RUNTIME_ERROR calls.");
    438436
    439437    STAMR3Register(pVM, &pVM->vmm.s.StatLogFlusherFlushes,  STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, "/VMM/LogFlush/00-Flushes",  STAMUNIT_OCCURENCES, "Total number of buffer flushes");
     
    25412539
    25422540        /*
    2543          * Set the VM error message.
    2544          */
    2545         case VMMCALLRING3_VM_SET_ERROR:
    2546             VMR3SetErrorWorker(pVM);
    2547             pVCpu->vmm.s.rcCallRing3 = VINF_SUCCESS;
    2548             break;
    2549 
    2550         /*
    2551          * Set the VM runtime error message.
    2552          */
    2553         case VMMCALLRING3_VM_SET_RUNTIME_ERROR:
    2554             pVCpu->vmm.s.rcCallRing3 = VMR3SetRuntimeErrorWorker(pVM);
    2555             break;
    2556 
    2557         /*
    25582541         * Signal a ring 0 hypervisor assertion.
    25592542         * Cancel the longjmp operation that's in progress.
  • trunk/src/VBox/VMM/include/VMMInternal.h

    r90981 r90997  
    417417    STAMCOUNTER                 StatRZCallPGMMapChunk;
    418418    STAMCOUNTER                 StatRZCallPGMAllocHandy;
    419     STAMCOUNTER                 StatRZCallVMSetError;
    420     STAMCOUNTER                 StatRZCallVMSetRuntimeError;
    421419    STAMCOUNTER                 StatRZCallPGMLock;
    422420    /** @} */
Note: See TracChangeset for help on using the changeset viewer.

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