[PATCH 15/15] MIPS: paravirt: Provide _machine_halt function to exit VM on shutdown of guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Andreas Herrmann <andreas.herrmann@xxxxxxxxxxxxxxxxxx>
---
 arch/mips/paravirt/setup.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/mips/paravirt/setup.c b/arch/mips/paravirt/setup.c
index f80c3bc..6d2781c 100644
--- a/arch/mips/paravirt/setup.c
+++ b/arch/mips/paravirt/setup.c
@@ -8,6 +8,7 @@
 
 #include <linux/kernel.h>
 
+#include <asm/reboot.h>
 #include <asm/bootinfo.h>
 #include <asm/mipsregs.h>
 #include <asm/smp-ops.h>
@@ -27,6 +28,11 @@ void __init plat_time_init(void)
 	preset_lpj = mips_hpt_frequency / (2 * HZ);
 }
 
+static void pv_machine_halt(void)
+{
+	hypcall0(1 /* Exit VM */);
+}
+
 /*
  * Early entry point for arch setup
  */
@@ -47,6 +53,7 @@ void __init prom_init(void)
 		if (i < argc - 1)
 			strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
 	}
+	_machine_halt = pv_machine_halt;
 	register_smp_ops(&paravirt_smp_ops);
 }
 
-- 
1.7.9.5



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux