John Byrne wrote: > Keir Fraser wrote: >> On 24/8/06 8:25 pm, "Rik van Riel" 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 >> >> > > While trying to debug a migration problem in Xen 3.0.3 I have noticed > this issue. I don't see a fix in xen-unstable. Has this gotten dropped > on the floor? > > The suggested patch above is not quite correct or complete. My proposed > patch aqainst xen-unstable changeset 12364:d19deb173503 is attached. > Note that there is also an issue in x86 PAE: machine_to_phys() currently > will strip the NX bit. > > Signed-off-by: John Byrne > <...snipped...> 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. John Byrne Signed-off-by: John Byrne