VirtualBox

Changeset 103752 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Mar 11, 2024 8:12:36 AM (13 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162121
Message:

VMM/CPUMR3CpuId: Enable XSAVE for IEM, it is fully supported, enables us to run bs3-cpu-instr-3 with IEM on arm64, bugref:10614

Location:
trunk/src/VBox/VMM/VMMR3
Files:
2 edited

Legend:

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

    r103586 r103752  
    22482248    pVM->cpum.s.HostFeatures.fLahfSahf   = true;
    22492249    pVM->cpum.s.HostFeatures.fMovBe      = true;
     2250    pVM->cpum.s.HostFeatures.fXSaveRstor = true;
     2251    pVM->cpum.s.HostFeatures.fOpSysXSaveRstor = true;
     2252    /** @todo r=aeichner Keep AVX/AVX2 disabled for now, too many missing instruction emulations. */
     2253# if 1
     2254    pVM->cpum.s.HostFeatures.cbMaxExtendedState = RT_UOFFSETOF(X86XSAVEAREA, u.YmmHi);
     2255# else
     2256    pVM->cpum.s.HostFeatures.cbMaxExtendedState = RT_UOFFSETOF(X86XSAVEAREA, u.YmmHi) + sizeof(X86XSAVEYMMHI);
     2257    pVM->cpum.s.HostFeatures.fAvx               = false;
     2258    pVM->cpum.s.HostFeatures.fAvx2              = false;
     2259# endif
    22502260#endif
    22512261
     
    22822292                            ("%#llx\n", fXStateHostMask), fXStateHostMask = 0);
    22832293    }
     2294#elif defined(RT_ARCH_ARM64)
     2295    /** @todo r=aeichner Keep AVX/AVX2 disabled for now, too many missing instruction emulations. */
     2296    fXStateHostMask = XSAVE_C_X87 | XSAVE_C_SSE /*| XSAVE_C_YMM | XSAVE_C_OPMASK | XSAVE_C_ZMM_HI256 | XSAVE_C_ZMM_16HI*/;
    22842297#endif
    22852298    pVM->cpum.s.fXStateHostMask = fXStateHostMask;
     
    22902303     * Initialize the host XSAVE/XRSTOR mask.
    22912304     */
    2292 #if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)
    22932305    uint32_t cbMaxXState = pVM->cpum.s.HostFeatures.cbMaxExtendedState;
    22942306    cbMaxXState = RT_ALIGN(cbMaxXState, 128);
     
    22972309                       && pVM->cpum.s.HostFeatures.cbMaxExtendedState <= sizeof(pVM->apCpusR3[0]->cpum.s.Guest.abXState)
    22982310                       , VERR_CPUM_IPE_2);
    2299 #endif
    23002311
    23012312    for (VMCPUID i = 0; i < pVM->cCpus; i++)
  • trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp

    r103586 r103752  
    28912891                                ? NEMHCGetFeatures(pVM) & NEM_FEAT_F_XSAVE_XRSTOR
    28922892                                : VM_IS_EXEC_ENGINE_IEM(pVM)
    2893                                 ? false /** @todo IEM and XSAVE @bugref{9898} */
     2893                                ? true
    28942894                                : fNestedPagingAndFullGuestExec);
    28952895    uint64_t const fXStateHostMask = pVM->cpum.s.fXStateHostMask;
     
    29012901     * host support at the moment.
    29022902     */
    2903     rc = cpumR3CpuIdReadIsaExtCfgEx(pVM, pIsaExts, "XSAVE", &pConfig->enmXSave, fNestedPagingAndFullGuestExec,
     2903    rc = cpumR3CpuIdReadIsaExtCfgEx(pVM, pIsaExts, "XSAVE", &pConfig->enmXSave, true,
    29042904                                    fMayHaveXSave /*fAllowed*/);
    29052905    AssertLogRelRCReturn(rc, rc);
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