]> xenbits.xensource.com Git - xen.git/commitdiff
efi/boot: Don't free ebmalloc area at all
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 28 Feb 2017 14:07:09 +0000 (14:07 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 1 Mar 2017 11:27:04 +0000 (11:27 +0000)
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>
xen/common/efi/boot.c

index b6cbdadbbdcc1440ef63ff0b583e0ded735ddb4a..be11d05b09857319ee90b7c91400692044b874c4 100644 (file)
@@ -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
 }
 
 /*