x86/hyperv: Avoid reporting bogus NMI status for Gen2 instances
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 15 Apr 2016 13:50:32 +0000 (15:50 +0200)
committerIngo Molnar <mingo@kernel.org>
Sat, 16 Apr 2016 09:18:21 +0000 (11:18 +0200)
commit1e2ae9ec072f3b7887f456426bc2cf23b80f661a
treec462934c0d65342f0bfd265920c55e17fa2e7fcd
parent2e572599139d27db3aaf540b0d34f0a4f58dfca1
x86/hyperv: Avoid reporting bogus NMI status for Gen2 instances

Generation2 instances don't support reporting the NMI status on port 0x61,
read from there returns 'ff' and we end up reporting nonsensical PCI
error (as there is no PCI bus in these instances) on all NMIs:

    NMI: PCI system error (SERR) for reason ff on CPU 0.
    Dazed and confused, but trying to continue

Fix the issue by overriding x86_platform.get_nmi_reason. Use 'booted on
EFI' flag to detect Gen2 instances.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Cathy Avery <cavery@redhat.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: devel@linuxdriverproject.org
Link: http://lkml.kernel.org/r/1460728232-31433-1-git-send-email-vkuznets@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/mshyperv.c