All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Krempa <pkrempa@redhat.com>
Cc: "Denis V. Lunev" <den@openvz.org>,
	qemu-devel@nongnu.org, Dmitry Andreev <dandreev@virtuozzo.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state
Date: Wed, 16 Dec 2015 13:02:12 +0100	[thread overview]
Message-ID: <567152C4.1010004@redhat.com> (raw)
In-Reply-To: <20151216095029.GW1404639@andariel.pipo.sk>



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

  parent reply	other threads:[~2015-12-16 12:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16  9:00 [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state Denis V. Lunev
2015-12-16  9:12 ` Paolo Bonzini
2015-12-16  9:32   ` Denis V. Lunev
2015-12-16  9:35     ` Paolo Bonzini
2015-12-16  9:50       ` Denis V. Lunev
2015-12-16  9:37     ` Peter Krempa
2015-12-16  9:50   ` Peter Krempa
2015-12-16  9:55     ` Denis V. Lunev
2015-12-16 12:02     ` Paolo Bonzini [this message]
2015-12-16 14:47       ` Denis V. Lunev
2016-01-11 10:31         ` Denis V. Lunev
2016-01-11 11:29           ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=567152C4.1010004@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dandreev@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=pkrempa@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.