|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2] 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@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
---
xen/common/efi/boot.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index b6cbdad..2341889 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -120,7 +120,6 @@ static CHAR16 __initdata newline[] = L"\r\n";
* have to be disabled in xen/arch/arm/arm64/head.S; though BSS
* should be initialized somehow before use of variables living there,
* - use ebmalloc() in ARM/common EFI boot code,
- * - call free_ebmalloc_unused_mem() somewhere in init code.
*/
#define EBMALLOC_SIZE MB(0)
#else
@@ -144,19 +143,6 @@ static void __init __maybe_unused *ebmalloc(size_t size)
return ptr;
}
-static void __init __maybe_unused free_ebmalloc_unused_mem(void)
-{
- unsigned long start, end;
-
- start = (unsigned long)ebmalloc_mem + PAGE_ALIGN(ebmalloc_allocated);
- end = (unsigned long)ebmalloc_mem + sizeof(ebmalloc_mem);
-
- destroy_xen_mappings(start, end);
- init_xenheap_pages(__pa(start), __pa(end));
-
- printk(XENLOG_INFO "Freed %lukB unused BSS memory\n", (end - start) >> 10);
-}
-
/*
* Include architecture specific implementation here, which references the
* static globals defined above.
@@ -1310,8 +1296,6 @@ void __init efi_init_memory(void)
} *extra, *extra_head = NULL;
#endif
- free_ebmalloc_unused_mem();
-
if ( !efi_enabled(EFI_BOOT) )
return;
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |