]> xenbits.xensource.com Git - mini-os.git/commit
mini-os: fix number of pages for PVH
authorJuergen Gross <jgross@suse.com>
Tue, 21 Jun 2022 07:23:13 +0000 (09:23 +0200)
committerJulien Grall <jgrall@amazon.com>
Mon, 4 Jul 2022 08:52:38 +0000 (09:52 +0100)
commit9b87429d2864a3ee7567a63756a8c3e3072439d1
treee264e4ec844c380169f905d82dae1189c3fe5a86
parent00c1c4c80cc90d5d6a2ad563e4de526bdb5ce62d
mini-os: fix number of pages for PVH

When getting the current allocation from Xen, this value includes the
pages allocated in the MMIO area. Fix the highest available RAM page
by subtracting the size of that area.

This requires to read the E820 map before needing this value. Add two
functions returning the current and the maximum number of RAM pages
taking this correction into account.

At the same time add the LAPIC page to the memory map in order to
avoid reusing that PFN for internal purposes.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
arch/x86/mm.c
balloon.c
e820.c
include/e820.h
include/x86/arch_mm.h