WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [Linux PATCH] Fix to hugepages to work around new PWT ha

To: Dave McCracken <dcm@xxxxxxxx>
Subject: Re: [Xen-devel] [Linux PATCH] Fix to hugepages to work around new PWT handling
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Thu, 24 Jun 2010 11:05:21 +0100
Cc: Xen Developers List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 24 Jun 2010 03:06:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201006091426.03926.dcm@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20100609140252.18351.48175.sendpatchset@xxxxxxxxxxxxxxxxxxx> <201006091335.52854.dcm@xxxxxxxx> <4C0FE359.1000305@xxxxxxxx> <201006091426.03926.dcm@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Lightning/1.0b2pre Thunderbird/3.0.4
On 06/09/2010 08:26 PM, Dave McCracken wrote:
>> But in general kernel code shouldn't be just nakedly setting present on
>> the pte without also remaking the whole thing.  That doesn't happen with
>> normal ptes, and it probably shouldn't happen with huge ptes.  Forcing
>> present on a pte at this level seems very bogus.   Why not change the
>> upper code to set present if that's want it wants?
>>
>> I'll skip this chunk for now.
>>     
> Um, this is the upper level code.  The entire purpose of make_huge_pte is to 
> construct a present huge pte from page and pgprot. The problem is that the 
> original code makes the pte, then sets the present bit via pte_mkhuge().  
> This 
> means the Xen-specific macro that triggers on present is misled and doesn't 
> do 
> the pfn_to_mfn().  Without this patch hugepages is handing pfns to the 
> hypervisor to map instead of mfns.
>   

In principle, setting present should cause the pte to be converted from
pfn to mfn, but I don't think that ever happens with normal ptes (since
non-present ptes contain swap info).  But I don't see where a huge pte
gets present set; pte_mkhuge itself doesn't do anything except set PSE.

    J

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel