Commit fd498076 authored by Jan Kiszka's avatar Jan Kiszka Committed by Thomas Gleixner

x86/jailhouse: Halt instead of failing to restart

Jailhouse provides no guest-initiated restart. So, do not even try to.
Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: jailhouse-dev@googlegroups.com
Link: https://lkml.kernel.org/r/ef8a0ef95c2b17c21066e5f28ea56b58bf7eaa82.1511770314.git.jan.kiszka@siemens.com
parent 5ae44430
...@@ -10,10 +10,12 @@ ...@@ -10,10 +10,12 @@
#include <linux/acpi_pmtmr.h> #include <linux/acpi_pmtmr.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/reboot.h>
#include <asm/apic.h> #include <asm/apic.h>
#include <asm/cpu.h> #include <asm/cpu.h>
#include <asm/hypervisor.h> #include <asm/hypervisor.h>
#include <asm/i8259.h> #include <asm/i8259.h>
#include <asm/reboot.h>
#include <asm/setup.h> #include <asm/setup.h>
static __initdata struct jailhouse_setup_data setup_data; static __initdata struct jailhouse_setup_data setup_data;
...@@ -77,6 +79,12 @@ static void __init jailhouse_get_smp_config(unsigned int early) ...@@ -77,6 +79,12 @@ static void __init jailhouse_get_smp_config(unsigned int early)
smp_found_config = 1; 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) static void __init jailhouse_init_platform(void)
{ {
u64 pa_data = boot_params.hdr.setup_data; u64 pa_data = boot_params.hdr.setup_data;
...@@ -96,6 +104,8 @@ static void __init jailhouse_init_platform(void) ...@@ -96,6 +104,8 @@ static void __init jailhouse_init_platform(void)
legacy_pic = &null_legacy_pic; legacy_pic = &null_legacy_pic;
machine_ops.emergency_restart = jailhouse_no_restart;
while (pa_data) { while (pa_data) {
mapping = early_memremap(pa_data, sizeof(header)); mapping = early_memremap(pa_data, sizeof(header));
memcpy(&header, mapping, sizeof(header)); memcpy(&header, mapping, sizeof(header));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment