VirtualBox

Changeset 51282 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
May 19, 2014 4:52:41 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
93748
Message:

VMM: Disallow modifying leaves that has SSM deps. through CPUMR3CpuIdInsert().

File:
1 edited

Legend:

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

    r51281 r51282  
    926926VMMR3DECL(int) CPUMR3CpuIdInsert(PVM pVM, PCPUMCPUIDLEAF pNewLeaf)
    927927{
    928     /** @todo Should we disallow here inserting/replacing the standard leaves that
    929      *        PATM relies on? See @bugref{7270}. */
     928    /*
     929     * Validate parameters.
     930     */
     931    AssertReturn(pVM, VERR_INVALID_PARAMETER);
     932    AssertReturn(pNewLeaf, VERR_INVALID_PARAMETER);
     933
     934    /*
     935     * Disallow replacing CPU ID leaves that this API currently cannot manage.                                                                                .
     936     * These leaves have dependencies on saved-states, see PATMCpuidReplacement().
     937     * If you want to modify these leaves, use CPUMSetGuestCpuIdFeature().                                                                         .
     938     */
     939    if (   pNewLeaf->uLeaf == UINT32_C(0x00000000)  /* Standard */
     940        || pNewLeaf->uLeaf == UINT32_C(0x80000000)  /* Extended */
     941        || pNewLeaf->uLeaf == UINT32_C(0xc0000000)) /* Centaur */
     942    {
     943        return VERR_NOT_SUPPORTED;
     944    }
     945
    930946    return cpumR3CpuIdInsert(pVM, NULL /* ppaLeaves */, NULL /* pcLeaves */, pNewLeaf);
    931947}
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