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

Re: [Xen-devel] [PATCH 04/11] Disable the mfn_is_ram() check, it doesn't work correctly on all systems



On 10/02/2012 06:49 AM, Ian Campbell wrote:
> On Thu, 2012-09-27 at 18:09 +0100, Matthew Fioravante wrote:
>> 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.
>>
>> Signed-off-by: Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>
>> Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
> Further down the thread with the Ack Samuel said:
>         We can probably just remove the check in __do_ioremap, which
>         AFAIK is the only call.
>
> since this function is a bit pointless now.
I think its a question of whether or not we want to leave it for someone
to implement correctly later (by getting the memory map from the
hypervisor/ doing e820 calls) or get rid of it entirely. Since its only
purpose seems to be for preventing mini-os devs from making logical
errors I'd be more inclined to just get rid of it.

Do you all agree? If so I can send a new patch with it taken out.
>
>> diff --git a/extras/mini-os/arch/x86/mm.c b/extras/mini-os/arch/x86/mm.c
>> index 80aceac..5813a08 100644
>> --- 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;
>


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

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