From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Hogan Subject: Re: [PATCH 15/15] MIPS: paravirt: Provide _machine_halt function to exit VM on shutdown of guest Date: Wed, 21 May 2014 14:44:49 +0100 Message-ID: <537CADD1.5020006@imgtec.com> References: <1400597236-11352-1-git-send-email-andreas.herrmann@caviumnetworks.com> <1400597236-11352-16-git-send-email-andreas.herrmann@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: David Daney , Ralf Baechle , To: Andreas Herrmann , Return-path: Received: from mailapp01.imgtec.com ([195.59.15.196]:6793 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751254AbaEUNsI (ORCPT ); Wed, 21 May 2014 09:48:08 -0400 In-Reply-To: <1400597236-11352-16-git-send-email-andreas.herrmann@caviumnetworks.com> Sender: kvm-owner@vger.kernel.org List-ID: On 20/05/14 15:47, Andreas Herrmann wrote: > Signed-off-by: Andreas Herrmann Does it make sense to provide a _machine_restart too? I think this should be squashed into patch 10 really, or else patch 10 split up into several parts (irq, smp, serial, other). Cheers James > --- > 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 > > +#include > #include > #include > #include > @@ -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(¶virt_smp_ops); > } > >