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-ia64-devel

Re: [Xen-ia64-devel] [PATCH] fix gmfn_to_mfn

To: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH] fix gmfn_to_mfn
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Fri, 9 May 2008 15:40:59 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 08 May 2008 23:41:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <7kod7gc8na.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <7kod7gc8na.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Fri, May 09, 2008 at 03:07:53PM +0900, Kouya Shimura wrote:
Content-Description: message body text

> @@ -2838,7 +2842,7 @@ arch_memory_op(int op, XEN_GUEST_HANDLE(
>              goto out;
>  
>          /* Remove previously mapped page if it was present. */
> -        if (prev_mfn && mfn_valid(prev_mfn)) {
> +        if (mfn_valid(prev_mfn)) {
>              if (is_xen_heap_mfn(prev_mfn))
>                  /* Xen heap frames are simply unhooked from this phys slot. 
> */
>                  guest_physmap_remove_page(d, xatp.gpfn, prev_mfn);

Isn't prev_mfn != 0 check necessary?
guest_physmap_remove_page() with mfn = 0 hits BUG_ON()
(and guest_remove_page() calls guest_physmap_remove_page())

-- 
yamahata

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