[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] x86-64 machine_to_phys vs NX bit


  • To: Rik van Riel <riel@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
  • Date: Fri, 25 Aug 2006 08:32:45 +0100
  • Delivery-date: Fri, 25 Aug 2006 00:42:07 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcbIGKgA5nxKCDQLEduKvwANk04WTA==
  • Thread-topic: [Xen-devel] x86-64 machine_to_phys vs NX bit

On 24/8/06 8:25 pm, "Rik van Riel" <riel@xxxxxxxxxx> 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? 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.

 -- Keir



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.