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] Re: Panic on cpu0

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: Panic on cpu0
From: ZhouPeng <zpengxen@xxxxxxxxx>
Date: Thu, 16 Dec 2010 23:18:59 +0800
Cc: "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>, keir.fraser@xxxxxxxxxxxxx
Delivery-date: Thu, 16 Dec 2010 07:20:19 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=T1S3UfKU3feYGh8RJ8joknINdvlaj00BtnhOoKTcRek=; b=lKQa2JbcvzeAti1yR9FQhdorRW8+/+9ZB4eyQUaa2X4TnMJpFslm/sbfktxR8zp/hU BBtgoYifn6rJh2U15kADZTx75XNV5Ga4qGLo7WlSnm2P6wJ+KHH2uUzjWR+LVdHk9M7E 81mWrcc/H/k2SHsCgoAzRAh9Tfw3Rccn3O3po=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=nXFpmmpE83KiD6fo0NZcX32u8V26TTAfkeD50YbxMic1ahOCbb1VIenLnm62HsU4f5 M8B2aurCEsZcD3Pwdnbva2taEpfXeEgKzOmb6c8hPgctQYgIWJrTWw14sTIKE12XtvX0 5VPMUobqsNiSzevsVIMOxmapot+5ZfT25IUDA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D0A0A7F0200007800028595@xxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AANLkTima5WK3t1D6T2C5FVEWdxzJhUA9GGaY5pnY6ec5@xxxxxxxxxxxxxx> <AANLkTimZifyh7Zw=AG=JP=Q7zP5Pevr4fYXudftrKNUG@xxxxxxxxxxxxxx> <20101216075912.GG2754@xxxxxxxxxxx> <AANLkTi=mLQzJkJ08DxMHDXWrLxyH++BymrTNPP-F9zba@xxxxxxxxxxxxxx> <4D0A0A7F0200007800028595@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
The patch works.
Thanks.

2010/12/16 Jan Beulich <JBeulich@xxxxxxxxxx>
>>> On 16.12.10 at 10:30, ZhouPeng <zpengxen@xxxxxxxxx> wrote:
> The err msg appears in
> void *map_domain_page(unsigned long mfn)
>       BUG_ON(idx >= MAPCACHE_ENTRIES);
>
> printk idx is 1024 and BUG_ON is called.
>
> I print  Xen call trace msg:
>
> [<ffcd3c2>]  map_domain_page+0x1a2/0x230
> [<ff1cd718>] unmap_domain_page+0x148/0x160
>                    addr_to_dma_page_maddr+0x1f6/0x250
>                    __find_next_zero_bit+0x80/0x90
>                    intel_iommu_map_page+0x14a/0x250
>                    domain_context_mapping+0x14a/0x250
>                    rmrr_identity_mapping+0xb7/0x120
>                    intel_iommu_dom0_init+0x143/0x1eb
>                    construct_dom0+0x138f/0x16b0
>                    __start_xen+0x109a/0x1680
>                    e820nf+0x0/0x4
>                    __high_start+0x58/0x5a

Could you give the below patch a try?

Jan

--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1331,6 +1331,7 @@ int domain_context_mapping_one(
    if ( context_set_domain_id(context, domain, iommu) )
    {
        spin_unlock(&iommu->lock);
+        unmap_vtd_domain_page(context_entries);
        return -EFAULT;
    }

@@ -1672,6 +1673,7 @@ static int intel_iommu_map_page(
    if ( old.val == new.val )
    {
        spin_unlock(&hd->mapping_lock);
+        unmap_vtd_domain_page(page);
        return 0;
    }
    *pte = new;





--
Zhou Peng
My daily E-Mail: ailvpeng25@xxxxxxxxx
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>