mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-07-27 06:18:13 +00:00
189ce92b4c
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
44 lines
1.4 KiB
Diff
44 lines
1.4 KiB
Diff
From 7a3402ddb979d26b777cc6f99824881af9362e8d Mon Sep 17 00:00:00 2001
|
|
From: Andi Kleen <andi@firstfloor.org>
|
|
Date: Fri, 19 Nov 2010 13:16:22 +0100
|
|
Subject: [PATCH 098/117] MCE: Fix vm86 handling for 32bit mce handler
|
|
|
|
commit a129a7c84582629741e5fa6f40026efcd7a65bd4 upstream.
|
|
|
|
When running on 32bit the mce handler could misinterpret
|
|
vm86 mode as ring 0. This can affect whether it does recovery
|
|
or not; it was possible to panic when recovery was actually
|
|
possible.
|
|
|
|
Fix this by always forcing vm86 to look like ring 3.
|
|
|
|
Signed-off-by: Andi Kleen <ak@linux.intel.com>
|
|
Signed-off-by: Tony Luck <tony.luck@intel.com>
|
|
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
|
---
|
|
arch/x86/kernel/cpu/mcheck/mce.c | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
|
|
index 2af127d..b0f1271 100644
|
|
--- a/arch/x86/kernel/cpu/mcheck/mce.c
|
|
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
|
|
@@ -389,6 +389,14 @@ static inline void mce_gather_info(struct mce *m, struct pt_regs *regs)
|
|
if (m->mcgstatus & (MCG_STATUS_RIPV|MCG_STATUS_EIPV)) {
|
|
m->ip = regs->ip;
|
|
m->cs = regs->cs;
|
|
+
|
|
+ /*
|
|
+ * When in VM86 mode make the cs look like ring 3
|
|
+ * always. This is a lie, but it's better than passing
|
|
+ * the additional vm86 bit around everywhere.
|
|
+ */
|
|
+ if (v8086_mode(regs))
|
|
+ m->cs |= 3;
|
|
}
|
|
/* Use accurate RIP reporting if available. */
|
|
if (rip_msr)
|
|
--
|
|
1.7.9.5
|
|
|