[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen: arm: don't release modules which aren't in RAM into the heap



On Wed, Jul 23, 2014 at 9:45 AM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
They might be in e.g. flash or something but more likely they could
bein a bank of RAM which we aren't handling or in RAM which the
bootloader hasn't told us about for some reason.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Fu Wei <fu.wei@xxxxxxxxxx>
Cc: Roy Franz <roy.franz@xxxxxxxxxx>
---
Âxen/arch/arm/setup.c | Â Â9 +++++++--
Â1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index e53e491..446b4dc 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -247,8 +247,13 @@ void __init discard_initial_modules(void)
    Âpaddr_t s = mi->module[i].start;
    Âpaddr_t e = s + PAGE_ALIGN(mi->module[i].size);

- Â Â Â Âif ( mi->module[i].kind != BOOTMOD_XEN )
- Â Â Â Â Â Âdt_unreserved_regions(s, e, init_domheap_pages, 0);
+ Â Â Â Âif ( mi->module[i].kind == BOOTMOD_XEN )
+ Â Â Â Â Â Âcontinue;
+
+ Â Â Â Âif ( !mfn_valid(paddr_to_pfn(s)) || !mfn_valid(paddr_to_pfn(e)))
+ Â Â Â Â Â Âcontinue;
+
+ Â Â Â Âdt_unreserved_regions(s, e, init_domheap_pages, 0);
  Â}

  Âmi->nr_mods = 0;

This looks good - I'll give it a spin. ÂI think this will be sufficient to allow the stub (or GRUB) to use any available EFI memory for loading modules
without worrying about whether XEN will map it.

Thanks,
Roy
Â
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.