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] [patch] nx bit shouldn't get set when disabled

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] [patch] nx bit shouldn't get set when disabled
From: "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Date: Wed, 8 Jun 2005 15:47:01 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Scott Parish <srparish@xxxxxxxxxx>
Delivery-date: Wed, 08 Jun 2005 22:46:20 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcVsdfXuNTI89G56RIiw5mcUqpSfeQAAehAA
Thread-topic: [Xen-devel] [patch] nx bit shouldn't get set when disabled
Keir Fraser wrote:
> On 8 Jun 2005, at 22:56, Nakajima, Jun wrote:
> 
>> These should not be necessary if pte is created correctly (w/ or w/o
>> NX bit depending on __supported_pte_mask) in the first place, as Keir
>> pointed out. That's what I meant by "We should fix the creator of the
>> pte (by __supported_pte_mask), not the consumer of it." And you
>> always cut off the NX bit in your patch.
>> 
>> So remove the changes to pci-dma.c and init.c. If that does not work,
>> move check_efer to right before pda_init(0) in x86_64_start_kernel()
>> in head64.c.
> 
> I think the changes in pci-dma.c *are* required: that code currently
> just does pte->pte >> PAGE_SHIFT, which certainly isn't right. That's
> code that doesn't exist in native Linux so it probably does need
> fixing up for PAE/NX.
Agree on that part. Should read like:

  pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
+ pte->pte &= __supported_pte_mask;
  pfn = pte->pte >> PAGE_SHIFT;

> 
> But 'fixes' to simple native functions like set_pud, set_pmd, etc.
> ought not to be necessary. We shouldn't have to fix ubiquitous
> functions like that to support nx bit on xenlinux. If we do, it's a
> sign that something is very wrong! :-)
> 
>   -- Keir
I found a bug in phys_pud_init(). I'll send a patch. 

Jun
---
Intel Open Source Technology Center

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