qemu-e2k/include/hw
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
..
acpi acpi: Add addr offset in build_crs 2021-01-17 06:42:54 -05:00
adc hw/adc: Add an ADC module for NPCM7XX 2021-01-12 21:19:02 +00:00
arm hw/misc: Add a PWM module for NPCM7XX 2021-01-12 21:19:02 +00:00
audio
block qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
char
core tcg: Make tb arg to synchronize_from_tb const 2021-01-07 05:09:41 -10:00
cpu
cris
display Clean up includes 2020-12-10 17:16:44 +01:00
dma
firmware
gpio
hyperv
i2c
i386 i386: remove bios_name 2020-12-10 12:15:05 -05:00
ide nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
input
intc hw/ppc: Remove unused ppcuic_init() 2021-01-19 10:20:29 +11:00
ipack
ipmi
isa vt82c686: Remove legacy vt82c686b_pm_init() function 2021-01-04 23:24:44 +01:00
kvm
lm32
m68k
mem
mips hw/mips: Move address translation helpers to target/mips/ 2020-12-13 19:58:54 +01:00
misc macio: wire macio GPIOs to OpenPIC using sysbus IRQs 2021-01-13 12:21:21 +00:00
net hw/net/can: Introduce Xilinx ZynqMP CAN controller 2020-12-10 11:30:44 +00:00
nubus
nvram fw_cfg: Refactor extra pci roots addition 2020-12-08 13:48:57 -05:00
pci pci: Let pci_dma_write() propagate MemTxResult 2020-12-10 12:15:02 -05:00
pci-bridge
pci-host spapr: Fix buffer overflow in spapr_numa_associativity_init() 2021-01-06 11:09:59 +11:00
ppc spapr: Improve handling of memory unplug with old guests 2021-01-19 10:20:29 +11:00
rdma
riscv riscv: Pass RISCVHartArrayState by pointer 2021-01-16 14:34:46 -08:00
rtc
rx
s390x s390x/pci: fix endianness issues 2020-11-18 16:59:29 +01:00
scsi
sd
semihosting semihosting: Fix Lesser GPL version number 2020-11-15 16:38:03 +01:00
sh4
southbridge
sparc include/hw/sparc/grlib.h: Remove unused set_pil_in_fn typedef 2021-01-06 11:41:37 +00:00
ssi hw/core/stream: Rename StreamSlave as StreamSink 2020-12-10 12:15:04 -05:00
timer hw/timer: Refactor NPCM7XX Timer to use CLK clock 2021-01-12 21:19:02 +00:00
tricore
unicore32
usb usb: xlnx-usb-subsystem: Add xilinx usb subsystem 2020-12-15 12:04:30 +00:00
vfio vfio: Change default dirty pages tracking behavior during migration 2020-11-23 10:05:58 -07:00
virtio vhost-user-fs: add the "bootindex" property 2021-01-13 09:06:37 -05:00
watchdog
xen xen: remove GNUC check 2020-12-15 12:53:13 -05:00
xtensa
boards.h vl: clean up -boot variables 2020-12-10 12:15:19 -05:00
clock.h clock: Define and use new clock_display_freq() 2021-01-04 23:24:44 +01:00
elf_ops.h elf_ops.h: Be more verbose with ROM blob names 2020-12-15 12:04:30 +00:00
fw-path-provider.h
hotplug.h
hw.h
ide.h
irq.h
loader-fit.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
loader.h
nmi.h
or-irq.h
pcmcia.h
platform-bus.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
ptimer.h
qdev-clock.h
qdev-core.h machine: introduce MachineInitPhase 2020-12-15 12:51:52 -05:00
qdev-dma.h
qdev-properties-system.h qdev: Reuse DEFINE_PROP in all DEFINE_PROP_* macros 2020-12-18 15:20:17 -05:00
qdev-properties.h qdev: Rename qdev_get_prop_ptr() to object_field_prop_ptr() 2020-12-18 15:20:18 -05:00
register.h
registerfields.h
resettable.h
stream.h hw/core/stream: Rename StreamSlave as StreamSink 2020-12-10 12:15:04 -05:00
sysbus.h
usb.h
vmstate-if.h