VirtualBox

Changeset 97156 in vbox


Ignore:
Timestamp:
Oct 14, 2022 12:10:26 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154129
Message:

IEM: Quick fix to support PC/AT compatible math exception handling, analogous to what we do in HM. Required for DOS, OS/2, and other old guests.

File:
1 edited

Legend:

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

    r97118 r97156  
    41714171VBOXSTRICTRC iemRaiseMathFault(PVMCPUCC pVCpu)
    41724172{
    4173     return iemRaiseXcptOrInt(pVCpu, 0, X86_XCPT_MF, IEM_XCPT_FLAGS_T_CPU_XCPT, 0, 0);
     4173    if (pVCpu->cpum.GstCtx.cr0 & X86_CR0_NE)
     4174        return iemRaiseXcptOrInt(pVCpu, 0, X86_XCPT_MF, IEM_XCPT_FLAGS_T_CPU_XCPT, 0, 0);
     4175    else
     4176    {
     4177        /* Convert a #MF into a FERR -> IRQ 13. See @bugref{6117}. */
     4178        PDMIsaSetIrq(pVCpu->CTX_SUFF(pVM), 13 /* u8Irq */, 1 /* u8Level */, 0 /* uTagSrc */);
     4179        iemRegUpdateRipAndClearRF(pVCpu);
     4180        return VINF_SUCCESS;
     4181    }
    41744182}
    41754183
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