From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Knorr Subject: Re: [patch] pae: tlbflush linear page table updates Date: Wed, 10 Aug 2005 14:33:49 +0200 Message-ID: <20050810123349.GA3174@bytesex> References: <20050809075414.GA13745@bytesex> <416c694c7150940849398dfc41457960@cl.cam.ac.uk> <20050809135223.GA17751@bytesex> <20050809154400.GA20397@bytesex> <1a49dd852a0effd5c1f02f13280274ba@cl.cam.ac.uk> <20050810102222.GA32246@bytesex> <20050810102824.GB32246@bytesex> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Wed, Aug 10, 2005 at 11:54:22AM +0100, Keir Fraser wrote: > > On 10 Aug 2005, at 11:28, Gerd Knorr wrote: > > >And it isn't the mod_l3 update which broke PAE, it's the > >__not_mapped() removal. Applying the bits below reversed > >makes PAE boot again. > > afaics the only change for pae is use of __get_user() rather than > directly reading from the pl2e. Perhaps __get_user() on 8-byte > quantities is broken, although I'm sure that must be used elsewhere and > so is tested.... Sure? The patch below fixes it for me. The tlbflush stuff is red herring btw, the real difference is optimization. Build with "optimize=n" boot fine, others don't. Gerd Index: xen/arch/x86/mm.c =================================================================== --- xen.orig/arch/x86/mm.c 2005-08-10 14:09:59.476430318 +0200 +++ xen/arch/x86/mm.c 2005-08-10 14:13:50.906986616 +0200 @@ -2940,7 +2940,7 @@ int ptwr_do_page_fault(struct domain *d, pl2e = &__linear_l2_table[l2_idx]; which = PTWR_PT_INACTIVE; - if ( (__get_user(l2e.l2, &pl2e->l2) == 0) && (l2e_get_pfn(l2e) == pfn) ) + if ( (__copy_from_user(&l2e, pl2e, sizeof(l2e)) == 0) && (l2e_get_pfn(l2e) == pfn) ) { /* * Check the PRESENT bit to set ACTIVE mode.