lkml.org 
[lkml]   [2022]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 14/14] KVM: nVMX: Use cached host MSR_IA32_VMX_MISC value for setting up nested MSR
    Date
    vmcs_config has cased host MSR_IA32_VMX_MISC value, use it for setting
    up nested MSR_IA32_VMX_MISC in nested_vmx_setup_ctls_msrs() and avoid the
    redundant rdmsr().

    No (real) functional change intended.

    Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
    ---
    arch/x86/kvm/vmx/nested.c | 5 +----
    1 file changed, 1 insertion(+), 4 deletions(-)

    diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
    index c88a9c6b4606..a35b28261d31 100644
    --- a/arch/x86/kvm/vmx/nested.c
    +++ b/arch/x86/kvm/vmx/nested.c
    @@ -6723,10 +6723,7 @@ void nested_vmx_setup_ctls_msrs(struct vmcs_config *vmcs_conf, u32 ept_caps)
    msrs->secondary_ctls_high |= SECONDARY_EXEC_ENCLS_EXITING;

    /* miscellaneous data */
    - rdmsr(MSR_IA32_VMX_MISC,
    - msrs->misc_low,
    - msrs->misc_high);
    - msrs->misc_low &= VMX_MISC_SAVE_EFER_LMA;
    + msrs->misc_low = (u32)vmcs_conf->misc & VMX_MISC_SAVE_EFER_LMA;
    msrs->misc_low |=
    MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS |
    VMX_MISC_EMULATED_PREEMPTION_TIMER_RATE |
    --
    2.35.3
    \
     
     \ /
      Last update: 2022-06-27 18:06    [W:4.133 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site