VirtualBox

Changeset 48369 in vbox for trunk/src


Ignore:
Timestamp:
Sep 6, 2013 5:40:56 PM (11 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Nits.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r48362 r48369  
    22242224{
    22252225    int rc = VERR_INTERNAL_ERROR_5;
    2226     RTSEL uSelDS   = 0;
    2227     RTSEL uSelES   = 0;
    2228     RTSEL uSelFS   = 0;
    2229     RTSEL uSelGS   = 0;
    2230     RTSEL uSelTR   = 0;
    22312226
    22322227    /*
     
    22342229     */
    22352230#if HC_ARCH_BITS == 64
     2231    RTSEL uSelDS = ASMGetDS();
     2232    RTSEL uSelES = ASMGetES();
     2233    RTSEL uSelFS = ASMGetFS();
     2234    RTSEL uSelGS = ASMGetGS();
     2235#else
     2236    RTSEL uSelDS = 0;
     2237    RTSEL uSelES = 0;
     2238    RTSEL uSelFS = 0;
     2239    RTSEL uSelGS = 0;
     2240#endif
     2241
     2242    /* Recalculate which host-state bits need to be manually restored. */
    22362243    pVCpu->hm.s.vmx.fRestoreHostFlags = 0;
    2237     uSelDS   = ASMGetDS();
    2238     uSelES   = ASMGetES();
    2239     uSelFS   = ASMGetFS();
    2240     uSelGS   = ASMGetGS();
    2241 #endif
    22422244
    22432245    /*
    22442246     * Host CS and SS segment registers.
    22452247     */
     2248#ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
    22462249    RTSEL uSelCS;
    22472250    RTSEL uSelSS;
    2248 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
    22492251    if (HMVMX_IS_64BIT_HOST_MODE())
    22502252    {
     
    22592261    }
    22602262#else
    2261     uSelCS = ASMGetCS();
    2262     uSelSS = ASMGetSS();
     2263    RTSEL uSelCS = ASMGetCS();
     2264    RTSEL uSelSS = ASMGetSS();
    22632265#endif
    22642266
     
    22662268     * Host TR segment register.
    22672269     */
    2268     uSelTR = ASMGetTR();
     2270    RTSEL uSelTR = ASMGetTR();
    22692271
    22702272#if HC_ARCH_BITS == 64
     
    61276129    Assert(!CPUMIsHyperDebugStateActive(pVCpu));
    61286130
     6131#if HC_ARCH_BITS == 64
    61296132    /* Restore host-state bits that VT-x only restores partially. */
    61306133    if (   (pVCpu->hm.s.vmx.fRestoreHostFlags & VMX_RESTORE_HOST_REQUIRED)
     
    61356138        pVCpu->hm.s.vmx.fRestoreHostFlags = 0;
    61366139    }
     6140#endif
    61376141
    61386142    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hm.s.StatEntry);
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.h

    r48218 r48369  
    5151# endif
    5252
    53 /* Cached VMCS accesses -- defined only for 32 hosts (with 64-bit guest support). */
     53/* Cached VMCS accesses -- defined only for 32-bit hosts (with 64-bit guest support). */
    5454# ifdef VMX_USE_CACHED_VMCS_ACCESSES
    5555VMMR0DECL(int) VMXWriteCachedVmcsEx(PVMCPU pVCpu, uint32_t idxField, uint64_t u64Val);
     
    6464
    6565# ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
     66/* Don't use fAllow64BitGuests for VMXReadVmcsGstN() even though it looks right, as it can be forced to 'true'.
     67   HMVMX_IS_64BIT_HOST_MODE() is what we need. */
    6668#  define VMXReadVmcsHstN(idxField, p64Val)               HMVMX_IS_64BIT_HOST_MODE() ?                      \
    6769                                                            VMXReadVmcs64(idxField, p64Val)                 \
    6870                                                          : (*(p64Val) &= UINT64_C(0xffffffff),             \
    6971                                                             VMXReadVmcs32(idxField, (uint32_t *)(p64Val)))
    70 /* Don't use fAllow64BitGuests for VMXReadVmcsGstN() even though it looks right, as it can be forced to 'true'.
    71    HMVMX_IS_64BIT_HOST_MODE() is what we need. */
    7272#  define VMXReadVmcsGstN                                 VMXReadVmcsHstN
    7373#  define VMXReadVmcsGstNByIdxVal                         VMXReadVmcsGstN
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