qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] spapr: Fix device unplug vs CAS or migration
@ 2020-02-14 15:01 Greg Kurz
  2020-02-14 15:01 ` [PATCH v2 1/2] spapr: Don't use spapr_drc_needed() in CAS code Greg Kurz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Greg Kurz @ 2020-02-14 15:01 UTC (permalink / raw)
  To: David Gibson; +Cc: Laurent Vivier, Alexey Kardashevskiy, qemu-ppc, qemu-devel

While working on getting rid of CAS reboot, I realized that we currently
don't handle device hot unplug properly in the following situations:

1) if the device is unplugged between boot and CAS, SLOF doesn't handle
   the even, which is a known limitation. The device hence stays around
   forever (specifically, until some other event is emitted and the guest
   eventually completes the unplug or a reboot). Until we can teach SLOF
   to correctly process the full FDT at CAS, we should trigger a CAS reboot,
   like we already do for hotplug.

2) if the guest is migrated after the even was emitted but before the
   guest could process it, the destination is unaware of the pending
   unplug operation and doesn't remove the device when the guests
   releases it. The 'unplug_requested' field of the DRC is actually state
   that should be migrated.

Changes since v1:
   - new spapr_drc_transient() helper that covers pending plug and unplug
     situations for both CAS and migration
   - as a mechanical consequence, fix unplug for CAS an migration in the
     same patch

--
Greg

---

Greg Kurz (2):
      spapr: Don't use spapr_drc_needed() in CAS code
      spapr: Fix handling of unplugged devices during CAS and migration


 hw/ppc/spapr_drc.c         |   43 ++++++++++++++++++++++++++++++++++++-------
 hw/ppc/spapr_hcall.c       |   14 +++++++++-----
 include/hw/ppc/spapr_drc.h |    4 +++-
 3 files changed, 48 insertions(+), 13 deletions(-)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-17  0:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 15:01 [PATCH v2 0/2] spapr: Fix device unplug vs CAS or migration Greg Kurz
2020-02-14 15:01 ` [PATCH v2 1/2] spapr: Don't use spapr_drc_needed() in CAS code Greg Kurz
2020-02-14 15:01 ` [PATCH v2 2/2] spapr: Fix handling of unplugged devices during CAS and migration Greg Kurz
2020-02-17  0:31 ` [PATCH v2 0/2] spapr: Fix device unplug vs CAS or migration David Gibson

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).