VirtualBox

Changeset 58605 in vbox


Ignore:
Timestamp:
Nov 6, 2015 1:25:50 PM (9 years ago)
Author:
vboxsync
Message:

IEM: Fixed OpenBSD 5.8, incorred treatment of reserved/ignored CR3 bits.

File:
1 edited

Legend:

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

    r57562 r58605  
    1717
    1818
     19#define IEM_IMPLEMENTS_CALLGATE
    1920/** @name Misc Helpers
    2021 * @{
     
    49074908         * CR3 is relatively simple, although AMD and Intel have different
    49084909         * accounts of how setting reserved bits are handled.  We take intel's
    4909          * word for the lower bits and AMD's for the high bits (63:52).
     4910         * word for the lower bits and AMD's for the high bits (63:52).  The
     4911         * lower reserved bits are ignored and left alone; OpenBSD 5.8 relies
     4912         * on this.
    49104913         */
    49114914        /** @todo Testcase: Setting reserved bits in CR3, especially before
     
    49234926            if (   (pCtx->cr4 & X86_CR4_PAE)
    49244927                && (pCtx->msrEFER & MSR_K6_EFER_LME))
    4925                 fValid = UINT64_C(0x000ffffffffff014);
    4926             else if (pCtx->cr4 & X86_CR4_PAE)
    4927                 fValid = UINT64_C(0xfffffff4);
     4928                fValid = UINT64_C(0x000fffffffffffff);
    49284929            else
    4929                 fValid = UINT64_C(0xfffff014);
     4930                fValid = UINT64_C(0xffffffff);
    49304931            if (uNewCrX & ~fValid)
    49314932            {
    4932                 Log(("Automatically clearing reserved bits in CR3 load: NewCR3=%#llx ClearedBits=%#llx\n",
     4933                Log(("Automatically clearing reserved MBZ bits in CR3 load: NewCR3=%#llx ClearedBits=%#llx\n",
    49334934                     uNewCrX, uNewCrX & ~fValid));
    49344935                uNewCrX &= fValid;
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