Re: [PATCH v3 2/6] KVM: VMX: Extend BUILD_CONTROLS_SHADOW macro to support 64-bit variation
From: Sean Christopherson
Date: Fri Aug 06 2021 - 12:31:05 EST
On Fri, Aug 06, 2021, Paolo Bonzini wrote:
> On 06/08/21 00:32, Sean Christopherson wrote:
> > > -BUILD_CONTROLS_SHADOW(vm_entry, VM_ENTRY_CONTROLS)
> > > -BUILD_CONTROLS_SHADOW(vm_exit, VM_EXIT_CONTROLS)
> > > -BUILD_CONTROLS_SHADOW(pin, PIN_BASED_VM_EXEC_CONTROL)
> > > -BUILD_CONTROLS_SHADOW(exec, CPU_BASED_VM_EXEC_CONTROL)
> > > -BUILD_CONTROLS_SHADOW(secondary_exec, SECONDARY_VM_EXEC_CONTROL)
> > > +BUILD_CONTROLS_SHADOW(vm_entry, VM_ENTRY_CONTROLS, 32)
> > > +BUILD_CONTROLS_SHADOW(vm_exit, VM_EXIT_CONTROLS, 32)
> > > +BUILD_CONTROLS_SHADOW(pin, PIN_BASED_VM_EXEC_CONTROL, 32)
> > > +BUILD_CONTROLS_SHADOW(exec, CPU_BASED_VM_EXEC_CONTROL, 32)
> > > +BUILD_CONTROLS_SHADOW(secondary_exec, SECONDARY_VM_EXEC_CONTROL, 32)
> > > +BUILD_CONTROLS_SHADOW(tertiary_exec, TERTIARY_VM_EXEC_CONTROL, 64)
> >
> > This fails to compile because all the TERTIARY collateral is in a later patch.
> >
> > I think I'd also prefer hiding the 32/64 param via more macros, e.g.
> >
> > #define __BUILD_CONTROLS_SHADOW(lname, uname, bits) \
>
> No, please don't. :) Also because the 64 bit version is used only once.
LOL, fine. I'm beginning to think you have a filter for "macros" that sounds off
alarms and flashing lights ;-)