• Zhenzhong Duan's avatar
    KVM: x86: cleanup enter_rmode() · b76edfe9
    Zhenzhong Duan authored
    vmx_set_efer() sets uret->data but, in fact if the value of uret->data
    will be used vmx_setup_uret_msrs() will have rewritten it with the value
    returned by update_transition_efer().  uret->data is consumed if and only
    if uret->load_into_hardware is true, and vmx_setup_uret_msrs() takes care
    of (a) updating uret->data before setting uret->load_into_hardware to true
    (b) setting uret->load_into_hardware to false if uret->data isn't updated.
    
    Opportunistically use "vmx" directly instead of redoing to_vmx().
    Signed-off-by: default avatarZhenzhong Duan <zhenzhong.duan@intel.com>
    Message-Id: <20220311102643.807507-2-zhenzhong.duan@intel.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    b76edfe9
vmx.c 232 KB