From: John Byrne <john.l.byrne@hp.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: xen-devel <xen-devel@lists.xensource.com>,
Jan Beulich <jbeulich@novell.com>
Subject: Re: x86-64 machine_to_phys vs NX bit
Date: Mon, 13 Nov 2006 12:45:45 -0800 [thread overview]
Message-ID: <4558D979.9000902@hp.com> (raw)
In-Reply-To: <C17DDA47.4399%Keir.Fraser@cl.cam.ac.uk>
Keir Fraser wrote:
> On 13/11/06 8:07 am, "Jan Beulich" <jbeulich@novell.com> wrote:
>
>>> There was a bug in my previous patch. (There's nothing like trying to
>>> get to sleep and realizing you've screwed up.) The x86 pae
>>> PHYSICAL_PAGE_MASK I defined was incorrect because PAGE_MASK was only a
>>> long. I hope I haven't done anything else wrong.
>> I don't think this is correct - machine_to_phys() translates a machine address
>> to a physical one, and in that translation the upper bits matter only as much
>> as mfn_to_pfn() should return an invalid indicator if any of them is set. In
>> turn,
>> it should be the caller's responsibility to make sure the NX bit (and any
>> potential
>> other one being set beyond bit 52) gets masked off *before* calling this
>> function. (Specifically, the preserving of the lower bits is to properly
>> translate
>> a non-page aligned address, not to preserve attribute bits read from a page
>> table entry).
>
> Yes, we should keep the old machine_to_phys() definition and rename John's
> new version as pte_machine_to_phys(). The latter should be used in all
> contexts where machine_to_phys() currently operates on a pte (that's most of
> its uses, actually). This is a worthwhile cleanup and clarification. Could
> you respin the patch, John?
>
> Thanks,
> Keir
>
>
>
I've made the change. I'll send it out after I've built and tested it.
John
next prev parent reply other threads:[~2006-11-13 20:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-11 4:30 x86-64 machine_to_phys vs NX bit 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 [this message]
2006-11-14 1:15 ` John Byrne
2006-11-14 8:05 ` Jan Beulich
2006-11-14 8:17 ` Keir Fraser
-- strict thread matches above, loose matches on Subject: below --
2006-08-25 17:02 Nakajima, Jun
2006-08-25 15:56 Ian Pratt
2006-08-25 15:37 Nakajima, Jun
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-24 19:25 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
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=4558D979.9000902@hp.com \
--to=john.l.byrne@hp.com \
--cc=Keir.Fraser@cl.cam.ac.uk \
--cc=jbeulich@novell.com \
--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.