VirtualBox

Changeset 97641 in vbox for trunk


Ignore:
Timestamp:
Nov 21, 2022 9:16:52 PM (23 months ago)
Author:
vboxsync
Message:

VMM/IEM: Pick 4 as the threshold alignment that IEM_MEMMAP_F_ALIGN_GP_OR_AC uses to pick between #GP and #AC. This matches FXSAVE on 10980xe and the expecations of bs3-cpu-basic-2. bugref:9898

File:
1 edited

Legend:

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

    r97522 r97641  
    60376037            }
    60386038            else if (   (uAlignCtl & IEM_MEMMAP_F_ALIGN_GP_OR_AC)
    6039                      && iemMemAreAlignmentChecksEnabled(pVCpu)
    6040 /** @todo may only apply to 2, 4 or 8 byte misalignments depending on the CPU
    6041  *        implementation. See FXSAVE/FRSTOR/XSAVE/XRSTOR/++. */
    6042                     )
     6039                     && (GCPtrMem & 3) /* The value 4 matches 10980xe's FXSAVE and helps make bs3-cpu-basic2 work. */
     6040                    /** @todo may only apply to 2, 4 or 8 byte misalignments depending on the CPU
     6041                     * implementation. See FXSAVE/FRSTOR/XSAVE/XRSTOR/++.  Using 4 for now as
     6042                     * that's what FXSAVE does on a 10980xe. */
     6043                     && iemMemAreAlignmentChecksEnabled(pVCpu))
    60436044                return iemRaiseAlignmentCheckException(pVCpu);
    60446045            else
     
    63386339            }
    63396340            else if (   (uAlignCtl & IEM_MEMMAP_F_ALIGN_GP_OR_AC)
    6340                      && iemMemAreAlignmentChecksEnabled(pVCpu)
    6341 /** @todo may only apply to 2, 4 or 8 byte misalignments depending on the CPU
    6342  *        implementation. See FXSAVE/FRSTOR/XSAVE/XRSTOR/++. */
    6343                     )
     6341                     && (GCPtrMem & 3) /* The value 4 matches 10980xe's FXSAVE and helps make bs3-cpu-basic2 work. */
     6342                    /** @todo may only apply to 2, 4 or 8 byte misalignments depending on the CPU
     6343                     * implementation. See FXSAVE/FRSTOR/XSAVE/XRSTOR/++.  Using 4 for now as
     6344                     * that's what FXSAVE does on a 10980xe. */
     6345                     && iemMemAreAlignmentChecksEnabled(pVCpu))
    63446346                iemRaiseAlignmentCheckExceptionJmp(pVCpu);
    63456347            else
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