]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/fadump: Do not allow hot-remove memory from fadump reserved area.
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Mon, 20 Aug 2018 08:17:32 +0000 (13:47 +0530)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commita0b03668b4a105acf9c308b148eaf35baf5b5b02
tree2bb09e4ef1c28cf155820657f5578af23a2b3e80
parent4c263d0d00ffe2bfa43808d2900bd1fd4a6fa743
powerpc/fadump: Do not allow hot-remove memory from fadump reserved area.

BugLink: https://bugs.launchpad.net/bugs/1837664
[ Upstream commit 0db6896ff6332ba694f1e61b93ae3b2640317633 ]

For fadump to work successfully there should not be any holes in reserved
memory ranges where kernel has asked firmware to move the content of old
kernel memory in event of crash. Now that fadump uses CMA for reserved
area, this memory area is now not protected from hot-remove operations
unless it is cma allocated. Hence, fadump service can fail to re-register
after the hot-remove operation, if hot-removed memory belongs to fadump
reserved region. To avoid this make sure that memory from fadump reserved
area is not hot-removable if fadump is registered.

However, if user still wants to remove that memory, he can do so by
manually stopping fadump service before hot-remove operation.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/powerpc/include/asm/fadump.h
arch/powerpc/kernel/fadump.c
arch/powerpc/platforms/pseries/hotplug-memory.c