Mailing List Archive

[PATCH mini-os enhancements for vtpm 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.


diff --git a/extras/mini-os/arch/x86/mm.c b/extras/mini-os/arch/x86/mm.c
--- a/extras/mini-os/arch/x86/mm.c
+++ b/extras/mini-os/arch/x86/mm.c
@@ -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;
Re: [PATCH mini-os enhancements for vtpm 4/8] disable mfn_is_ram [ In reply to ]
Matthew Fioravante, le Mon 17 Sep 2012 17:58:31 -0400, a écrit :
> 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.

And it is only used for checks, not for actual decisions.

Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
Re: [PATCH mini-os enhancements for vtpm 4/8] disable mfn_is_ram [ In reply to ]
On Mon, 2012-09-17 at 23:13 +0100, Samuel Thibault wrote:
> Matthew Fioravante, le Mon 17 Sep 2012 17:58:31 -0400, a écrit :
> > 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.

How does it fail? What are the symptoms? What are the inputs to this
function which cause it to fail?

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

>
> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
>
> Samuel
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
Re: [PATCH mini-os enhancements for vtpm 4/8] disable mfn_is_ram [ In reply to ]
Ian Campbell, le Tue 18 Sep 2012 08:30:50 +0100, a écrit :
> On Mon, 2012-09-17 at 23:13 +0100, Samuel Thibault wrote:
> > Matthew Fioravante, le Mon 17 Sep 2012 17:58:31 -0400, a écrit :
> > > 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.
>
> 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.

> > 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

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel