From: Paolo Bonzini Date: Mon, 23 Mar 2020 19:47:04 +0000 Subject: Re: [PATCH v3 2/9] KVM: x86: Move init-only kvm_x86_ops to separate struct Message-Id: <30b847cf-98db-145f-8aa0-a847146d5649@redhat.com> List-Id: References: <20200321202603.19355-1-sean.j.christopherson@intel.com> <20200321202603.19355-3-sean.j.christopherson@intel.com> <87lfnr9sqn.fsf@vitty.brq.redhat.com> <20200323152909.GE28711@linux.intel.com> <87o8sn82ef.fsf@vitty.brq.redhat.com> In-Reply-To: <87o8sn82ef.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Vitaly Kuznetsov , Sean Christopherson Cc: Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Wanpeng Li , Jim Mattson , Joerg Roedel , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org On 23/03/20 17:24, Vitaly Kuznetsov wrote: > Sounds cool! (not sure that with only two implementations people won't > call it 'over-engineered' but cool). Yes, something like #define KVM_X86_OP(name) .name = vmx_##name (svm_##name for svm.c) and then KVM_X86_OP(check_nested_events) etc. > My personal wish would just be that > function names in function implementations are not auto-generated so > e.g. a simple 'git grep vmx_hardware_setup' works Yes, absolutely; the function names would still be written by hand. Paolo > but the way how we > fill vmx_x86_ops in can be macroed I guess.