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] Xen panics when domvti is destroyed

Hi Alex,

Could you apply an attached patch?
There is no difference between Anthony's patch and my old one
because all vcpus are stopped completely.

Thanks,
Kouya

Signed-off-by: Kouya SHIMURA <kouya@xxxxxxxxxxxxxx>
Signed-off-by: Anthony Xu < anthony.xu@xxxxxxxxx >

diff -r fcd746cf4647 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Sat Oct 14 18:10:08 2006 -0600
+++ b/xen/arch/ia64/xen/domain.c        Mon Oct 16 20:42:45 2006 +0900
@@ -342,7 +342,7 @@ void relinquish_vcpu_resources(struct vc
 
 void free_vcpu_struct(struct vcpu *v)
 {
-       if (VMX_DOMAIN(v))
+       if (v->domain->arch.is_vti)
                vmx_relinquish_vcpu_resources(v);
        else
                relinquish_vcpu_resources(v);
Xu, Anthony writes:
 > Hi Kouya,
 > 
 > Good catch!
 > 
 > I think the root cause is, when VTI-domain is destroyed, vti-flag in vcpu 
 > structure is not set while vti-flag in domain structure is set, so XEN think 
 > of this vcpu as domU vcpu by mistake, then issue appears,
 > 
 > Yes, your patch can fix this issue, but seems it may incur memory leak. 
 > Maybe following small modification is needed.
 > 
 > Anthony
 > 
 > --- a/xen/arch/ia64/xen/domain.c     Sun Oct 08 18:55:12 2006 -0600
 > +++ b/xen/arch/ia64/xen/domain.c     Tue Oct 10 19:06:44 2006 +0900
 > @@ -341,9 +341,11 @@ void relinquish_vcpu_resources(struct vc
 >  
 >  void free_vcpu_struct(struct vcpu *v)
 >  {
 > -    if (VMX_DOMAIN(v))
 > -            vmx_relinquish_vcpu_resources(v);
 > -    else
 > +    if (v->domain->arch.is_vti) {
 > +            vmx_relinquish_vcpu_resources(v);
 > +    } else
 >              relinquish_vcpu_resources(v);
 >  
 >      free_xenheap_pages(v, KERNEL_STACK_SIZE_ORDER);
 > 
 > 
 > 
 > >-----Original Message-----
 > >From: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
 > >[mailto:xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Kouya 
 > >SHIMURA
 > >Sent: 2006年10月10日 18:31
 > >To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
 > >Subject: [Xen-ia64-devel] [PATCH] Xen panics when domvti is destroyed
 > >
 > >Hi,
 > >
 > >I got the following panic message when I destroyed a domvti which has
 > >2 vcpus and 2nd vcpu is not booted yet. This panic occurs from cset 11745.
 > >Attached patch fixes it.
 > >
 > >(XEN) ia64_fault, vector=0x1e, ifa=0xf00000000414802a, 
 > >iip=0xf000000004030ef0, i
 > >psr=0x0000121008226018, isr=0x00000a0600000000
 > >(XEN) Unaligned Reference.
 > >(XEN) d 0xf000000007d5c080 domid 0
 > >(XEN) vcpu 0xf000000007d30000 vcpu 0
 > >(XEN)
 > >(XEN) CPU 1
 > >(XEN) psr : 0000121008226018 ifs : 800000000000040b ip  : 
 > >[<f000000004030ef1>]
 > >(XEN) ip is at free_domheap_pages+0x131/0x7f0
 > >(XEN) unat: 0000000000000000 pfs : 0000000000000206 rsc : 0000000000000003
 > >(XEN) rnat: 0000000000000206 bsps: 0000000000000003 pr  : 0000000005569aab
 > >(XEN) ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c0270033f
 > >(XEN) csd : 0000000000000000 ssd : 0000000000000000
 > >(XEN) b0  : f000000004074930 b6  : f000000004034130 b7  : a000000100067a90
 > >(XEN) f6  : 1003e00000000000670a4 f7  : 1003ecccccccccccccccd
 > >(XEN) f8  : 1003e00000000000c2d06 f9  : 10001c000000000000000
 > >(XEN) f10 : 100099c1aaaaaaa0e9000 f11 : 1003e00000000000004e0
 > >(XEN) r1  : f000000004316d10 r2  : 0000000000000000 r3  : f000000007d37fe8
 > >(XEN) r8  : 0000000000000040 r9  : 0000000000000000 r10 : 0000000000000000
 > >(XEN) r11 : 0009804c0270033f r12 : f000000007d37930 r13 : f000000007d30000
 > >(XEN) r14 : 0000000000000000 r15 : 000000019c290000 r16 : 0000000000000001
 > >(XEN) r17 : f000000007ff7510 r18 : f000000007a0eb00 r19 : f000000007ff7500
 > >(XEN) r20 : f000000007a0eb08 r21 : f00000000414803a r22 : f00000000414802a
 > >(XEN) r23 : f0000000040e8200 r24 : 0000001008226018 r25 : f00000000411f420
 > >(XEN) r26 : f000000004119300 r27 : 0000000000000000 r28 : fffffffffff00001
 > >(XEN) r29 : 0000000080000000 r30 : 0000000000000001 r31 : f00000000414802a
 > >(XEN)
 > >(XEN) Call Trace:
 > >(XEN)  [<f000000004099b40>] show_stack+0x80/0xa0
 > >(XEN)                                 sp=f000000007d37560 
 > >bsp=f000000007d310d0
 > >(XEN)  [<f00000000406b050>] ia64_fault+0x280/0x670
 > >(XEN)                                 sp=f000000007d37730 
 > >bsp=f000000007d31098
 > >(XEN)  [<f000000004096b00>] ia64_leave_kernel+0x0/0x310
 > >(XEN)                                 sp=f000000007d37730 
 > >bsp=f000000007d31098
 > >(XEN)  [<f000000004030ef0>] free_domheap_pages+0x130/0x7f0
 > >(XEN)                                 sp=f000000007d37930 
 > >bsp=f000000007d31040
 > >(XEN)  [<f000000004074930>] pervcpu_vhpt_free+0x30/0x50
 > >(XEN)                                 sp=f000000007d37930 
 > >bsp=f000000007d31020
 > >(XEN)  [<f0000000040505d0>] relinquish_vcpu_resources+0x50/0xf0
 > >(XEN)                                 sp=f000000007d37930 
 > >bsp=f000000007d30ff0
 > >(XEN)  [<f000000004050700>] free_vcpu_struct+0x90/0xc0
 > >(XEN)                                 sp=f000000007d37930 
 > >bsp=f000000007d30fd0
 > >(XEN)  [<f00000000401e380>] free_domain+0x50/0x90
 > >(XEN)                                 sp=f000000007d37930 
 > >bsp=f000000007d30fa0
 > >(XEN)  [<f00000000401f100>] domain_destroy+0x2e0/0x320
 > >(XEN)                                 sp=f000000007d37930 
 > >bsp=f000000007d30f80
 > >(XEN)  [<f000000004031190>] free_domheap_pages+0x3d0/0x7f0
 > >(XEN)                                 sp=f000000007d37940 
 > >bsp=f000000007d30f40
 > >(XEN)  [<f0000000040627d0>] zap_domain_page_one+0x360/0x4d0
 > >(XEN)                                 sp=f000000007d37940 
 > >bsp=f000000007d30ef8
 > >(XEN)  [<f000000004062980>] dom0vp_zap_physmap+0x40/0x70
 > >(XEN)                                 sp=f000000007d37940 
 > >bsp=f000000007d30ec8
 > >(XEN)  [<f00000000404f2f0>] do_dom0vp_op+0x250/0x300
 > >(XEN)                                 sp=f000000007d37940 
 > >bsp=f000000007d30e80
 > >(XEN)  [<f00000000405bed0>] ia64_hypercall+0x7b0/0xdc0
 > >(XEN)                                 sp=f000000007d37940 
 > >bsp=f000000007d30e20
 > >(XEN)  [<f00000000406b590>] ia64_handle_break+0x150/0x2e0
 > >(XEN)                                 sp=f000000007d37df0 
 > >bsp=f000000007d30de0
 > >(XEN)  [<f000000004096b00>] ia64_leave_kernel+0x0/0x310
 > >(XEN)                                 sp=f000000007d37e00 
 > >bsp=f000000007d30de0
 > >(XEN)
 > >(XEN) ****************************************
 > >(XEN) Panic on CPU 1:
 > >(XEN) Fault in Xen.
 > >(XEN) ****************************************
 > >
 > >Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel