VirtualBox

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


Ignore:
Timestamp:
May 1, 2013 11:13:25 AM (12 years ago)
Author:
vboxsync
Message:

VMM/VMMR0: Unbreak old VT-x code with manual load/store of kernel GS base MSR.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMR0Mixed.mac

    r45845 r45862  
    421421    LOADGUESTMSR MSR_K8_SF_MASK, CPUMCTX.msrSFMASK
    422422    LOADGUESTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE
     423%else
     424%ifdef VBOX_WITH_OLD_VTX_CODE
     425    ; The KERNEL_GS_BASE MSR does not work reliably with auto load/store. See @bugref{6208}
     426    LOADGUESTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE
     427%endif
    423428%endif
    424429
     
    561566    LOADHOSTMSREX MSR_K6_STAR, CPUMCTX.msrSTAR
    562567    LOADHOSTMSREX MSR_K8_LSTAR, CPUMCTX.msrLSTAR
     568%else
     569%ifdef VBOX_WITH_OLD_VTX_CODE
     570    ; The KERNEL_GS_BASE MSR does not work reliably with auto load/store. See @bugref{6208}
     571    LOADHOSTMSREX MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE
     572%endif
    563573%endif
    564574
     
    632642    LOADHOSTMSR MSR_K6_STAR
    633643    LOADHOSTMSR MSR_K8_LSTAR
     644%else
     645%ifdef VBOX_WITH_OLD_VTX_CODE
     646    ; The KERNEL_GS_BASE MSR does not work reliably with auto load/store. See @bugref{6208}
     647    LOADHOSTMSR MSR_K8_KERNEL_GS_BASE
     648%endif
    634649%endif
    635650
     
    677692    LOADHOSTMSR MSR_K6_STAR
    678693    LOADHOSTMSR MSR_K8_LSTAR
     694%else
     695%ifdef VBOX_WITH_OLD_VTX_CODE
     696    ; The KERNEL_GS_BASE MSR does not work reliably with auto load/store. See @bugref{6208}
     697    LOADHOSTMSR MSR_K8_KERNEL_GS_BASE
     698%endif
    679699%endif
    680700
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r45845 r45862  
    15321532            pMsr->u64Value    = ASMRdMsr(MSR_K8_SF_MASK);           /* syscall flag mask */
    15331533            pMsr++; idxMsr++;
    1534 
    1535             /* The KERNEL_GS_BASE MSR was previously not working reliably with auto load/store. See @bugref{6208}  */
     1534#  if 0
     1535            /* The KERNEL_GS_BASE MSR does not work reliably with auto load/store. See @bugref{6208}  */
    15361536            pMsr->u32IndexMSR = MSR_K8_KERNEL_GS_BASE;
    15371537            pMsr->u32Reserved = 0;
    15381538            pMsr->u64Value    = ASMRdMsr(MSR_K8_KERNEL_GS_BASE);    /* swapgs exchange value */
    15391539            pMsr++; idxMsr++;
     1540#  endif
    15401541        }
    15411542# endif
     
    23862387            pMsr->u64Value    = pCtx->msrSFMASK;          /* syscall flag mask */
    23872388            pMsr++; idxMsr++;
    2388 
    2389             /* The KERNEL_GS_BASE MSR was previously not working reliably with auto load/store. See @bugref{6208}  */
     2389#if 0
     2390            /* The KERNEL_GS_BASE MSR does not work reliably with auto load/store. See @bugref{6208}  */
    23902391            pMsr->u32IndexMSR = MSR_K8_KERNEL_GS_BASE;
    23912392            pMsr->u32Reserved = 0;
    23922393            pMsr->u64Value    = pCtx->msrKERNELGSBASE;    /* swapgs exchange value */
    23932394            pMsr++; idxMsr++;
     2395#endif
    23942396        }
    23952397    }
     
    25682570                pCtx->msrSFMASK = pMsr->u64Value;
    25692571                break;
    2570             /* The KERNEL_GS_BASE MSR was previously not working reliably with auto load/store. See @bugref{6208}  */
     2572#if 0
     2573            /* The KERNEL_GS_BASE MSR does not work reliably with auto load/store. See @bugref{6208}  */
    25712574            case MSR_K8_KERNEL_GS_BASE:
    25722575                pCtx->msrKERNELGSBASE = pMsr->u64Value;
    25732576                break;
     2577#endif
    25742578            case MSR_K8_TSC_AUX:
    25752579                CPUMSetGuestMsr(pVCpu, MSR_K8_TSC_AUX, pMsr->u64Value);
  • trunk/src/VBox/VMM/VMMSwitcher/LegacyandAMD64.mac

    r45845 r45862  
    723723    LOADGUESTMSR MSR_K8_SF_MASK,        CPUMCTX.msrSFMASK
    724724    LOADGUESTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE
     725%else
     726%ifdef VBOX_WITH_OLD_VTX_CODE
     727    ; The KERNEL_GS_BASE MSR does not work reliably with auto load/store. See @bugref{6208}
     728    LOADGUESTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE
     729%endif
    725730%endif
    726731
     
    804809    SAVEGUESTMSR MSR_K6_STAR,           CPUMCTX.msrSTAR
    805810    SAVEGUESTMSR MSR_K8_LSTAR,          CPUMCTX.msrLSTAR
     811%else
     812%ifdef VBOX_WITH_OLD_VTX_CODE
     813    ; The KERNEL_GS_BASE MSR does not work reliably with auto load/store. See @bugref{6208}
     814    SAVEGUESTMSR MSR_K8_KERNEL_GS_BASE, CPUMCTX.msrKERNELGSBASE
     815%endif
    806816%endif
    807817
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