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/
Home Products Support Community News


RE: [Xen-devel] [patch] (resend) mask out nx bits when calculatingpfn/mf

To: "Scott Parish" <srparish@xxxxxxxxxx>
Subject: RE: [Xen-devel] [patch] (resend) mask out nx bits when calculatingpfn/mfn
From: "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Date: Tue, 7 Jun 2005 10:16:19 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 07 Jun 2005 17:15:35 +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: AcVrgyyKtIprxB9aTYGTWwUaDWW81QAAG6wg
Thread-topic: [Xen-devel] [patch] (resend) mask out nx bits when calculatingpfn/mfn
Scott Parish wrote:
> On Tue, Jun 07, 2005 at 09:58:20AM -0700, Nakajima, Jun wrote:
>> But did you really see the NX bit? I think that (NX bit) would be a
>> good catch and it explains several failures of device drivers.  We
>> should fix the creator of the pte (by __supported_pte_mask), not the
>> consumer of it.
> I was seeing it in xen_contig_memory(), which was getting called by
> e100_alloc_cbs(). The crash was happening when i would run "xend
> start" 
> By "fix the creator", your suggesting that there shouldn't be an NX
> bit set? Why?

Right now, it's disabled (because Xen does not like it) in setup64.c
(see below). Adding NX support is on my plate, but welcome to take it.
See http://wiki.xensource.com/xenwiki/XenTodoList.

void __init check_efer(void)
        unsigned long efer;

        /*      rdmsrl(MSR_EFER, efer);  */

         * At this point, Xen does not like the bit 63.
         * So NX is not supported. Come back later.
        efer = 0;

        if (!(efer & EFER_NX) || do_not_nx) { 
                __supported_pte_mask &= ~_PAGE_NX; 

>> We also need to fix Xen because Xen should not reject the request
>> just because it has the NX bit on.
> An NX bit is now an official part of a page frame number???
> i'm confused
No, Xen should mask off the bit when calculating the page frame number,
and looks like it's not happening. 

> sRp

Intel Open Source Technology Center

Xen-devel mailing list