From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Parish Subject: Re: PAE xen + linux kernel boots ... Date: Wed, 4 May 2005 02:20:33 +0000 Message-ID: <20050504022033.GC7409@us.ibm.com> References: <20050425172624.GB22076@bytesex> <87ll74o29m.fsf@bytesex.org> <20050430090117.GC16883@us.ibm.com> <20050430095123.GE16883@us.ibm.com> <882ab72161e92b3470da1a3ce14b7a3b@cl.cam.ac.uk> <20050501081207.GF16883@us.ibm.com> <20050502140304.GA15699@bytesex> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ibTvN161/egqYuK8" Return-path: Content-Disposition: inline In-Reply-To: <20050502140304.GA15699@bytesex> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gerd Knorr Cc: xen-devel@lists.xensource.com, Scott Parish List-Id: xen-devel@lists.xenproject.org --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 02, 2005 at 04:03:05PM +0200, Gerd Knorr wrote: > > That didn't quite do the trick, but killing the machine_to_physical() > > conversion in pte_val() got things working. > > That looks like hiding a bug somewhere else. All the p??_val() > functions have a separate _ma() version which doesn't do the machine > to physical translation, so I'd suspect that happening due to some > place in the code using the wrong version of the macro, not due to > the macro itself being broken ... I'm pretty sure that set_pte_atomic() should be calling the _ma version of pte_val; compare and note that set_pte() is doing no machine_to_phys(). sRp Signed-off-by: Scott Parish -- Scott Parish --ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="set-pte-atomic.diff" * looking for pae@localhost/linux--pae--1.0--patch-2 to compare with * comparing to pae@localhost/linux--pae--1.0--patch-2 M include/asm-xen/asm-i386/page.h M include/asm-xen/asm-i386/pgtable-3level.h * modified files --- orig/include/asm-xen/asm-i386/page.h +++ mod/include/asm-xen/asm-i386/page.h @@ -116,7 +116,10 @@ if (ret) ret = machine_to_phys(ret) | 1; return ret; } -#define pte_val_ma(v) ((v).pte_low) /* FIXME */ +static inline unsigned long long pte_val_ma(pte_t x) +{ + return (unsigned long long)x.pte_high << 32 | x.pte_low; +} #define HPAGE_SHIFT 21 #else typedef struct { unsigned long pte_low; } pte_t; --- orig/include/asm-xen/asm-i386/pgtable-3level.h +++ mod/include/asm-xen/asm-i386/pgtable-3level.h @@ -60,7 +60,7 @@ ptep->pte_low = pte.pte_low; } # define set_pte_atomic(pteptr,pteval) \ - set_64bit((unsigned long long *)(pteptr),pte_val(pteval)) + set_64bit((unsigned long long *)(pteptr),pte_val_ma(pteval)) #else # define set_pte(pteptr,pteval) \ xen_l1_entry_update((pteptr), (pteval)) --ibTvN161/egqYuK8 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --ibTvN161/egqYuK8--