From: Borislav Petkov <bp@alien8.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Nadav Amit" <nadav.amit@gmail.com>,
"Andy Lutomirski" <luto@amacapital.net>,
"Peter Zijlstra" <peterz@infradead.org>,
"H. Peter Anvin" <hpa@zytor.com>,
"Ingo Molnar" <mingo@redhat.com>,
"Joerg Roedel" <joro@8bytes.org>,
kvm@vger.kernel.org, "Radim Krčmář" <rkrcmar@redhat.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
x86@kernel.org
Subject: Re: [PATCH 3/5] x86/kvm: Convert some slow-path static_cpu_has() callers to boot_cpu_has()
Date: Sun, 31 Mar 2019 17:12:48 +0200 [thread overview]
Message-ID: <20190331151248.GB15073@zn.tnic> (raw)
In-Reply-To: <2f71cb35-46b2-9ed5-28b3-c6eb5e647b46@redhat.com>
On Sun, Mar 31, 2019 at 04:20:11PM +0200, Paolo Bonzini wrote:
> These are not slow path.
Those functions do a *lot* of stuff like a bunch of MSR reads which are
tens of cycles each at least.
I don't think a RIP-relative MOV and a BT:
movq boot_cpu_data+20(%rip), %rax # MEM[(const long unsigned int *)&boot_cpu_data + 20B], _45
btq $59, %rax #, _45
are at all noticeable.
On latest AMD and Intel uarch those are 2-4 cycles, according to
https://agner.org/optimize/instruction_tables.ods
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
next prev parent reply other threads:[~2019-03-31 15:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190330112022.28888-1-bp@alien8.de>
2019-03-30 11:20 ` [PATCH 3/5] x86/kvm: Convert some slow-path static_cpu_has() callers to boot_cpu_has() Borislav Petkov
2019-03-31 14:20 ` Paolo Bonzini
2019-03-31 15:12 ` Borislav Petkov [this message]
2019-04-01 7:24 ` Paolo Bonzini
2019-04-01 7:33 ` Borislav Petkov
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=20190331151248.GB15073@zn.tnic \
--to=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=nadav.amit@gmail.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rkrcmar@redhat.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