Re: [PATCH 2/5] perf, x86, uncore: Add Haswell-EP uncore support

From: Alexei Starovoitov
Date: Mon Oct 27 2014 - 16:13:54 EST


On Mon, Oct 27, 2014 at 4:57 AM, Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
> Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> writes:
>> my E5-1630 v3 crashes hard during boot in
>> snbep_uncore_msr_init_box()+0x3c
>
>> I don't have a setup to capture the screen so early in the boot.
>> So this is just heads up.
>
> Is it a general general protection fault or a page fault?
>
> If it's a page fault please post the disassembled code:
>
> gdb vmlinux
> disassemble snbep_uncore_msr_init_box
>

snbep_uncore_msr_init_box() is called with:
[ 1.055678] msr 0
[ 1.056027] msr 3584
[ 1.056376] msr 3600
[ 1.056725] msr 3616
[ 1.057074] msr 3632
[ 1.057424] msr 1824
[ 1.057773] msr 1834
[ 1.058123] msr 1844
[ 1.058473] msr 1854
[ 1.058822] msr 1808

since msr 3584 is HSWEP_C0_MSR_PMON_BOX_CTL
I've tried the following workaround which helped as well:
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
index adf138eac85c..1ca46523a541 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c
@@ -368,7 +368,7 @@ static void snbep_uncore_msr_init_box(struct
intel_uncore_box *box)
{
unsigned msr = uncore_msr_box_ctl(box);

- if (msr)
+ if (msr && msr >= 3584)
wrmsrl(msr, SNBEP_PMON_BOX_CTL_INT);
}
--
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/