WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [patch] pagetable cleanups

To: Gerd Knorr <kraxel@xxxxxxxxxxx>
Subject: Re: [Xen-devel] [patch] pagetable cleanups
From: Christian Limpach <christian.limpach@xxxxxxxxx>
Date: Thu, 14 Apr 2005 09:47:49 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 14 Apr 2005 16:47:45 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hGRZ0bbRPYK4wq0fCHqmk+Tjm/t0xdYGFwfUFCkpOXeYDtMGJl4CKBM4e2efNM/xvepG8gQPuq0ttibgPi0j4dANDRRIXstcekEVbQutCupirnmxNMZK31IG1cUcpT5Rw85ZJHmd1D+S5fC4cHivZ/xMVgpXqZ8C5llc4O+hB5U=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20050412185856.GA5832@bytesex>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20050412185856.GA5832@bytesex>
Reply-to: Christian.Limpach@xxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 4/12/05, Gerd Knorr <kraxel@xxxxxxxxxxx> wrote:
> Index: xen/arch/x86/shadow.c
> ===================================================================
> --- 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,
> 
>     for ( i = 0; i < limit; i++ )
>     {
> -        unsigned long hl2e = 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)));
>     }
> 
>     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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel