qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] spapr: Fix and cleanups for sPAPR CPU core
@ 2020-10-15 21:18 Greg Kurz
  2020-10-15 21:18 ` [PATCH v2 1/5] spapr: Fix leak of CPU machine specific data Greg Kurz
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Greg Kurz @ 2020-10-15 21:18 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-ppc, qemu-devel

While reading the code _again_ I spotted a memory leak and I realized
that the realize/unrealize paths are uselessly complex and not really
symmetrical.

This series fixes the leak and re-shuffles the code to make it cleaner.

Tested with 'make check', travis-ci and manual hotplug/unplug of CPU
cores. Also tested error paths by simulating failures when creating
interrupt presenters or when setting the vCPU id.

v2: - enforce symmetry between realize and unrealize
    - unrealize vCPUs with qdev_unrealize()
    - one loop to create/realize and to unrealize/delete vCPUs

---

Greg Kurz (5):
      spapr: Fix leak of CPU machine specific data
      spapr: Unrealize vCPUs with qdev_unrealize()
      spapr: Drop spapr_delete_vcpu() unused argument
      spapr: Make spapr_cpu_core_unrealize() idempotent
      spapr: Simplify spapr_cpu_core_realize() and spapr_cpu_core_unrealize()


 accel/tcg/user-exec-stub.c      |    4 ++
 hw/ppc/spapr_cpu_core.c         |   69 ++++++++++++++++++---------------------
 target/ppc/translate_init.c.inc |    2 +
 3 files changed, 37 insertions(+), 38 deletions(-)

--
Greg



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

end of thread, other threads:[~2020-10-22  4:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-15 21:18 [PATCH v2 0/5] spapr: Fix and cleanups for sPAPR CPU core Greg Kurz
2020-10-15 21:18 ` [PATCH v2 1/5] spapr: Fix leak of CPU machine specific data Greg Kurz
2020-10-15 21:18 ` [PATCH v2 2/5] spapr: Unrealize vCPUs with qdev_unrealize() Greg Kurz
2020-10-15 21:18 ` [PATCH v2 3/5] spapr: Drop spapr_delete_vcpu() unused argument Greg Kurz
2020-10-15 21:18 ` [PATCH v2 4/5] spapr: Make spapr_cpu_core_unrealize() idempotent Greg Kurz
2020-10-15 21:18 ` [PATCH v2 5/5] spapr: Simplify spapr_cpu_core_realize() and spapr_cpu_core_unrealize() Greg Kurz
2020-10-22  4:02 ` [PATCH v2 0/5] spapr: Fix and cleanups for sPAPR CPU core 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).