VirtualBox

Changeset 107762 in vbox for trunk


Ignore:
Timestamp:
Jan 14, 2025 4:10:51 PM (4 weeks ago)
Author:
vboxsync
Message:

VMM/CPUM: Pass thru more MSR_IA32_SPEC_CTRL related stuff to the guest. [bugfix] jiraref:VBP-947

File:
1 edited

Legend:

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

    r107570 r107762  
    16361636
    16371637    /* NB: The STIBP bit can be set even when IBRS is present, regardless of whether STIBP is actually implemented. */
    1638     if (uValue & ~(MSR_IA32_SPEC_CTRL_F_IBRS | MSR_IA32_SPEC_CTRL_F_STIBP))
     1638    PCPUMFEATURES const pFeatures = &pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures;
     1639    uint64_t const fValidMask = (pFeatures->fIbrs      ? MSR_IA32_SPEC_CTRL_F_IBRS : 0)
     1640                              | (pFeatures->fStibp     ? MSR_IA32_SPEC_CTRL_F_STIBP : 0)
     1641                              | (pFeatures->fSsbd      ? MSR_IA32_SPEC_CTRL_F_SSBD : 0)
     1642                              | (pFeatures->fIpredCtrl ? MSR_IA32_SPEC_CTRL_F_IPRED_DIS_U | MSR_IA32_SPEC_CTRL_F_IPRED_DIS_S : 0)
     1643                              | (pFeatures->fRrsbaCtrl ? MSR_IA32_SPEC_CTRL_F_RRSBA_DIS_U | MSR_IA32_SPEC_CTRL_F_RRSBA_DIS_S : 0)
     1644                              | (pFeatures->fPsfd      ? MSR_IA32_SPEC_CTRL_F_PSFD : 0)
     1645                              | (pFeatures->fDdpdU     ? MSR_IA32_SPEC_CTRL_F_DDPD_U : 0)
     1646                              | (pFeatures->fBhiCtrl   ? MSR_IA32_SPEC_CTRL_F_BHI_DIS_S : 0);
     1647    if (uValue & ~fValidMask)
    16391648    {
    16401649        Log(("CPUM: Invalid IA32_SPEC_CTRL bits (trying to write %#llx)\n", uValue));
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