From: Hugh Dickins <hugh@veritas.com>
To: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Rusty Russell <rusty@rustcorp.com.au>,
Andreas Herrmann <andreas.herrmann3@amd.com>,
Peter Oruba <peter.oruba@amd.com>,
Arjan van de Ven <arjan@infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86 microcode: work_on_cpu and cleanup of the synchronization logic
Date: Thu, 23 Apr 2009 19:03:32 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0904231807370.7545@blonde.anvils> (raw)
In-Reply-To: <b647ffbd0904230155t61578496pf75fb79e54def3a3@mail.gmail.com>
On Thu, 23 Apr 2009, Dmitry Adamushko wrote:
> 2009/4/23 Ingo Molnar <mingo@elte.hu>:
> > * Dmitry Adamushko <dmitry.adamushko@gmail.com> wrote:
> >
> >> Version 3
> >>
> >> diff with v.2
> >>
> >> - use smp_call_function_single() instead of work_on_cpu() as suggested by Ingo;
> >> - add 'enum ucode_state' as return value of request_microcode_{fw,user}
> >> - minor cleanups
> >
> > This version looks really nice structurally.
Yes, it looks the right way to go to me too.
> > What type of testing have you done on the patch, on what CPU type?
>
> Quite limited testing. It looks like there is no newer ucode availble
> for my dual-core Intel Core2 Duo (Thinkpad R60) so what I did is as
> follows:
>
> - change update_match_revision() in microcode_intel.c in a way that
> allows loading of a ucode with a revision == the current revision
> (rev. 0x57 in my case). From the POV of the microcode module it
> nevertheless looks like an update;
My P4 Xeon and Core2s and Atom all want newer microcode from the
latest microcode.dat, and your version seems to work fine on them.
>
> - update via /dev/microcode (CONFIG_MICROCODE_OLD_INTERFACE) with a .dat file;
>
> - suspend -> resume (reload of ucode via cpu-callbacks)
>
> These tests worked for me.
Yes, and I've also tried #if 0'ing the MICROCODE_OLD_INTERFACE code,
converting the microcode.dat to binary, and placing that in
/lib/firmware/intel-ucode/06-0f-0a or wherever: the firmware
interface seems to be working too.
>
> Obviously, it'd be nice if more people could give it a try (e.g.
> update with a firmware image and also on AMD - although the changes in
> microcode_amd.c are quite straightforward).
But like you I don't have an AMD to test.
And just like last time I came here, I find there are more alternative
ways through all this than I'm familiar with, and have time to test:
device versus firmware, Intel versus AMD, startup versus resume versus
online, builtin versus modular. I get easily confused without more
time to spend on it.
That SYSTEM_RUNNING test you've flagged with "--dimm. Review this case":
yes, that's still necessary for when CONFIG_MICROCODE=y (and no initrd?),
as I have - trying to get the firmware at that point will hang. I did
try changing module_init(microcode_init) to late_initcall(microcode_init),
but that didn't solve it. And skipping out at that point does leave CPU0
not updated. But you've not made anything worse there, and most people
will have CONFIG_MICROCODE=m.
>
> p.s. argh... just noticed that the following line is redundant in
> microcode_core.c (forgot to remove it)
>
> +enum { UCODE_UPDATE_ERR, UCODE_UPDATE_OK, UCODE_UPDATE_NAVAIL };
A couple of things that worried me.
I guess your mutex Synchronization works out, but are interrupts
still disabled around the critical wrmsr()s, wherever they're getting
called from?
And you've a habit of returning -1 in error cases, which later gets
muddled in with errnos, so that it would amount to -EPERM, which is
probably not what you want.
Hugh
next prev parent reply other threads:[~2009-04-23 18:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-20 20:16 Dmitry Adamushko
2009-04-21 8:29 ` Ingo Molnar
2009-04-21 20:07 ` Dmitry Adamushko
2009-04-21 20:09 ` Dmitry Adamushko
2009-04-22 10:18 ` Ingo Molnar
2009-04-22 10:33 ` Dmitry Adamushko
2009-04-22 10:36 ` Ingo Molnar
2009-04-22 10:34 ` Ingo Molnar
2009-04-22 22:24 ` Dmitry Adamushko
2009-04-23 8:27 ` Ingo Molnar
2009-04-23 8:55 ` Dmitry Adamushko
2009-04-23 18:03 ` Hugh Dickins [this message]
2009-04-23 22:16 ` Dmitry Adamushko
2009-04-24 12:23 ` Hugh Dickins
2009-04-24 14:11 ` Dmitry Adamushko
2009-04-24 15:30 ` Hugh Dickins
2009-04-24 17:01 ` Dmitry Adamushko
2009-04-24 18:00 ` Hugh Dickins
2009-04-25 10:30 ` Dmitry Adamushko
2009-05-06 22:30 ` Dmitry Adamushko
2009-05-07 8:08 ` Dmitry Adamushko
2009-05-11 21:48 ` [PATCH, -tip] x86 microcode: smp_call_function_single() instead of set_cpus_allowed, cleanup of sync. logic Dmitry Adamushko
2009-05-12 8:27 ` [tip:x86/microcode] x86: microcode: use smp_call_function_single instead of set_cpus_allowed, cleanup of synchronization logic tip-bot for Dmitry Adamushko
2009-05-12 8:39 ` tip-bot for Dmitry Adamushko
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=Pine.LNX.4.64.0904231807370.7545@blonde.anvils \
--to=hugh@veritas.com \
--cc=akpm@linux-foundation.org \
--cc=andreas.herrmann3@amd.com \
--cc=arjan@infradead.org \
--cc=dmitry.adamushko@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peter.oruba@amd.com \
--cc=rusty@rustcorp.com.au \
/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®