Commit b76edfe
KVM: x86: cleanup enter_rmode()
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: Zhenzhong Duan <zhenzhong.duan@intel.com>
Message-Id: <20220311102643.807507-2-zhenzhong.duan@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 8809931 commit b76edfe
1 file changed
Lines changed: 5 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2866 | 2866 | | |
2867 | 2867 | | |
2868 | 2868 | | |
2869 | | - | |
2870 | 2869 | | |
2871 | 2870 | | |
2872 | | - | |
| 2871 | + | |
2873 | 2872 | | |
2874 | 2873 | | |
2875 | 2874 | | |
2876 | | - | |
2877 | | - | |
2878 | | - | |
2879 | | - | |
2880 | | - | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
2881 | 2879 | | |
2882 | | - | |
2883 | | - | |
2884 | 2880 | | |
2885 | 2881 | | |
2886 | 2882 | | |
| |||
0 commit comments