VirtualBox

Changeset 9800 in vbox


Ignore:
Timestamp:
Jun 18, 2008 3:50:14 PM (17 years ago)
Author:
vboxsync
Message:

Correction

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/cpum.h

    r9675 r9800  
    568568
    569569/**
     570 * Tests if the guest is running in 64 bits mode or not.
     571 *
     572 * @returns true if in 64 bits protected mode, otherwise false.
     573 * @param   pVM     The VM handle.
     574 * @param   pCtx    Current CPU context
     575 */
     576DECLINLINE(bool) CPUMIsGuestIn64BitCodeEx(PVM pVM, PCCPUMCTX pCtx)
     577{
     578    if ((pCtx->msrEFER & MSR_K6_EFER_LMA))
     579        return false;
     580
     581    return pCtx->csHid.Attr.n.u1Long;
     582}
     583
     584/**
    570585 * Gets the CPU vendor
    571586 *
  • trunk/src/recompiler/VBoxRecompiler.c

    r9798 r9800  
    18271827
    18281828        /* FS & GS base addresses need to be loaded from the MSRs if in 64 bits mode. */
    1829         if (CPUMIsGuestIn64BitCode(pVM, CPUMCTX2CORE(pCtx)))
     1829        if (CPUMIsGuestIn64BitCodeEx(pVM, pCtx))
    18301830        {
    18311831            /* Note that the base values in the hidden fs & gs registers are cut to 32 bits and can't be used in this case. */
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