Re: [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]

 



On Wed, May 21, 2014 at 02:44:49PM +0100, James Hogan wrote:
> On 20/05/14 15:47, Andreas Herrmann wrote:
> > Signed-off-by: Andreas Herrmann <andreas.herrmann@xxxxxxxxxxxxxxxxxx>
> 
> Does it make sense to provide a _machine_restart too?

Hmm, I've not seen a real need for this so far.
(Halting the guest and relaunching it from the shell with lkvm was fast
enough for my tests ;-)

But it's worth to get it working. I might be wrong but I think that
this requires lkvm changes to actually handle the reboot.

> I think this should be squashed into patch 10 really,

Done that.

> or else patch 10
> split up into several parts (irq, smp, serial, other).

Still kept the pci stuff as a separate patch in case that it might be
replaced with something based on "PCI: Generic Configuration Access
Mechanism support" (https://lkml.org/lkml/2014/5/18/54) or similar.

Andreas

> 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 <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);
> >  }
> >  
> > 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux