[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180306002538.1761-64-pasha.tatashin@oracle.com>
Date: Mon, 5 Mar 2018 19:25:36 -0500
From: Pavel Tatashin <pasha.tatashin@...cle.com>
To: steven.sistare@...cle.com, daniel.m.jordan@...cle.com,
linux-kernel@...r.kernel.org, Alexander.Levin@...rosoft.com,
dan.j.williams@...el.com, sathyanarayanan.kuppuswamy@...el.com,
pankaj.laxminarayan.bharadiya@...el.com, akuster@...sta.com,
cminyard@...sta.com, pasha.tatashin@...cle.com,
gregkh@...uxfoundation.org, stable@...r.kernel.org
Subject: [PATCH 4.1 63/65] kpti: Disable when running under Xen PV
From: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Very very partial backport from aa8c6248f8c75 where
there is a check to see if this is an Xen PV guest - and
if so disable it.
The reason is that the PV ABI would require a major
overhaul to be Meltdown resistent.
Instead there are mitigations (PV in HVM) which are far more
suitable.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
---
arch/x86/mm/kaiser.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/mm/kaiser.c b/arch/x86/mm/kaiser.c
index 50783ad4861d..05fb616c9e2a 100644
--- a/arch/x86/mm/kaiser.c
+++ b/arch/x86/mm/kaiser.c
@@ -10,6 +10,7 @@
#include <linux/mm.h>
#include <linux/uaccess.h>
#include <linux/ftrace.h>
+#include <xen/xen.h>
#include <asm/kaiser.h>
#include <asm/tlbflush.h> /* to verify its kaiser declarations */
@@ -264,6 +265,9 @@ void __init kaiser_check_boottime_disable(void)
char arg[5];
int ret;
+ if (xen_pv_domain())
+ goto disable;
+
ret = cmdline_find_option(boot_command_line, "pti", arg, sizeof(arg));
if (ret > 0) {
if (!strncmp(arg, "on", 2))
--
2.16.2
Powered by blists - more mailing lists