mbox series

[0/2] KVM: x86: X86_FEATURE bit() cleanup

Message ID 20191211175822.1925-1-sean.j.christopherson@intel.com (mailing list archive)
Headers show
Series KVM: x86: X86_FEATURE bit() cleanup | expand

Message

Sean Christopherson Dec. 11, 2019, 5:58 p.m. UTC
Small series to add build-time protections on reverse CPUID lookup (and
other usages of bit()), and to rename the misleading-generic bit() helper
to something that better conveys its purpose.

Sean Christopherson (2):
  KVM: x86: Add build-time assertion on usage of bit()
  KVM: x86: Refactor and rename bit() to feature_bit() macro

 arch/x86/kvm/cpuid.c   |  2 +-
 arch/x86/kvm/cpuid.h   |  4 ++--
 arch/x86/kvm/emulate.c |  8 +++-----
 arch/x86/kvm/svm.c     |  4 ++--
 arch/x86/kvm/vmx/vmx.c | 42 +++++++++++++++++++++---------------------
 arch/x86/kvm/x86.h     | 24 ++++++++++++++++++++++--
 6 files changed, 51 insertions(+), 33 deletions(-)

Comments

Sean Christopherson Dec. 14, 2019, 3:35 a.m. UTC | #1
On Wed, Dec 11, 2019 at 09:58:20AM -0800, Sean Christopherson wrote:
> Small series to add build-time protections on reverse CPUID lookup (and
> other usages of bit()), and to rename the misleading-generic bit() helper
> to something that better conveys its purpose.

Paolo, please don't merge this even though Jim's feedback was minor, I
have a revamped version that I'll send out next week.  Thanks!