VirtualBox

Changeset 70254 in vbox for trunk/src


Ignore:
Timestamp:
Dec 21, 2017 5:54:03 AM (7 years ago)
Author:
vboxsync
Message:

VMM: Match the AMD specs exactly whenever possible for SVM specific feature, renamed to plural "Decode assists".

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

Legend:

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

    r70253 r70254  
    678678
    679679/**
    680  * Returns whether VMCB Clean Bits feature is supported.
    681  *
     680 * Returns whether the VMCB Clean Bits feature is supported.
     681 *
     682 * @return @c true if supported, @c false otherwise.
    682683 * @param   pVCpu       The cross context virtual CPU structure.
    683684 * @param   pCtx        Pointer to the guest-CPU context.
     
    700701
    701702/**
    702  * Returns whether decode-assist feature is supported.
    703  *
     703 * Returns whether the decode assists feature is supported.
     704 *
     705 * @return @c true if supported, @c false otherwise.
    704706 * @param   pVCpu       The cross context virtual CPU structure.
    705707 * @param   pCtx        Pointer to the guest-CPU context.
    706708 */
    707 DECLINLINE(bool) hmR0SvmSupportsDecodeAssist(PVMCPU pVCpu, PCPUMCTX pCtx)
     709DECLINLINE(bool) hmR0SvmSupportsDecodeAssists(PVMCPU pVCpu, PCPUMCTX pCtx)
    708710{
    709711    PVM pVM = pVCpu->CTX_SUFF(pVM);
     
    711713    if (CPUMIsGuestInSvmNestedHwVirtMode(pCtx))
    712714    {
    713         return    (pVM->hm.s.svm.u32Features & X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSIST)
    714                &&  pVM->cpum.ro.GuestFeatures.fSvmDecodeAssist;
     715        return    (pVM->hm.s.svm.u32Features & X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSISTS)
     716               &&  pVM->cpum.ro.GuestFeatures.fSvmDecodeAssists;
    715717    }
    716718#else
    717719    RT_NOREF(pCtx);
    718720#endif
    719     return RT_BOOL(pVM->hm.s.svm.u32Features & X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSIST);
    720 }
    721 
    722 
    723 /**
    724  * Returns whether NRIP_SAVE feature is supported.
    725  *
     721    return RT_BOOL(pVM->hm.s.svm.u32Features & X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSISTS);
     722}
     723
     724
     725/**
     726 * Returns whether the NRIP_SAVE feature is supported.
     727 *
     728 * @return @c true if supported, @c false otherwise.
    726729 * @param   pVCpu       The cross context virtual CPU structure.
    727730 * @param   pCtx        Pointer to the guest-CPU context.
     
    30923095 * now.
    30933096 *
    3094  * @returns true if the interrupt shadow is active, false otherwise.
     3097 * @returns @c true if the interrupt shadow is active, @c false otherwise.
    30953098 * @param   pVCpu   The cross context virtual CPU structure.
    30963099 * @param   pCtx    Pointer to the guest-CPU context.
     
    55955598 * included here as it's a conditional contributory exception.
    55965599 *
    5597  * @returns true if the exception is contributory, false otherwise.
     5600 * @returns @c true if the exception is contributory, @c false otherwise.
    55985601 * @param   uVector     The exception vector.
    55995602 */
     
    61406143    STAM_COUNTER_INC(&pVCpu->hm.s.StatExitInvlpg);
    61416144
    6142     bool const fSupportsDecodeAssist = hmR0SvmSupportsDecodeAssist(pVCpu, pCtx);
    6143     bool const fSupportsNextRipSave  = hmR0SvmSupportsNextRipSave(pVCpu, pCtx);
    6144     if (   fSupportsDecodeAssist
     6145    bool const fSupportsDecodeAssists = hmR0SvmSupportsDecodeAssists(pVCpu, pCtx);
     6146    bool const fSupportsNextRipSave   = hmR0SvmSupportsNextRipSave(pVCpu, pCtx);
     6147    if (   fSupportsDecodeAssists
    61456148        && fSupportsNextRipSave)
    61466149    {
     
    62646267    STAM_COUNTER_INC(&pVCpu->hm.s.StatExitCRxRead[pSvmTransient->u64ExitCode - SVM_EXIT_READ_CR0]);
    62656268
    6266     bool const fSupportsDecodeAssist = hmR0SvmSupportsDecodeAssist(pVCpu, pCtx);
    6267     bool const fSupportsNextRipSave  = hmR0SvmSupportsNextRipSave(pVCpu, pCtx);
    6268     if (   fSupportsDecodeAssist
     6269    bool const fSupportsDecodeAssists = hmR0SvmSupportsDecodeAssists(pVCpu, pCtx);
     6270    bool const fSupportsNextRipSave   = hmR0SvmSupportsNextRipSave(pVCpu, pCtx);
     6271    if (   fSupportsDecodeAssists
    62696272        && fSupportsNextRipSave)
    62706273    {
     
    63056308    VBOXSTRICTRC rcStrict = VERR_SVM_IPE_5;
    63066309    bool         fDecodedInstr = false;
    6307     bool const   fSupportsDecodeAssist = hmR0SvmSupportsDecodeAssist(pVCpu, pCtx);
    6308     bool const   fSupportsNextRipSave  = hmR0SvmSupportsNextRipSave(pVCpu, pCtx);
    6309     if (   fSupportsDecodeAssist
     6310    bool const   fSupportsDecodeAssists = hmR0SvmSupportsDecodeAssists(pVCpu, pCtx);
     6311    bool const   fSupportsNextRipSave   = hmR0SvmSupportsNextRipSave(pVCpu, pCtx);
     6312    if (   fSupportsDecodeAssists
    63106313        && fSupportsNextRipSave)
    63116314    {
  • trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp

    r70184 r70254  
    17211721                pFeatures->fSvmVmcbClean            = RT_BOOL(pSvmLeaf->uEdx & X86_CPUID_SVM_FEATURE_EDX_VMCB_CLEAN);
    17221722                pFeatures->fSvmFlusbByAsid          = RT_BOOL(pSvmLeaf->uEdx & X86_CPUID_SVM_FEATURE_EDX_FLUSH_BY_ASID);
    1723                 pFeatures->fSvmDecodeAssist         = RT_BOOL(pSvmLeaf->uEdx & X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSIST);
     1723                pFeatures->fSvmDecodeAssists        = RT_BOOL(pSvmLeaf->uEdx & X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSISTS);
    17241724                pFeatures->fSvmPauseFilter          = RT_BOOL(pSvmLeaf->uEdx & X86_CPUID_SVM_FEATURE_EDX_PAUSE_FILTER);
    17251725                pFeatures->fSvmPauseFilterThreshold = RT_BOOL(pSvmLeaf->uEdx & X86_CPUID_SVM_FEATURE_EDX_PAUSE_FILTER_THRESHOLD);
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r69535 r70254  
    16261626        HMSVM_REPORT_FEATURE("VMCB_CLEAN",             X86_CPUID_SVM_FEATURE_EDX_VMCB_CLEAN),
    16271627        HMSVM_REPORT_FEATURE("FLUSH_BY_ASID",          X86_CPUID_SVM_FEATURE_EDX_FLUSH_BY_ASID),
    1628         HMSVM_REPORT_FEATURE("DECODE_ASSIST",          X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSIST),
     1628        HMSVM_REPORT_FEATURE("DECODE_ASSISTS",         X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSISTS),
    16291629        HMSVM_REPORT_FEATURE("PAUSE_FILTER",           X86_CPUID_SVM_FEATURE_EDX_PAUSE_FILTER),
    16301630        HMSVM_REPORT_FEATURE("PAUSE_FILTER_THRESHOLD", X86_CPUID_SVM_FEATURE_EDX_PAUSE_FILTER_THRESHOLD),
     
    16501650     * SVM R0 code assumes if the decode-assist feature exists, NRIP feature exists too.
    16511651     */
    1652     AssertLogRelReturn(  !(pVM->hm.s.svm.u32Features & X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSIST)
     1652    AssertLogRelReturn(  !(pVM->hm.s.svm.u32Features & X86_CPUID_SVM_FEATURE_EDX_DECODE_ASSISTS)
    16531653                       || (pVM->hm.s.svm.u32Features & X86_CPUID_SVM_FEATURE_EDX_NRIP_SAVE),
    16541654                       VERR_HM_UNSUPPORTED_CPU_FEATURE_COMBO);
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