Re: [PATCH 3/4] KVM: VMX: Macrofy the MSR bitmap getters and setters

2021-03-17 Thread Sean Christopherson
On Wed, Mar 17, 2021, Paolo Bonzini wrote: > On 16/03/21 19:44, Sean Christopherson wrote: > > + return (ret)true; \ > > I'm not sure if (void)true is amazing or disgusting, but anyway... Definitely both. > >

Re: [PATCH 3/4] KVM: VMX: Macrofy the MSR bitmap getters and setters

2021-03-17 Thread Paolo Bonzini
On 16/03/21 19:44, Sean Christopherson wrote: + return (ret)true; \ I'm not sure if (void)true is amazing or disgusting, but anyway... +BUILD_VMX_MSR_BITMAP_HELPER(bool, test, read) +BUILD_VMX_MSR_BITMAP_HELPER(bool, test, write)

[PATCH 3/4] KVM: VMX: Macrofy the MSR bitmap getters and setters

2021-03-16 Thread Sean Christopherson
Add builder macros to generate the MSR bitmap helpers to reduce the amount of copy-paste code, especially with respect to all the magic numbers needed to calc the correct bit location. No functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/kvm/vmx/vmx.h | 82