disable mfn_is_ram
PATCH 4/8 disable mfn_is_ram
This patch disables the mfn_is_ram check in mini-os. The current check is insufficient and fails on some systems with larger than 4gb memory.
extras/mini-os/arch/x86/mm.c +0 -0
@@ -850,6 +850,8 @@ unsigned long alloc_contig_pages(int order, unsigned
int addr_bits)
static long system_ram_end_mfn;
int mfn_is_ram(unsigned long mfn)
{
+ /* This is broken on systems with large ammounts of ram. Always
return 0 for now */
+ return 0;
/* very crude check if a given MFN is memory or not. Probably should
* make this a little more sophisticated ;) */
return (mfn <= system_ram_end_mfn) ? 1 : 0;_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 2 lines · Matthew Fioravante, le Mon 17 Sep 2012 17:58:31 -0400, a écrit :
This patch disables the
mfn_is_ramcheck in mini-os. The current check is insufficient and fails on some systems with larger than 4gb memory.
And it is only used for checks, not for actual decisions.
Samuel
Quoted 3 lines · Samuel Thibault
Quoted 2 lines · Matthew Fioravante, le Mon 17 Sep 2012 17:58:31 -0400, a écrit :
This patch disables the
mfn_is_ramcheck in mini-os. The current check is insufficient and fails on some systems with larger than 4gb memory.
How does it fail? What are the symptoms? What are the inputs to this function which cause it to fail?
Quoted 1 line
And it is only used for checks, not for actual decisions.
It's made completely useless here though, why not either fix it or remove it altogether?
There's certainly no reason to leave the dead code after the return statement.
Quoted 9 lines
Acked-by Samuel Thibault <[email protected]>Samuel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 6 lines · Ian Campbell, le Tue 18 Sep 2012 08:30:50 +0100, a écrit :
Quoted 3 lines · Samuel Thibault
Quoted 2 lines · Matthew Fioravante, le Mon 17 Sep 2012 17:58:31 -0400, a écrit :
This patch disables the
mfn_is_ramcheck in mini-os. The current check is insufficient and fails on some systems with larger than 4gb memory.How does it fail?
When there is more than 4gb memory, there is IO memory between e.g. 3gb and 4gb, which will be considered as RAM.
Quoted 4 lines
Quoted 1 line
And it is only used for checks, not for actual decisions.
It's made completely useless here though, why not either fix it or remove it altogether?
We can probably just remove the check in __do_ioremap, which AFAIK is the only call.
Samuel