All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel@lists.xensource.com
Subject: Re: x86-64 machine_to_phys vs NX bit
Date: Fri, 25 Aug 2006 09:54:46 -0400	[thread overview]
Message-ID: <44EF0126.2050002@redhat.com> (raw)
In-Reply-To: <C114662D.C52%Keir.Fraser@cl.cam.ac.uk>

Keir Fraser wrote:
> On 24/8/06 8:25 pm, "Rik van Riel" <riel@redhat.com> wrote:
> 
>> Say, something like the following?
>>
>> -    paddr_t phys = mfn_to_pfn(machine >> PAGE_SHIFT);
>> +    paddr_t phys = mfn_to_pfn((machine >> PAGE_SHIFT) & PHYSICAL_MASK);
>>
>> I'm still thinking I may have missed something in the code
>> somewhere, but I've been looking at this for over an hour now
>> and can't seem to find it...
>>
>> Any ideas?
> 
> Your suggested patch looks reasonable but it'd be good to find out why this
> hasn't caused us problems. For example, perhaps supported_pte_mask doesn't
> include PAGE_NX, so we're never setting the NX bit on 64-bit PTEs?

We do set the NX bit.  Including on vmalloced pages...

> That must be worth checking out, possibly also tracing 
> machine_to_phys to find out where that bit 63 goes -- I agree that it
> looks like mfn_to_pfn() shouldn't work if bit63 is set in the
> 'maddr' argument.

Absolutely :)

-- 
What is important?  What you want to be true, or what is true?

  parent reply	other threads:[~2006-08-25 13:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-24 19:25 x86-64 machine_to_phys vs NX bit Rik van Riel
2006-08-25  7:32 ` Keir Fraser
2006-08-25 13:11   ` Jan Beulich
2006-08-25 13:54   ` Rik van Riel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-08-25 14:46 Nakajima, Jun
2006-08-25 15:10 ` Keir Fraser
2006-08-25 15:19   ` Rik van Riel
2006-08-25 15:27     ` Keir Fraser
2006-08-25 15:37 Nakajima, Jun
2006-08-25 15:56 Ian Pratt
2006-08-25 17:02 Nakajima, Jun
2006-11-11  4:30 John Byrne
2006-11-11  9:56 ` John Byrne
2006-11-13  8:07   ` Jan Beulich
2006-11-13  8:16     ` Keir Fraser
2006-11-13 20:45       ` John Byrne
2006-11-14  1:15         ` John Byrne
2006-11-14  8:05           ` Jan Beulich
2006-11-14  8:17             ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44EF0126.2050002@redhat.com \
    --to=riel@redhat.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.