qemu/include/hw/ppc
Greg Kurz 73598c75df spapr: Improve handling of memory unplug with old guests
Since commit 1e8b5b1aa1 ("spapr: Allow memory unplug to always succeed")
trying to unplug memory from a guest that doesn't support it (eg. rhel6)
no longer generates an error like it used to. Instead, it leaves the
memory around : only a subsequent reboot or manual use of drmgr within
the guest can complete the hot-unplug sequence. A flag was added to
SpaprMachineClass so that this new behavior only applies to the default
machine type.

We can do better. CAS processes all pending hot-unplug requests. This
means that we don't really care about what the guest supports if
the hot-unplug request happens before CAS.

All guests that we care for, even old ones, set enough bits in OV5
that lead to a non-empty bitmap in spapr->ov5_cas. Use that as a
heuristic to decide if CAS has already occured or not.

Always accept unplug requests that happen before CAS since CAS will
process them. Restore the previous behavior of rejecting them after
CAS when we know that the guest doesn't support memory hot-unplug.

This behavior is suitable for all machine types : this allows to
drop the pre_6_0_memory_unplug flag.

Fixes: 1e8b5b1aa1 ("spapr: Allow memory unplug to always succeed")
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <161012708715.801107.11418801796987916516.stgit@bahia.lan>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2021-01-19 10:20:29 +11:00
..
fdt.h target/ppc: Pass cpu instead of env to ppc_create_page_sizes_prop() 2018-04-27 18:05:22 +10:00
mac_dbdma.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
openpic_kvm.h openpic: move KVM-specific declarations into separate openpic_kvm.h file 2018-03-06 13:16:29 +11:00
openpic.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pnv_core.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
pnv_homer.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
pnv_lpc.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
pnv_occ.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
pnv_pnor.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pnv_psi.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
pnv_xive.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
pnv_xscom.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
pnv.h non-virt: Fix Lesser GPL version number 2020-11-15 16:38:24 +01:00
ppc4xx.h hw/ppc: Remove unused ppcuic_init() 2021-01-19 10:20:29 +11:00
ppc_e500.h
ppc.h hw/ppc/prep: Remove the deprecated "prep" machine and the OpenHackware BIOS 2020-02-02 14:07:57 +11:00
spapr_cpu_core.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
spapr_drc.h spapr: Introduce spapr_drc_reset_all() 2021-01-06 11:09:59 +11:00
spapr_irq.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
spapr_numa.h spapr, spapr_numa: move lookup-arrays handling to spapr_numa.c 2020-09-08 10:08:43 +10:00
spapr_nvdimm.h spapr: Do NVDIMM/PC-DIMM device hotplug sanity checks at pre-plug only 2020-12-14 15:50:55 +11:00
spapr_ovec.h spapr: Improve handling of memory unplug with old guests 2021-01-19 10:20:29 +11:00
spapr_rtas.h
spapr_tpm_proxy.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
spapr_vio.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
spapr_xive.h spapr/xive: Make spapr_xive_pic_print_info() static 2021-01-06 11:09:59 +11:00
spapr.h spapr: Improve handling of memory unplug with old guests 2021-01-19 10:20:29 +11:00
xics_spapr.h spapr/xics: Drop unused argument to xics_kvm_has_broken_disconnect() 2020-12-14 15:50:55 +11:00
xics.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
xive_regs.h spapr: Fix typos in comments and macro indentation 2020-06-26 09:22:30 +10:00
xive.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00