lkml.org 
[lkml]   [2018]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4.1 63/65] kpti: Disable when running under Xen PV
Date
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.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@oracle.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
\
 
 \ /
  Last update: 2018-03-06 01:28    [W:0.306 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site