diff options
author | Sean Christopherson <sean.j.christopherson@intel.com> | 2019-12-17 22:32:39 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-01-21 13:58:27 +0100 |
commit | a0a2260c12d8658e522f21ed8ece72bbdede58fd (patch) | |
tree | 4e6943b2aea4e0d6eed77c8718186c8ef9dbeb84 /arch/x86/kvm/x86.h | |
parent | KVM: x86: Add dedicated emulator helpers for querying CPUID features (diff) | |
download | linux-a0a2260c12d8658e522f21ed8ece72bbdede58fd.tar.xz linux-a0a2260c12d8658e522f21ed8ece72bbdede58fd.zip |
KVM: x86: Move bit() helper to cpuid.h
Move bit() to cpuid.h in preparation for incorporating the reverse_cpuid
array in bit() build-time assertions. Opportunistically use the BIT()
macro instead of open-coding the shift.
No functional change intended.
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.h')
-rw-r--r-- | arch/x86/kvm/x86.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h index 9805cf2c6b35..ab715cee3653 100644 --- a/arch/x86/kvm/x86.h +++ b/arch/x86/kvm/x86.h @@ -144,11 +144,6 @@ static inline bool is_pae_paging(struct kvm_vcpu *vcpu) return !is_long_mode(vcpu) && is_pae(vcpu) && is_paging(vcpu); } -static inline u32 bit(int bitno) -{ - return 1 << (bitno & 31); -} - static inline u8 vcpu_virt_addr_bits(struct kvm_vcpu *vcpu) { return kvm_read_cr4_bits(vcpu, X86_CR4_LA57) ? 57 : 48; |