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][RFC] Avoid to domain_put_page pte of INVALI

To: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [Patch][RFC] Avoid to domain_put_page pte of INVALID_M2P_ENTRY
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 24 Apr 2008 15:55:47 +0900
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 23 Apr 2008 23:56:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <62C8A4FE1CF83Ftakebe_akio@xxxxxxxxxxxxxx>
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: <62C8A4FE1CF83Ftakebe_akio@xxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Wed, Apr 23, 2008 at 01:54:29PM +0900, Akio Takebe wrote:
Content-Description: Mail message body
> Hi,

Hi Akio.


> This log show that domain_put_page is called 2 times for the same mfn.
> But the mfn has different mpaddrs.
> I guess the follwing case is occured:
> 1. at 1st time, domain_put_page is called.
> 2. it sets INMALID_M2P_ENTRY to the mfn.
> 3. at 2nd time, domain_put_page is called.
> 4. it hits BUG() becasuse of "get_gpfn_from_mfn(mfn) == INVALID_M2P_ENTRY"
> 
> The attached patch(avoid_to_domain_put_page_INVALID_M2P_ENTRY.patch) avoids to
> domain_put_page ptes of INVALID_M2P_ENTRY.
> After the patch was applied, I didn't get this issue.
> But I'm not sure yet that the patch is the correct way to fix this issue.
> I'll debug more, but if you have any comments, please tell me.


The BUG() check is correct. It correctly detected the inconsistency
between p2m table and m2p table.

It looks like xen/ia64's grant table implementation's bug.
Between 2 and 3, the page of mfn=a6a1f is assigned to
mpaddr=1ee44. So its m2p entry should be set to 1ee44.
But the entry isn't updated. It's the real issue.

Let me look into it.
Your stack trace didn't say about what grant table operation.
It should GNTTABOP_unmap_grant_ref or GNTTABOP_unmap_and_replace.
Do you know which it is?

-- 
yamahata

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