]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: nVMX: Use vmx_segment_cache_clear() instead of open coded equivalent
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 25 Jul 2024 17:52:31 +0000 (13:52 -0400)
committerSean Christopherson <seanjc@google.com>
Thu, 22 Aug 2024 18:35:17 +0000 (11:35 -0700)
commit41ab0d59faa9532bbd37c91b03a8e9fb0215d67c
tree89daed391a626163f3030dc5fd2f768068489a33
parent653ea4489e6989f14a87abf8653f77c089097326
KVM: nVMX: Use vmx_segment_cache_clear() instead of open coded equivalent

In prepare_vmcs02_rare(), call vmx_segment_cache_clear() instead of
setting segment_cache.bitmask directly.  Using the helper minimizes the
chances of prepare_vmcs02_rare() doing the wrong thing in the future, e.g.
if KVM ends up doing more than just zero the bitmask when purging the
cache.

No functional change intended.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20240725175232.337266-2-mlevitsk@redhat.com
[sean: massage changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h