mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
efi/boot: Don't free ebmalloc area at all
Freeing part of the BSS back for general use proves to be problematic. It is not accounted for in xen_in_range(), causing errors when constructing the IOMMU tables, resulting in a failure to boot. Other smaller issues are that tboot treats the entire BSS as hypervisor data, creating and checking a MAC of it on S3, and that, by being 1MB in size, freeing it guarentees to shatter the hypervisor superpage mappings. This is a stopgap fix to unblock master, while alternatives are discussed. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
b5484937e5
commit
52bba67f8b
1 file changed
+2
@@ -146,6 +146,7 @@ static void __init __maybe_unused *ebmalloc(size_t size)
|
||||
|
||||
static void __init __maybe_unused free_ebmalloc_unused_mem(void)
|
||||
{
|
||||
#if 0 /* FIXME: Putting a hole in the BSS breaks the IOMMU mappings for dom0. */
|
||||
unsigned long start, end;
|
||||
|
||||
start = (unsigned long)ebmalloc_mem + PAGE_ALIGN(ebmalloc_allocated);
|
||||
@@ -155,6 +156,7 @@ static void __init __maybe_unused free_ebmalloc_unused_mem(void)
|
||||
init_xenheap_pages(__pa(start), __pa(end));
|
||||
|
||||
printk(XENLOG_INFO "Freed %lukB unused BSS memory\n", (end - start) >> 10);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||