x86/e820: fix 640k - 1M region reservation logic
authorSergey Dyasli <sergey.dyasli@citrix.com>
Wed, 30 Oct 2019 14:54:47 +0000 (14:54 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 21 Nov 2019 15:49:58 +0000 (15:49 +0000)
commit83ac5ab54bba37e2761d77584ab9e2d8a24401c9
treeb55921fa3169d5eef0aaf8ed79c061e1a5bf1247
parenta7b88f0545ffe7d3ca8036beed1af92ac2be112a
x86/e820: fix 640k - 1M region reservation logic

Converting a guest from PV to PV-in-PVH makes the guest to have 384k
less memory, which may confuse guest's balloon driver. This happens
because Xen unconditionally reserves 640k - 1M region in E820 despite
the fact that it's really a usable RAM in PVH boot mode.

Fix this by skipping region type change in virtualised environments,
trusting whatever memory map our hypervisor has provided.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/e820.c