qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused s


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state
Date: Wed, 16 Dec 2015 13:02:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0


On 16/12/2015 10:50, Peter Krempa wrote:
> We check that the state is "paused" and continue the vCPUs only in
> that case. The panic devices will move the VM to 'crashed' state. 
> The code that is issuing 'system_reset' does not modify the state 
> in any way.

Ok, thanks.

> I'd say NACK here. This will break the possibility to reset a
> system while the vCPUs are paused. The problem should be fixed in
> libvirt.

It is indeed a QEMU bug, and it was introduced in commit df39076 ("vl:
allow "cont" from panicked state", 2013-11-04).

Until that commit, a system_reset in panicked state would change the
status to paused.  The commit changed that as a side effect of
removing VM_STATE_GUEST_PANICKED from runstate_needs_reset; see the
call to runstate_needs_reset in main_loop_should_exit.

IMO, after a reset, main_loop_should_exit should actually transition
to VM_STATE_PRELAUNCH (*not* RUN_STATE_PAUSED) for *all* states except
RUN_STATE_INMIGRATE, RUN_STATE_SAVE_VM (which I think cannot happen
there) and (of course) RUN_STATE_RUNNING.  Some changes will be required
to the transition table as well.

This will fix similar bugs for other runstates as well, though most of
them probably cannot be triggered from libvirt.

Thanks,

Paolo



reply via email to

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