[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-cvs
Subject: [Xen-changelog] [xen stable-4.3] x86: consider modules when cutting off memory
From: patchbot () xen ! org
Date: 2013-11-28 3:22:54
Message-ID: E1VlsBq-0003dW-Hz () xenbits ! xen ! org
[Download RAW message or body]
commit f510b0deebebf74b3abff82b562f682ab9f8434e
Author: Jan Beulich <jbeulich@suse.com>
AuthorDate: Wed Nov 27 10:00:51 2013 +0100
Commit: Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Nov 27 10:00:51 2013 +0100
x86: consider modules when cutting off memory
The code in question runs after module ranges got already removed from
the E820 table, so when determining the new maximum page/PDX we need to
explicitly take them into account.
Furthermore we need to round up the ending addresses here, in order to
fully cover eventual partial trailing pages.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
master commit: a5db2c7aab7a638d84f22ac8fe5089d81175438b
master date: 2013-11-18 13:57:20 +0100
---
xen/arch/x86/setup.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index cd524e3..47aeed3 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1012,9 +1012,17 @@ void __init __start_xen(unsigned long mbi_p)
ASSERT(j);
}
map_e = boot_e820.map[j].addr + boot_e820.map[j].size;
- if ( (map_e >> PAGE_SHIFT) < max_page )
+ for ( j = 0; j < mbi->mods_count; ++j )
{
- max_page = map_e >> PAGE_SHIFT;
+ uint64_t end = pfn_to_paddr(mod[j].mod_start) +
+ mod[j].mod_end;
+
+ if ( map_e < end )
+ map_e = end;
+ }
+ if ( PFN_UP(map_e) < max_page )
+ {
+ max_page = PFN_UP(map_e);
max_pdx = pfn_to_pdx(max_page - 1) + 1;
}
printk(XENLOG_WARNING "Ignoring inaccessible memory range"
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3
_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xen.org
http://lists.xensource.com/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic