From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/3] KVM: x86: Convert nested ops to static calls
Date: Tue, 30 Jun 2026 13:28:25 -0700 [thread overview]
Message-ID: <20260630202828.440724-1-seanjc@google.com> (raw)
Convert nested_ops to use static calls, mainly because the nested ops are
bizarrely different than the x86 and PMU ops, and the kvm_x86_ops.nested_ops->
code is an eyesore (IMO). I haven't bothered to do any performance testing.
v2: In patch 1, keep the get_evmcs_version != NULL check in kvm_get_hv_cpuid(),
then convert it to a RET0 call in patch 2. [Sashiko]
v1: https://lore.kernel.org/all/20260625233846.3407303-1-seanjc@google.com
Sean Christopherson (3):
KVM: x86: Reject nested CAP enablement if nested virtualization is
disabled
KVM: x86: Add static calls for nested virtualization ops
KVM: x86: Move nested_ops out of kvm_x86_ops, to global kvm_nested_ops
arch/x86/include/asm/kvm-x86-nested-ops.h | 36 +++++++++++++
arch/x86/include/asm/kvm_host.h | 14 ++++-
arch/x86/kvm/hyperv.c | 6 +--
arch/x86/kvm/mmu.h | 5 +-
arch/x86/kvm/mmu/paging_tmpl.h | 2 +-
arch/x86/kvm/svm/nested.c | 2 +-
arch/x86/kvm/svm/svm.c | 4 +-
arch/x86/kvm/vmx/main.c | 3 +-
arch/x86/kvm/vmx/nested.c | 2 +-
arch/x86/kvm/vmx/vmx.c | 1 +
arch/x86/kvm/x86.c | 66 +++++++++++++++--------
arch/x86/kvm/x86.h | 2 +-
12 files changed, 104 insertions(+), 39 deletions(-)
create mode 100644 arch/x86/include/asm/kvm-x86-nested-ops.h
base-commit: a204badd8432f93b7e862e7dac6db0fe3d65f370
--
2.55.0.rc0.799.gd6f94ed593-goog
next reply other threads:[~2026-06-30 20:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 20:28 Sean Christopherson [this message]
2026-06-30 20:28 ` [PATCH v2 1/3] KVM: x86: Reject nested CAP enablement if nested virtualization is disabled Sean Christopherson
2026-07-10 12:56 ` Vitaly Kuznetsov
2026-06-30 20:28 ` [PATCH v2 2/3] KVM: x86: Add static calls for nested virtualization ops Sean Christopherson
2026-06-30 20:28 ` [PATCH v2 3/3] KVM: x86: Move nested_ops out of kvm_x86_ops, to global kvm_nested_ops Sean Christopherson
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=20260630202828.440724-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=vkuznets@redhat.com \
/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