Paolo Bonzini <pbonz...@redhat.com> writes:

> Il 20/02/2013 16:32, Anthony Liguori ha scritto:
>> +    if (no_shutdown) {
>> +        vm_stop(RUN_STATE_SHUTDOWN);
>> +    } else {
>> +        main_loop_quit();
>> +    }
>
> Would it make sense to call vm_stop() unconditionally?  Then Xen can
> just use the vmstate_change handler as a hook.
>
> Similarly, for reset it can just use qemu_register_reset.

Yeah, that's probably doable.

But can't we just factor out the destroy_hvm_domain(false); to be called
after the main loop exits?  We could even add a machine finalize hook
for this purpose.  Likewise, destroy_hvm_domain(true) could be called
through a machine-specific reset handler.

Stefano, does this make sense?  I can do a quick but I'm not really
setup to test it.

Regards,

Anthony Liguori

>
> Paolo


Reply via email to