Re: [PATCH 02/17] KVM: monolithic: x86: convert the kvm_x86_ops methods to external functions

From: Paolo Bonzini
Date: Mon Sep 23 2019 - 12:51:49 EST


On 23/09/19 18:13, Sean Christopherson wrote:
> Alternatively, what if we use macros in the call sites, e.g. keep/require
> vmx_ and svm_ prefixes for all functions, renaming VMX and SVM code as
> needed? E.g.:
>
>
> #define X86_OP(name) kvm_x86_vendor##_##name
>
> int kvm_arch_init(void *opaque)
> {
> if (X86_OP(supported_by_cpu())) {

Please no, the extra parentheses would be a mess to review.

Paolo