]> git.baikalelectronics.ru Git - kernel.git/commit
xen/balloon: Mark unallocated host memory as UNUSABLE
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Tue, 12 Dec 2017 20:08:21 +0000 (15:08 -0500)
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>
Wed, 20 Dec 2017 18:16:20 +0000 (13:16 -0500)
commit0c2e6a6c2da4207912ac8956a38ef4997c29efb2
treead93a1164173c611f6ac57481efa363ae6fdac64
parent1e14555381848e7ffdec2e6ab05a89fe0577f12e
xen/balloon: Mark unallocated host memory as UNUSABLE

Commit 6a1a36b672a7 ("x86/xen: discard RAM regions above the maximum
reservation") left host memory not assigned to dom0 as available for
memory hotplug.

Unfortunately this also meant that those regions could be used by
others. Specifically, commit 46cfa1b2e455 ("x86/PCI: Enable a 64bit BAR
on AMD Family 15h (Models 00-1f, 30-3f, 60-7f)") may try to map those
addresses as MMIO.

To prevent this mark unallocated host memory as E820_TYPE_UNUSABLE (thus
effectively reverting 6a1a36b672a7) and keep track of that region as
a hostmem resource that can be used for the hotplug.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
arch/x86/xen/enlighten.c
arch/x86/xen/setup.c
drivers/xen/balloon.c
include/xen/balloon.h