diff options
author | Greg Kurz <groug@kaod.org> | 2020-10-15 23:18:46 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-10-28 01:08:53 +1100 |
commit | 9370c28f12ca9336dd893e3b673a334c4938c58f (patch) | |
tree | 4defcdccdbab8c8920393635b33c804a67e22fd6 /block | |
parent | 96598cdb14da4d48c68f178a7b5f8d47f5c638f4 (diff) | |
download | qemu-9370c28f12ca9336dd893e3b673a334c4938c58f.zip qemu-9370c28f12ca9336dd893e3b673a334c4938c58f.tar.gz qemu-9370c28f12ca9336dd893e3b673a334c4938c58f.tar.bz2 |
spapr: Make spapr_cpu_core_unrealize() idempotent
spapr_cpu_core_realize() has a rollback path which partially duplicates
the code of spapr_cpu_core_unrealize().
Let's make spapr_cpu_core_unrealize() idempotent and call it instead. This
requires to:
- move the registration and unregistration of the reset handler around
but it is harmless,
- allocate the array of vCPUs with g_new0() to be able to filter out
unused slots,
- make sure to only unrealize vCPUs that have been already realized.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <160279672626.1808373.14142129300586424514.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions