From: Ian Campbell Subject: Re: xen.git branch reorg / success with 2.6.30-rc3 pv_ops dom0 Date: Fri, 5 Jun 2009 17:05:48 +0100 Message-ID: <1244217948.27370.213.camel@zakaz.uk.xensource.com> References: <4A119D4B.8030209@goop.org> <20090518175033.GU24960@edu.joroinen.fi> <1242896915.22654.99.camel@zakaz.uk.xensource.com> <20090522080655.GA24960@edu.joroinen.fi> <20090604202656.GR24960@edu.joroinen.fi> <1244197217.27370.146.camel@zakaz.uk.xensource.com> <20090605112347.GY24960@edu.joroinen.fi> <1244201864.27370.172.camel@zakaz.uk.xensource.com> <20090605133850.GA24960@edu.joroinen.fi> <1244209979.27370.188.camel@zakaz.uk.xensource.com> <20090605154130.GB24960@edu.joroinen.fi> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20090605154130.GB24960@edu.joroinen.fi> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Pasi =?ISO-8859-1?Q?K=E4rkk=E4inen?= Cc: Jeremy Fitzhardinge , Xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, 2009-06-05 at 11:41 -0400, Pasi K=C3=A4rkk=C3=A4inen wrote: > On Fri, Jun 05, 2009 at 02:52:59PM +0100, Ian Campbell wrote: > > On Fri, 2009-06-05 at 09:38 -0400, Pasi K=C3=A4rkk=C3=A4inen wrote: > > > (gdb) list *0xc0405d63 > > > 0xc0405d63 is in xen_set_pte (arch/x86/xen/mmu.c:683). > > > 678 ADD_STATS(pte_update_batched, paravirt_get_lazy_mod= e() =3D=3D PARAVIRT_LAZY_MMU); > > > 679 > > > 680 #ifdef CONFIG_X86_PAE > > > 681 ptep->pte_high =3D pte.pte_high; > > > 682 smp_wmb(); > > > 683 ptep->pte_low =3D pte.pte_low; > > > 684 #else > > > 685 *ptep =3D pte; > > > 686 #endif > > > 687 } > >=20 > > Good that makes most sense.=20 > >=20 >=20 > I rebuilt my Fedora 11 Xen 3.3.1-11 src.rpm with "debug=3Dy verbose=3Dy= crash_debug=3Dy". >=20 > And I rebuilt my pv_ops dom0 kernel (CONFIG_HIGHPTE=3Dy) with your > debugging patch applied. (Some hunks to swiotlb.h failed, because the c= ode > was already there.. with different newlines or so). I think I included those changes to swiotlb.h by mistake anyway. > Serial console log: > http://pasik.reaktio.net/xen/pv_ops-dom0-debug/pv_ops-dom0-log-03-with-= highpte-no-swap-with-debug.txt >=20 > (XEN) mm.c:2006:d0 Bad type (saw 28000001 !=3D exp e0000000) for mfn 68= 3f4 (pfn 29a0b) > (XEN) mm.c:707:d0 Error getting mfn 683f4 (pfn 29a0b) from L1 entry 000= 00000683f4063 for dom0 > (XEN) mm.c:3640:d0 ptwr_emulate: could not get_page_from_l1e() > BUG: unable to handle kernel paging request at c0207c80 > IP: [] xen_set_pte+0x89/0x93 > *pdpt =3D 000000003c8ef001=20 > Fixmap KM_PTE0 @ 0xf57f0000 > *pdpt =3D 000000003c8ef001=20 > Fixmap KM_PTE0 @ 0xf57ee000 > *pdpt =3D 000000003c8ef001=20 > Oops: 0003 [#1] SMP=20 Hmm, this isn't too useful because dump_pagetable() doesn't work for Xen guests -- it goes direct at the pagetables instead of going via the normal accessors so it misses the MFN<->PFN translations. I had some patches to unify the 32 and 64 bit versions of dump page table at one point, since the 64 bit version does the right thing. I'll see if I can find or reproduce them. Ian. >=20 >=20 > (gdb) list *0xc0405d63 > 0xc0405d63 is in xen_set_pte (arch/x86/xen/mmu.c:683). > 678 ADD_STATS(pte_update_batched, paravirt_get_lazy_mode() = =3D=3D PARAVIRT_LAZY_MMU); > 679 > 680 #ifdef CONFIG_X86_PAE > 681 ptep->pte_high =3D pte.pte_high; > 682 smp_wmb(); > 683 ptep->pte_low =3D pte.pte_low; > 684 #else > 685 *ptep =3D pte; > 686 #endif > 687 } >=20 >=20 > (gdb) disas 0xc0405d63 > Dump of assembler code for function xen_set_pte: > 0xc0405cda : push %ebp > 0xc0405cdb : mov %esp,%ebp > 0xc0405cdd : push %edi > 0xc0405cde : push %esi > 0xc0405cdf : mov %ecx,%esi > 0xc0405ce1 : push %ebx > 0xc0405ce2 : mov %eax,%ebx > 0xc0405ce4 : mov %edx,%eax > 0xc0405ce6 : sub $0x4,%esp > 0xc0405ce9 : and $0x400,%eax > 0xc0405cee : je 0xc0405cff > 0xc0405cf0 : mov %ebx,%eax > 0xc0405cf2 : push $0x7ff1 > 0xc0405cf7 : call 0xc0405c35 > 0xc0405cfc : pop %ebx > 0xc0405cfd : jmp 0xc0405d65 > 0xc0405cff : cmpb $0x0,0xc08f334c > 0xc0405d06 : je 0xc0405d1b > 0xc0405d08 <__constant_c_and_count_memset+0>: mov $0x33,%ecx > 0xc0405d0d <__constant_c_and_count_memset+5>: mov $0xc08f3280,%edi > 0xc0405d12 <__constant_c_and_count_memset+10>: rep stos %eax,%es:(%edi= ) > 0xc0405d14 : movb $0x0,0xc08f334c > 0xc0405d1b : incl 0xc08f32a4 > 0xc0405d21 : cmpb $0x0,0xc08f334c > 0xc0405d28 : je 0xc0405d3f > 0xc0405d2a <__constant_c_and_count_memset+0>: mov $0x33,%ecx > 0xc0405d2f <__constant_c_and_count_memset+5>: mov $0xc08f3280,%edi > 0xc0405d34 <__constant_c_and_count_memset+10>: xor %eax,%eax > 0xc0405d36 <__constant_c_and_count_memset+12>: rep stos %eax,%es:(%edi= ) > 0xc0405d38 : movb $0x0,0xc08f334c > 0xc0405d3f : mov 0xc08f32ac,%edi > 0xc0405d45 : mov %edx,-0x10(%ebp) > 0xc0405d48 : call 0xc0422f2a > 0xc0405d4d : dec %eax > 0xc0405d4e : sete %al > 0xc0405d51 : movzbl %al,%eax > 0xc0405d54 : lea (%eax,%edi,1),%edi > 0xc0405d57 : mov %edi,0xc08f32ac > 0xc0405d5d : mov %esi,0x4(%ebx) > 0xc0405d60 : mov -0x10(%ebp),%edx > 0xc0405d63 : mov %edx,(%ebx) > 0xc0405d65 : lea -0xc(%ebp),%esp > 0xc0405d68 : pop %ebx > 0xc0405d69 : pop %esi > 0xc0405d6a : pop %edi > 0xc0405d6b : pop %ebp > 0xc0405d6c : ret =20 > End of assembler dump. > (gdb)=20 >=20 > -- Pasi >=20