VirtualBox

Changeset 100788 in vbox


Ignore:
Timestamp:
Aug 3, 2023 10:12:58 PM (16 months ago)
Author:
vboxsync
Message:

VMM/IEM: Added missing CheckMode call to iemThreadedRecompilerMcDeferToCImpl0. Issue mode change check on IEM_CIMPL_F_VMEXIT. bugref:10369

Location:
trunk/src/VBox/VMM
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdFuncsBltIn.cpp

    r100787 r100788  
    126126/**
    127127 * Built-in function that compares the fExec mask against uParam0.
     128 *
     129 * This is used both for IEM_CIMPL_F_MODE and IEM_CIMPL_F_VMEXIT after executing
     130 * an instruction.
    128131 */
    129132IEM_DECL_IEMTHREADEDFUNC_DEF(iemThreadedFunc_BltIn_CheckMode)
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdPython.py

    r100787 r100788  
    912912        # For CIMPL stuff, we need to consult the associated IEM_CIMPL_F_XXX
    913913        # mask and maybe emit additional checks.
    914         if 'IEM_CIMPL_F_MODE' in self.dsCImplFlags or 'IEM_CIMPL_F_XCPT' in self.dsCImplFlags:
     914        if (   'IEM_CIMPL_F_MODE'   in self.dsCImplFlags
     915            or 'IEM_CIMPL_F_XCPT'   in self.dsCImplFlags
     916            or 'IEM_CIMPL_F_VMEXIT' in self.dsCImplFlags):
    915917            aoStmts.append(iai.McCppCall('IEM_MC2_EMIT_CALL_1', ( 'kIemThreadedFunc_BltIn_CheckMode', 'pVCpu->iem.s.fExec', ),
    916918                                         cchIndent = cchIndent));
  • trunk/src/VBox/VMM/VMMAll/IEMAllThrdTables.h

    r100787 r100788  
    1313 * modify it under the terms of the GNU General Public License
    1414 * as published by the Free Software Foundation, in version 3 of the
    15  * License.                     8
     15 * License.
    1616 *
    1717 * This program is distributed in the hope that it will be useful, but
     
    288288    IEM_MC2_BEGIN_EMIT_CALLS(fFlags & IEM_CIMPL_F_CHECK_IRQ_BEFORE);
    289289    IEM_MC2_EMIT_CALL_2(kIemThreadedFunc_BltIn_DeferToCImpl0, (uintptr_t)pfnCImpl, IEM_GET_INSTR_LEN(pVCpu));
     290    if (   (fFlags & (IEM_CIMPL_F_MODE | IEM_CIMPL_F_VMEXIT))
     291        && !(fFlags & (IEM_CIMPL_F_END_TB | IEM_CIMPL_F_BRANCH_FAR)))
     292        IEM_MC2_EMIT_CALL_1(kIemThreadedFunc_BltIn_CheckMode, pVCpu->iem.s.fExec);
    290293    IEM_MC2_END_EMIT_CALLS(fFlags);
    291294
  • trunk/src/VBox/VMM/include/IEMMc.h

    r100787 r100788  
    12691269/** Convenience: Check for IRQ both before and after an instruction. */
    12701270#define IEM_CIMPL_F_CHECK_IRQ_BEFORE_AND_AFTER (IEM_CIMPL_F_CHECK_IRQ_BEFORE | IEM_CIMPL_F_CHECK_IRQ_AFTER)
    1271 /** May trigger a VM exit. */
     1271/** May trigger a VM exit (treated like IEM_CIMPL_F_MODE atm). */
    12721272#define IEM_CIMPL_F_VMEXIT              RT_BIT_32(10)
    12731273/** May modify FPU state. */
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