From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Limpach Subject: Re: [patch] pagetable cleanups Date: Thu, 14 Apr 2005 09:47:49 -0700 Message-ID: <3d8eece205041409476fde7995@mail.gmail.com> References: <20050412185856.GA5832@bytesex> Reply-To: Christian.Limpach@cl.cam.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20050412185856.GA5832@bytesex> Content-Disposition: inline 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 4/12/05, Gerd Knorr wrote: > Index: xen/arch/x86/shadow.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- xen.orig/arch/x86/shadow.c 2005-04-12 17:01:41.000000000 +0200 > +++ xen/arch/x86/shadow.c 2005-04-12 17:33:01.000000000 +0200 > @@ -333,9 +333,8 @@ free_shadow_hl2_table(struct domain *d, >=20 > for ( i =3D 0; i < limit; i++ ) > { > - unsigned long hl2e =3D l1_pgentry_val(hl2[i]); > - if ( hl2e & _PAGE_PRESENT ) > - put_page(pfn_to_page(hl2e >> PAGE_SHIFT)); > + if ( l1e_get_flags(*hl2) & _PAGE_PRESENT ) > + put_page(pfn_to_page(l1e_get_pfn(*hl2))); > } >=20 > unmap_domain_mem(hl2); This hunk seems incorrect, you need to use hl2[i] instead of *hl2. We need to be careful not to introduce bugs when making cleanups like this one... It would be good if a few more people looked through the patch before we commit it, thanks! christian