[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86972c56-4d2e-a6ab-11ad-c972a395386a@redhat.com>
Date: Wed, 13 Jan 2021 13:47:46 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Jason Baron <jbaron@...mai.com>,
Sean Christopherson <seanjc@...gle.com>
Cc: kvm@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, peterz@...radead.org, aarcange@...hat.com,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] KVM: x86: introduce definitions to support static
calls for kvm_x86_ops
On 13/01/21 05:12, Jason Baron wrote:
>>
> Looking at the vmx definitions I see quite a few that don't
> match that naming. For example:
>
> hardware_unsetup,
> hardware_enable,
> hardware_disable,
> report_flexpriority,
> update_exception_bitmap,
> enable_nmi_window,
> enable_irq_window,
> update_cr8_intercept,
> pi_has_pending_interrupt,
> cpu_has_vmx_wbinvd_exit,
> pi_update_irte,
> kvm_complete_insn_gp,
>
> So I'm not sure if we want to extend these macros to
> vmx/svm.
Don't do it yourself, but once you introduce the new header it becomes a
no-brainer to switch the declarations to use it. So let's plan the new
header to make that switch easy.
Using trailing commas unconditionally would be okay, i.e.
#define X86_OP(func) .func = vmx_##func,
#include "kvm-x86-ops.h"
and leave out the terminator/delimiter in kvm-x86-ops.h. This is
similar to how we use vmx/vmcs_shadow_fields.h:
#define SHADOW_FIELD_RO(x, y) { x, offsetof(struct vmcs12, y) },
#include "vmcs_shadow_fields.h"
#define SHADOW_FIELD_RW(x, y) case x:
#include "vmcs_shadow_fields.h"
Thanks,
Paolo
Powered by blists - more mailing lists