[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



Hi Ian,

On 23/07/14 17:45, Ian Campbell 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

being?

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;

What happen if the bootloader decide to put the module between 2 banks and having the hole in the middle. Such as:

start of the module

end of bank 0

hole

start of bank 1

end of the module

Regards,

--
Julien Grall

_______________________________________________
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®.