From: "Jürgen Groß" <jgross@suse.com>
To: Sean Christopherson <seanjc@google.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] kvm/x86: simplify kvm_mmu_do_page_fault() a little bit
Date: Thu, 24 Oct 2024 12:37:27 +0200 [thread overview]
Message-ID: <bdb08cdf-11d1-464c-950e-07d39136a15a@suse.com> (raw)
In-Reply-To: <ZxfaU9cCS6556AKg@google.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 879 bytes --]
On 22.10.24 19:01, Sean Christopherson wrote:
> On Tue, Oct 22, 2024, Juergen Gross wrote:
>> Testing whether to call kvm_tdp_page_fault() or
>> vcpu->arch.mmu->page_fault() doesn't make sense, as kvm_tdp_page_fault()
>> is selected only if vcpu->arch.mmu->page_fault == kvm_tdp_page_fault.
>
> It does when retpolines are enabled and significantly inflate the cost of the
> indirect call. This is a hot path in various scenarios, but KVM can't use
> static_call() to avoid the retpoline due to mmu->page_fault being a property of
> the current vCPU. Only kvm_tdp_page_fault() is special cased because all other
> mmu->page_fault targets are slow-ish and/or we don't care terribly about their
> performance.
Fair enough. :-)
I'll modify the patch to add a comment in this regard in order to avoid
similar simplification attempts in the future.
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
prev parent reply other threads:[~2024-10-24 10:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 10:08 [PATCH] kvm/x86: simplify kvm_mmu_do_page_fault() a little bit Juergen Gross
2024-10-22 17:01 ` Sean Christopherson
2024-10-24 10:37 ` Jürgen Groß [this message]
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=bdb08cdf-11d1-464c-950e-07d39136a15a@suse.com \
--to=jgross@suse.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--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