qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/9] main-loop: refactor qemu_system_shutdown_re


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 4/9] main-loop: refactor qemu_system_shutdown_request()
Date: Wed, 20 Feb 2013 10:17:30 -0600
User-agent: Notmuch/0.13.2+93~ged93d79 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu)

Paolo Bonzini <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]