]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Fold vmx_supported_debugctl() into vcpu_supported_debugctl()
authorSean Christopherson <seanjc@google.com>
Thu, 6 Oct 2022 00:03:09 +0000 (00:03 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 2 Nov 2022 17:18:18 +0000 (13:18 -0400)
commitd54e935586e6f3bfe6082e2b494d8c5f9816f035
tree6c01ef0672ed6a5b5c55d5e8a7b09df83e8a5d6f
parente22e7d2bbfc36c53a7a0151652e884bbc41ead59
KVM: VMX: Fold vmx_supported_debugctl() into vcpu_supported_debugctl()

Fold vmx_supported_debugctl() into vcpu_supported_debugctl(), its only
caller.  Setting bits only to clear them a few instructions later is
rather silly, and splitting the logic makes things seem more complicated
than they actually are.

Opportunistically drop DEBUGCTLMSR_LBR_MASK now that there's a single
reference to the pair of bits.  The extra layer of indirection provides
no meaningful value and makes it unnecessarily tedious to understand
what KVM is doing.

No functional change.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20221006000314.73240-4-seanjc@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/capabilities.h
arch/x86/kvm/vmx/vmx.c