KVM: x86: Add helper to query if variable MTRR MSR is base (versus mask)
authorSean Christopherson <seanjc@google.com>
Thu, 11 May 2023 23:33:46 +0000 (16:33 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 1 Jun 2023 20:41:06 +0000 (13:41 -0700)
commitebda79e5057778be1ad8ed072e4229894dfc66b7
tree7b17196e7431649e7beeadd849a94f92bc2426f4
parent7aeae027611ff27f13a32e19736c8fd06e41786c
KVM: x86: Add helper to query if variable MTRR MSR is base (versus mask)

Add a helper to query whether a variable MTRR MSR is a base versus as mask
MSR.  Replace the unnecessarily complex math with a simple check on bit 0;
base MSRs are even, mask MSRs are odd.

Link: https://lore.kernel.org/r/20230511233351.635053-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mtrr.c