lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bdb08cdf-11d1-464c-950e-07d39136a15a@suse.com>
Date: Thu, 24 Oct 2024 12:37:27 +0200
From: Jürgen Groß <jgross@...e.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org, kvm@...r.kernel.org,
 Paolo Bonzini <pbonzini@...hat.com>, Thomas Gleixner <tglx@...utronix.de>,
 Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
 Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] kvm/x86: simplify kvm_mmu_do_page_fault() a little bit

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

Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3684 bytes)

Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ