From: Paolo Bonzini <pbonzini@redhat.com>
To: Jason Baron <jbaron@akamai.com>, Sean Christopherson <seanjc@google.com>
Cc: kvm@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, peterz@infradead.org, aarcange@redhat.com,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] KVM: x86: introduce definitions to support static calls for kvm_x86_ops
Date: Wed, 13 Jan 2021 13:47:46 +0100 [thread overview]
Message-ID: <86972c56-4d2e-a6ab-11ad-c972a395386a@redhat.com> (raw)
In-Reply-To: <1784355c-e53e-5363-31e3-faeba4ba9e8f@akamai.com>
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
next prev parent reply other threads:[~2021-01-13 12:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 16:57 [PATCH 0/2] Use static_call for kvm_x86_ops Jason Baron
2021-01-11 16:57 ` [PATCH 1/2] KVM: x86: introduce definitions to support static calls " Jason Baron
2021-01-12 23:04 ` Sean Christopherson
2021-01-13 4:12 ` Jason Baron
2021-01-13 12:47 ` Paolo Bonzini [this message]
2021-01-13 16:29 ` Sean Christopherson
2021-01-13 12:53 ` Paolo Bonzini
2021-01-13 16:16 ` Jason Baron
2021-01-13 16:30 ` Jason Baron
2021-01-13 17:02 ` Paolo Bonzini
2021-01-13 17:11 ` Sean Christopherson
2021-01-13 17:17 ` Sean Christopherson
2021-01-11 16:57 ` [PATCH 2/2] KVM: x86: use static calls to reduce kvm_x86_ops overhead Jason Baron
2021-01-11 17:31 ` [PATCH 0/2] Use static_call for kvm_x86_ops Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86972c56-4d2e-a6ab-11ad-c972a395386a@redhat.com \
--to=pbonzini@redhat.com \
--cc=aarcange@redhat.com \
--cc=bp@alien8.de \
--cc=jbaron@akamai.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).