VirtualBox

Changeset 52717 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Sep 12, 2014 11:34:11 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96058
Message:

VMM/CPUM: Raise #GP(0) while writing to disallowed EFER bits.

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

Legend:

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

    r51366 r52717  
    55
    66/*
    7  * Copyright (C) 2013 Oracle Corporation
     7 * Copyright (C) 2013-2014 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    13381338    if (fExtFeatures & X86_CPUID_AMD_FEATURE_EDX_FFXSR)
    13391339        fMask |= MSR_K6_EFER_FFXSR;
     1340
     1341    /* #GP(0) If anything outside the allowed bits is set. */
     1342    if ((uValue | fMask) != fMask)
     1343    {
     1344        Log(("CPUM: Settings disallowed EFER bit. uValue=%#RX64 fAllowed=%#RX64 -> #GP(0)\n", uValue, fMask));
     1345        return VERR_CPUM_RAISE_GP_0;
     1346    }
    13401347
    13411348    /* Check for illegal MSR_K6_EFER_LME transitions: not allowed to change LME if
  • trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp

    r51729 r52717  
    14281428                fMask |= MSR_K6_EFER_FFXSR;
    14291429
     1430            /* #GP(0) If anything outside the allowed bits is set. */
     1431            if ((uValue | fMask) != fMask)
     1432            {
     1433                Log(("CPUM: Settings disallowed EFER bit. uValue=%#RX64 fAllowed=%#RX64 -> #GP(0)\n", uValue, fMask));
     1434                return VERR_CPUM_RAISE_GP_0;
     1435            }
     1436
    14301437            /* Check for illegal MSR_K6_EFER_LME transitions: not allowed to change LME if
    14311438               paging is enabled. (AMD Arch. Programmer's Manual Volume 2: Table 14-5) */
     
    19481955        {
    19491956            *pEax = *pEbx = *pEcx = *pEdx = 0;
    1950             LogRel(("CPUM: CPUMGetGuestCpuId: failed to get CPUID leaf for iLeaf=%#RX32\n", iLeaf));
    19511957        }
    19521958        return;
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