From: Borislav Petkov <bp@alien8.de>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Junichi Nomura <j-nomura@ce.jp.nec.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"hpa@zytor.com" <hpa@zytor.com>
Subject: Re: [PATCH 1/2] x86/CPU: Add native CPUID variants returning a single datum
Date: Sat, 31 Dec 2016 12:09:46 +0100 [thread overview]
Message-ID: <20161231110946.GA4789@nazgul.tnic> (raw)
In-Reply-To: <CALCETrUcaEyj3sDtEHSseJs5ZuKbX6sz_bskfmDH+WSKWf92qg@mail.gmail.com>
On Fri, Dec 30, 2016 at 06:13:24PM -0800, Andy Lutomirski wrote:
> Now you call it and ignore the return value and the compiler optimizes
> it out :)
Does it, really?
It is an inlined asm volatile. I checked all call sites and the CPUID
call is there. gcc 6 simply issues the CPUID and then later code
overwrites rAX. I.e., it looks ok to me.
Or what example scenario do you have in mind?
> Also, someone reading the code might scratch their head and
> wonder why you picked eax and not ebx, ecx, or edx.
We have comments for her/him :-)
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
next prev parent reply other threads:[~2016-12-31 11:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-28 4:39 [PATCH] x86: Fix Intel microcode revision detection Junichi Nomura
2016-12-28 11:18 ` Borislav Petkov
2016-12-28 11:20 ` [PATCH 1/2] x86/CPU: Add native CPUID variants returning a single datum Borislav Petkov
2016-12-28 18:11 ` Andy Lutomirski
2016-12-29 9:30 ` Borislav Petkov
2016-12-31 2:13 ` Andy Lutomirski
2016-12-31 11:09 ` Borislav Petkov [this message]
2017-01-03 18:35 ` Andy Lutomirski
2017-01-03 19:48 ` Borislav Petkov
2016-12-28 11:21 ` [PATCH 2/2] x86/microcode: Use native CPUID to tickle out microcode revision Borislav Petkov
2016-12-28 12:53 ` [PATCH 3/2] x86/microcode/intel: Add a helper which gives the " Borislav Petkov
2016-12-28 18:12 ` Andy Lutomirski
2016-12-29 9:36 ` Borislav Petkov
2016-12-28 19:26 ` Boris Ostrovsky
2016-12-29 9:38 ` Borislav Petkov
[not found] ` <0a84dd78-809f-c1ef-6adc-551a124170ad@ce.jp.nec.com>
2017-01-05 9:39 ` [PATCH] x86: Fix Intel microcode revision detection Borislav Petkov
2020-04-19 16:29 [PATCH 1/2] x86/CPU: Add native CPUID variants returning a single datum Evalds Iodzevics
2020-04-19 16:54 ` Greg KH
2020-04-20 5:52 ` Evalds Iodzevics
2020-04-20 6:07 ` Greg KH
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=20161231110946.GA4789@nazgul.tnic \
--to=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=j-nomura@ce.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@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
all inboxes | Powered by JetHome®