mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
KVM: VMX: Use cached vcpu_vmx pointer in MSR and segment helpers
vmx_get_msr() and vmx_set_msr() already cache to_vmx(vcpu) in a local 'vmx' pointer, but a few cases still open-code to_vmx(vcpu). Use the cached pointer for consistency. Likewise, cache to_vmx(vcpu) in vmx_get_segment_base() instead of open-coding it in both the real-mode check and the VMCS read path. No functional change intended. Signed-off-by: Hao Zhang <zhanghao1@kylinos.cn> Link: https://patch.msgid.link/tencent_A78DC401911634111A3391650CB00FCD0409@qq.com Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
parent
a204badd84
commit
6978adcc3e
1 changed files with 7 additions and 6 deletions
Loading…
Add table
Add a link
Reference in a new issue