Re: Geode LX boot fails after x86 microcode revision change

From: Borislav Petkov
Date: Tue Nov 22 2011 - 08:00:55 EST


On Tue, Nov 08, 2011 at 02:19:29PM -0800, H. Peter Anvin wrote:
> > If so, then a family check is unavoidable.
>
> Either that, or make changes so that we can handle exceptions earlier.
> That would be useful for other reasons.

Well, I did some experimenting with this by forcing a guest to #GP on a
rdmsr in kvm. What I got was the early_idt_handler's panic message:

"PANIC: early exception %02lx rip %lx:%lx error %lx cr2 %lx\n"

because of the following boot code flow:

x86_64_start_kernel
|-> ... set_intr_gate /* register early_idt_handler */
|-> x86_64_start_reservations
|-> start_kernel
|-> setup_arch
|-> early_cpu_init() /*
* this is where we need the extable for
* rdmsr_safe
*/
...
|-> trap_init() /* switch to default #GP handler */

and do_general_protection does the actual exception fixup. Now, the
whole setup_arch() is running with the initial traps and only after we
finish it and a bunch of other stuff, we switch to the #GP handler in
trap_init().

>From where I stand, maybe I could try to teach the early_idt_handler in
head_64.S to do fixup_exception() ?

Also, we might need the patches which sort extable at build time too,
which are floating around lkml currently.

Hmm...

--
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/