On Thu, 28 Jul 2011 14:39:23 -0300 Luiz Capitulino <lcapitul...@redhat.com> wrote:
> On Thu, 28 Jul 2011 17:20:41 +0200 > Jan Kiszka <jan.kis...@web.de> wrote: > > > On 2011-07-28 17:18, Luiz Capitulino wrote: > > > On Thu, 28 Jul 2011 16:19:19 +0200 > > > Jan Kiszka <jan.kis...@web.de> wrote: > > > > > >> On 2011-07-28 15:37, Avi Kivity wrote: > > >>> On 07/28/2011 04:31 PM, Luiz Capitulino wrote: > > >>>> On Thu, 28 Jul 2011 10:23:22 +0300 > > >>>> Avi Kivity<a...@redhat.com> wrote: > > >>>> > > >>>>> On 07/28/2011 12:44 AM, Blue Swirl wrote: > > >>>>> > On Wed, Jul 27, 2011 at 9:42 PM, Luiz > > >>>> Capitulino<lcapitul...@redhat.com> wrote: > > >>>>> > > This function should be used when the VM is not supposed to > > >>>> resume > > >>>>> > > execution (eg. by issuing 'cont' monitor command). > > >>>>> > > > > >>>>> > > Today, we allow the user to resume execution even when: > > >>>>> > > > > >>>>> > > o the guest shuts down and -no-shutdown is used > > >>>>> > > o there's a kvm internal error > > >>>>> > > o loading the VM state with -loadvm or "loadvm" in the > > >>>> monitor fails > > >>>>> > > > > >>>>> > > I think only badness can happen from the cases above. > > >>>>> > > > >>>>> > I'd suppose a system_reset should bring the system back to > > >>>> sanity and > > >>>>> > then clear vm_permanent_stopped (where's -ly?) > > >>>> > > >>>> What's -ly? > > >>>> > > >>> > > >>> permanent-ly. > > >>> > > >>>>> > except maybe for KVM > > >>>>> > internal error if that can't be recovered. Then it would not very > > >>>>> > permanent anymore, so the name would need adjusting. > > >>>>> > > >>>>> Currently, all kvm internal errors are recoverable by reset (and > > >>>>> possibly by fiddling with memory/registers). > > >>>> > > >>>> Ok, but a poweroff in the guest isn't recoverable with system_reset > > >>>> right? Or does it depend on the guest? > > >>> > > >>> Right, it's not recoverable if you shut the power down where the tractor > > >>> beam is coupled to the main reactor. > > >> > > >> system_reset will bring all emulated devices back into their power-on > > >> state - unless we have remaining bugs to fix. Actually, one may consider > > >> issuing this reset automatically on vm_start after "permant" vm_stop. > > The only permanent vm_stop we'd have is poweroff when -no-shutdown is used. > > Are you saying that system_reset should be able to recover from that too? It already does, so we don't have permanent stops. > > If yes, then I guess the right place is do_cont(). But I'm not sure we > should do that (if -no-shutdown is not used, we'll exit() anyway). > > > > > > > I'm going to abandon the vm_stop_permanent() idea. > > > > > > I'm thinking something towards having a stop_kind argument to vm_stop(), > > > which could be temporary (which is what we have today), only with > > > system_reset or permanent. > > > > > > Or maybe vm_stop_opt(), which allows for fine grained control of stop > > > (vm_stop() would default to today's behavior)... > > > > But the right point for reset is start, not stop. Otherwise we loose the > > state before the stop. >