qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Laurent Vivier <lvivier@redhat.com>,
	Lukas Doktor <ldoktor@redhat.com>,
	qemu-ppc@nongnu.org, Greg Kurz <groug@kaod.org>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH] spapr: Migrate CAS reboot flag
Date: Tue, 21 Jan 2020 14:41:26 +1100	[thread overview]
Message-ID: <20200121034126.GB265522@umbus.fritz.box> (raw)
In-Reply-To: <6fb96fed-9590-aa7c-cf00-038ab776ccb5@kaod.org>

[-- Attachment #1: Type: text/plain, Size: 2023 bytes --]

On Wed, Jan 15, 2020 at 07:10:47PM +0100, Cédric Le Goater wrote:
> On 1/15/20 6:48 PM, Greg Kurz wrote:
> > Migration can potentially race with CAS reboot. If the migration thread
> > completes migration after CAS has set spapr->cas_reboot but before the
> > mainloop could pick up the reset request and reset the machine, the
> > guest is migrated unrebooted and the destination doesn't reboot it
> > either because it isn't aware a CAS reboot was needed (eg, because a
> > device was added before CAS). This likely result in a broken or hung
> > guest.
> > 
> > Even if it is small, the window between CAS and CAS reboot is enough to
> > re-qualify spapr->cas_reboot as state that we should migrate. Add a new
> > subsection for that and always send it when a CAS reboot is pending.
> > This may cause migration to older QEMUs to fail but it is still better
> > than end up with a broken guest.
> > 
> > The destination cannot honour the CAS reboot request from a post load
> > handler because this must be done after the guest is fully restored.
> > It is thus done from a VM change state handler.
> > 
> > Reported-by: Lukáš Doktor <ldoktor@redhat.com>
> > Signed-off-by: Greg Kurz <groug@kaod.org>
> 
> Cédric Le Goater <clg@kaod.org>
> 
> Nice work ! That was quite complex to catch !

It is a very nice analysis.  However, I'm disinclined to merge this
for the time being.

My preferred approach would be to just eliminate CAS reboots
altogether, since that has other benefits.  I'm feeling like this
isn't super-urgent, since CAS reboots are extremely rare in practice,
now that we've eliminated the one for the irq switchover.

However, if it's not looking like we'll be ready to do that as the
qemu-5.0 release approaches, then I'll be more than willing to
reconsider this.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-01-21  3:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 17:48 [PATCH] spapr: Migrate CAS reboot flag Greg Kurz
2020-01-15 18:10 ` Laurent Vivier
2020-01-15 18:26   ` Laurent Vivier
2020-01-17 11:49     ` Greg Kurz
2020-01-17 12:10       ` Laurent Vivier
2020-01-17 15:49         ` Greg Kurz
2020-01-16  8:48   ` Greg Kurz
2020-01-16 10:37     ` Laurent Vivier
2020-01-16 12:14       ` Greg Kurz
2020-01-16 18:29         ` Greg Kurz
2020-01-17  9:16           ` David Gibson
2020-01-17 15:44             ` Greg Kurz
2020-01-20  8:04               ` Greg Kurz
2020-01-21  3:43                 ` David Gibson
2020-01-21  9:32                   ` Greg Kurz
2020-01-22  6:50                     ` David Gibson
2020-01-22 10:06                       ` Greg Kurz
2020-01-23  5:08                         ` David Gibson
2020-01-15 18:10 ` Cédric Le Goater
2020-01-21  3:41   ` David Gibson [this message]
2020-01-21  6:57     ` Cédric Le Goater
2020-01-21  7:38     ` Greg Kurz
2020-01-22 12:47   ` Greg Kurz
2020-01-22 14:08     ` Cédric Le Goater

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=20200121034126.GB265522@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=clg@kaod.org \
    --cc=groug@kaod.org \
    --cc=ldoktor@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).