From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Parish Subject: Re: PAE xen + linux kernel boots ... Date: Sat, 30 Apr 2005 09:51:24 +0000 Message-ID: <20050430095123.GE16883@us.ibm.com> References: <20050425172624.GB22076@bytesex> <87ll74o29m.fsf@bytesex.org> <20050430090117.GC16883@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20050430090117.GC16883@us.ibm.com> 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 List-Id: xen-devel@lists.xenproject.org On Sat, Apr 30, 2005 at 09:01:17AM +0000, Scott Parish wrote: > On Wed, Apr 27, 2005 at 02:03:17PM +0200, Gerd Knorr wrote: > > > Well, now it does, boots up to a login prompt ;) > > pl1e would straddle a page boundary I swear there is a muse associated with the send button on email clients. In this case the epiphany was the obvious--the problem was that we're missing alignment. But why? On the linux side of things we have the following in pgtable-3level.h: #if 1 /* writable pagetables */ static inline void set_pte(pte_t *ptep, pte_t pte) { ptep->pte_high = pte.pte_high; smp_wmb(); ptep->pte_low = pte.pte_low; } ... Here's what (i'm thinking) is going on. We go to set the high bits (first for atomicy: we don't set the active bit till last), but take a page fault, on the high bits--a 4 byte offset. Switch to xen, which is going to emulate some instructions and fake the writing. We eventually end up in ptwr_emulated_update(), who among other things, tries to copy the full l1_pgentry_t (64bits), but from the 4 byte offset, that is the 4 high bytes and then 4 bytes of undefined memory that may even be in another page. sRp -- Scott Parish