Revert "xen/balloon: Mark unallocated host memory as UNUSABLE"
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Tue, 27 Nov 2018 20:58:21 +0000 (20:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2018 08:28:53 +0000 (09:28 +0100)
commitb9c242b4fad864505f679db31531903d1b3779e9
treef1dc302c3d244e548bbeeacb1c42cae3ecb660de
parentf02e0d5fb6695f69c51c38ef5567a5940791521f
Revert "xen/balloon: Mark unallocated host memory as UNUSABLE"

[ Upstream commit 123664101aa2156d05251704fc63f9bcbf77741a ]

This reverts commit b3cf8528bb21febb650a7ecbf080d0647be40b9f.

That commit unintentionally broke Xen balloon memory hotplug with
"hotplug_unpopulated" set to 1. As long as "System RAM" resource
got assigned under a new "Unusable memory" resource in IO/Mem tree
any attempt to online this memory would fail due to general kernel
restrictions on having "System RAM" resources as 1st level only.

The original issue that commit has tried to workaround fa564ad96366
("x86/PCI: Enable a 64bit BAR on AMD Family 15h (Models 00-1f, 30-3f,
60-7f)") also got amended by the following 03a551734 ("x86/PCI: Move
and shrink AMD 64-bit window to avoid conflict") which made the
original fix to Xen ballooning unnecessary.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/xen/enlighten.c
arch/x86/xen/setup.c
drivers/xen/balloon.c
include/xen/balloon.h