[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ef8a0ef95c2b17c21066e5f28ea56b58bf7eaa82.1511770314.git.jan.kiszka@siemens.com>
Date: Mon, 27 Nov 2017 09:11:52 +0100
From: Jan Kiszka <jan.kiszka@...mens.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>
Cc: x86@...nel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
jailhouse-dev@...glegroups.com
Subject: [PATCH v2 10/12] x86/jailhouse: Halt instead of failing to restart
From: Jan Kiszka <jan.kiszka@...mens.com>
Jailhouse provides no guest-initiated restart. So, do not even try to.
Signed-off-by: Jan Kiszka <jan.kiszka@...mens.com>
---
arch/x86/kernel/jailhouse.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/kernel/jailhouse.c b/arch/x86/kernel/jailhouse.c
index 36feb0e4b4fe..c8ee638b6bce 100644
--- a/arch/x86/kernel/jailhouse.c
+++ b/arch/x86/kernel/jailhouse.c
@@ -12,10 +12,12 @@
#include <linux/acpi_pmtmr.h>
#include <linux/kernel.h>
+#include <linux/reboot.h>
#include <asm/apic.h>
#include <asm/cpu.h>
#include <asm/hypervisor.h>
#include <asm/i8259.h>
+#include <asm/reboot.h>
#include <asm/setup.h>
static __initdata struct jailhouse_setup_data setup_data;
@@ -79,6 +81,12 @@ static void __init jailhouse_get_smp_config(unsigned int early)
smp_found_config = 1;
}
+static void jailhouse_no_restart(void)
+{
+ pr_notice("Jailhouse: Restart not supported, halting\n");
+ machine_halt();
+}
+
static void __init jailhouse_init_platform(void)
{
u64 pa_data = boot_params.hdr.setup_data;
@@ -98,6 +106,8 @@ static void __init jailhouse_init_platform(void)
legacy_pic = &null_legacy_pic;
+ machine_ops.emergency_restart = jailhouse_no_restart;
+
while (pa_data) {
mapping = early_memremap(pa_data, sizeof(header));
memcpy(&header, mapping, sizeof(header));
--
2.12.3
Powered by blists - more mailing lists