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] hvm passthru: Fix a xen-unstable crash

To: Wei Wang2 <wei.wang2@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] hvm passthru: Fix a xen-unstable crash
From: Keir Fraser <keir@xxxxxxx>
Date: Mon, 29 Nov 2010 14:48:46 +0000
Cc:
Delivery-date: Mon, 29 Nov 2010 06:49:42 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:user-agent:date :subject:from:to:message-id:thread-topic:thread-index:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=eKzaDKRFvH8n8NEEoHcf75D7II4Q6+gig845ucmRk6M=; b=s1lPSm9tvsAZHVMNugjXkkF7dg49Wu3l2RIRdZyx1J6mx6vLxhjZ2fGGwhPjJJl2ey j74pGDtOoBP4UQXhZWd5lm9D7CLN/Te7drjn+8MuctL0SCGO1KRewSCnulzKYhps51si 8oyetSjGLCgGX3o41VjM+8D2MSrXgMYkvDkCM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=NyVgWiuahDsLz+lxipju7kLA5N7eXdn133M07mW7P670upkgLVaXyUrBOpouCXNOAj XXn6niOyRdIaUcROMqa4aELQoudO+1w4siNnyv7MzhI0w+J4fCEtFvoCsvYmd6thw8gh +gDGapdUQbEgpv4sAzb8gweCrAwMzKq97n6vE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201011291534.51800.wei.wang2@xxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcuP1IZYWzf8VwYqTU6+qt1jF1x9qg==
Thread-topic: [Xen-devel] [PATCH] hvm passthru: Fix a xen-unstable crash
User-agent: Microsoft-Entourage/12.27.0.100910
Stefano,

Can you ack/nack this patch please.

 -- Keir

On 29/11/2010 14:34, "Wei Wang2" <wei.wang2@xxxxxxx> wrote:

> Hi,
> I got the following crash with latest unstable on my testing machine when
> destroying a hvm guest with passthru devices.
> 
> (XEN) ----[ Xen-4.1-unstable  x86_64  debug=y  Tainted:    C ]----
> (XEN) CPU:    1
> (XEN) RIP:    e008:[<ffff82c480115cb5>] free_xenheap_pages+0x10d/0x122
> (XEN) RFLAGS: 0000000000010283   CONTEXT: hypervisor
> (XEN) rax: 0000000000100000   rbx: 0000000000001000   rcx: 0000000000065d10
> (XEN) rdx: ffff82f601600008   rsi: 0000000000000014   rdi: ffff82f600945e00
> (XEN) rbp: ffff83014feefe10   rsp: ffff83014feefe10   r8:  bfffffffffffffff
> (XEN) r9:  ffffffffffffffff   r10: 0000000000000004   r11: 0000000000000004
> (XEN) r12: ffff83014a396000   r13: ffff83014a396000   r14: ffffffffffffffff
> (XEN) r15: ffff83014feeff18   cr0: 000000008005003b   cr4: 00000000000006f0
> (XEN) cr3: 0000000249201000   cr2: ffff82f601600008
> (XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e010   cs: e008
> (XEN) Xen stack trace from rsp=ffff83014feefe10:
> (XEN)    ffff83014feefe20 ffff82c4801283c7 ffff83014feefe40 ffff82c480155044
> (XEN)    ffff8300afe58000 00000000ffffffff ffff83014feefe70 ffff82c4801050b8
> (XEN)    ffff83014feefea0 0000000000000000 ffff83014ffa81a0 0000000000000000
> (XEN)    ffff83014feefea0 ffff82c480128e43 0000000000000001 0000000000000001
> (XEN)    0000000000000001 ffff82c4802af080 ffff83014feefee0 ffff82c480121243
> (XEN)    ffff83014feeff18 ffff83014feeff18 ffff8300afe6a000 ffff83014feefdf8
> (XEN)    ffff8300afcdc000 ffff83014ffa8040 ffff83014feefef0 ffff82c480121397
> (XEN)    ffff83014feeff10 ffff82c480151e06 ffff82c480121397 0000000000000001
> (XEN)    ffff83014feefd28 0000000000000000 0000000000000000 0000000000000000
> (XEN)    ffffffff807dc004 ffffffff8079bf48 0000000000000000 0000000000000246
> (XEN)    0000000000000060 0000000000000000 0000000000000000 0000000000000000
> (XEN)    ffffffff802053aa 0000000000000001 00000000deadbeef 00000000deadbeef
> (XEN)    0000010000000000 ffffffff802053aa 000000000000e033 0000000000000246
> (XEN)    ffffffff8079bf10 000000000000e02b 000000000000beef 000000000000beef
> (XEN)    000000000000beef 000000000000beef 0000000000000001 ffff8300afe6a000
> (XEN)    0000003ccfcd5d80 0000000000000000
> (XEN) Xen call trace:
> (XEN)    [<ffff82c480115cb5>] free_xenheap_pages+0x10d/0x122
> (XEN)    [<ffff82c4801283c7>] xfree+0x9d/0xad
> (XEN)    [<ffff82c480155044>] arch_domain_destroy+0x2de/0x2e3
> (XEN)    [<ffff82c4801050b8>] complete_domain_destroy+0x71/0x12c
> (XEN)    [<ffff82c480128e43>] rcu_process_callbacks+0x173/0x1df
> (XEN)    [<ffff82c480121243>] __do_softirq+0x86/0x97
> (XEN)    [<ffff82c480121397>] do_softirq+0x64/0x69
> (XEN)    [<ffff82c480151e06>] idle_loop+0x57/0x59
> (XEN)
> (XEN) Pagetable walk from ffff82f601600008:
> (XEN)  L4[0x105] = 00000000afca2027 5555555555555555
> (XEN)  L3[0x1d8] = 000000024ede2063 5555555555555555
> (XEN)  L2[0x00b] = 0000000000000000 ffffffffffffffff
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 1:
> (XEN) FATAL PAGE FAULT
> (XEN) [error_code=0002]
> (XEN) Faulting linear address: ffff82f601600008
> (XEN) ****************************************
> (XEN)
> (XEN) Reboot in five seconds...
> 
> It looks like, in function unmap_domain_pirq_emuirq(),  emuirq =
> domain_pirq_to_emuirq(d, pirq) returns a negative array subscript(-2).
> Attached patch could fix this issue.
> 
> Thanks,
> Wei
> 
> Signed-off-by: Wei Wang <wei.wang2@xxxxxxx>
> 
> Legal Information:
> Advanced Micro Devices GmbH
> Sitz: Dornach, Gemeinde Aschheim,
> Landkreis München Registergericht München,
> HRB Nr. 43632
> Geschäftsführer:
> Alberto Bozzo, Andrew Bowd
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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