From owner-freebsd-xen@FreeBSD.ORG Mon Dec 12 11:07:38 2011 Return-Path: Delivered-To: freebsd-xen@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DA27106564A for ; Mon, 12 Dec 2011 11:07:38 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5B71B8FC0C for ; Mon, 12 Dec 2011 11:07:38 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pBCB7cVs030228 for ; Mon, 12 Dec 2011 11:07:38 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pBCB7bcc030226 for freebsd-xen@FreeBSD.org; Mon, 12 Dec 2011 11:07:37 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 12 Dec 2011 11:07:37 GMT Message-Id: <201112121107.pBCB7bcc030226@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-xen@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-xen@FreeBSD.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2011 11:07:38 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/161318 xen [xen] sysinstall crashes with floating point exception o kern/155468 xen [xen] Xen PV i386 multi-kernel CPU system is not worki o kern/155353 xen [xen] [patch] put "nudging TOD" message under boot_ver o kern/154833 xen [xen]: xen 4.0 - DomU freebsd8.2RC3 i386, XEN kernel. o kern/154473 xen [xen] xen 4.0 - DomU freebsd8.1 i386, XEN kernel. Not o kern/154472 xen [xen] xen 4.0 - DomU freebsd8.1 i386 xen kernel reboot o kern/154428 xen [xen] xn0 network interface and PF - Massive performan o kern/153789 xen [xen] [regression] FreeBSD 8.2-RC1 crashes under Solar o kern/153674 xen [xen] i386/XEN idle thread shows wrong percentages o kern/153672 xen [xen] [panic] i386/XEN panics under heavy fork load o kern/153620 xen [xen] Xen guest system clock drifts in AWS EC2 (FreeBS o kern/153477 xen [xen] XEN pmap code abuses vm page queue lock o kern/153150 xen [xen] xen/ec2: disable checksum offloading on interfac o kern/152228 xen [xen] [panic] Xen/PV panic with machdep.idle_mwait=1 o kern/144629 xen [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't wor o kern/143398 xen [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't wor o kern/143340 xen [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't wor f kern/143069 xen [xen] [panic] Xen Kernel Panic - Memory modified after f kern/135667 xen ufs filesystem corruption on XEN DomU system f kern/135421 xen [xen] FreeBSD Xen PVM DomU network failure - netfronc. f kern/135178 xen [xen] Xen domU outgoing data transfer stall when TSO i p kern/135069 xen [xen] FreeBSD-current/Xen SMP doesn't function at all f i386/124516 xen [xen] FreeBSD-CURRENT Xen Kernel Segfaults when config o kern/118734 xen [xen] FreeBSD 6.3-RC1 and FreeBSD 7.0-BETA 4 fail to b 24 problems total. From owner-freebsd-xen@FreeBSD.ORG Fri Dec 16 19:49:00 2011 Return-Path: Delivered-To: xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30B0E1065675 for ; Fri, 16 Dec 2011 19:49:00 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh5.mail.rice.edu (mh5.mail.rice.edu [128.42.199.32]) by mx1.freebsd.org (Postfix) with ESMTP id F31128FC12 for ; Fri, 16 Dec 2011 19:48:59 +0000 (UTC) Received: from mh5.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh5.mail.rice.edu (Postfix) with ESMTP id E7DAE290FFA; Fri, 16 Dec 2011 13:32:31 -0600 (CST) Received: from mh5.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh5.mail.rice.edu (Postfix) with ESMTP id D4EE3290FFC; Fri, 16 Dec 2011 13:32:31 -0600 (CST) X-Virus-Scanned: by amavis-2.6.4 at mh5.mail.rice.edu, auth channel Received: from mh5.mail.rice.edu ([127.0.0.1]) by mh5.mail.rice.edu (mh5.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id S2ElfrLKQ8Ew; Fri, 16 Dec 2011 13:32:31 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh5.mail.rice.edu (Postfix) with ESMTPSA id 42C93290FFA; Fri, 16 Dec 2011 13:32:31 -0600 (CST) Message-ID: <4EEB9CCE.6090701@rice.edu> Date: Fri, 16 Dec 2011 13:32:30 -0600 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111113 Thunderbird/8.0 MIME-Version: 1.0 To: xen@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alan Cox Subject: PV i386 patch X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2011 19:49:00 -0000 Is anyone here actively working on fixing problems with SMP support under PV i386? While doing some other maintenance on the vm_page_alloc() callers in the source tree, I happened to take a look at cpu_initialize_context() in mp_machdep.c. This function is involved in bringing up the 2nd, 3rd, etc. CPUs on an SMP system. I spotted a couple obvious errors. First, the size parameter given to kmem_*() functions is expected to be in terms of bytes and not pages. Second, I believe that PV i386 requires PAE to be used. If so, there are out of range accesses to the array m[]. Index: i386/xen/mp_machdep.c =================================================================== --- i386/xen/mp_machdep.c (revision 228561) +++ i386/xen/mp_machdep.c (working copy) @@ -810,7 +810,7 @@ cpu_initialize_context(unsigned int cpu) { /* vcpu_guest_context_t is too large to allocate on the stack. * Hence we allocate statically and protect it with a lock */ - vm_page_t m[4]; + vm_page_t m[NPGPTD + 2]; static vcpu_guest_context_t ctxt; vm_offset_t boot_stack; vm_offset_t newPTD; @@ -831,8 +831,8 @@ cpu_initialize_context(unsigned int cpu) pmap_zero_page(m[i]); } - boot_stack = kmem_alloc_nofault(kernel_map, 1); - newPTD = kmem_alloc_nofault(kernel_map, NPGPTD); + boot_stack = kmem_alloc_nofault(kernel_map, PAGE_SIZE); + newPTD = kmem_alloc_nofault(kernel_map, NPGPTD * PAGE_SIZE); ma[0] = VM_PAGE_TO_MACH(m[0])|PG_V; #ifdef PAE @@ -854,7 +854,7 @@ cpu_initialize_context(unsigned int cpu) nkpt*sizeof(vm_paddr_t)); pmap_qremove(newPTD, 4); - kmem_free(kernel_map, newPTD, 4); + kmem_free(kernel_map, newPTD, 4 * PAGE_SIZE); /* * map actual idle stack to boot_stack */ From owner-freebsd-xen@FreeBSD.ORG Fri Dec 16 21:11:07 2011 Return-Path: Delivered-To: xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34D5A106564A for ; Fri, 16 Dec 2011 21:11:07 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id E75CF8FC13 for ; Fri, 16 Dec 2011 21:11:06 +0000 (UTC) Received: from [127.0.0.1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id pBGL0Fd6044195; Fri, 16 Dec 2011 13:00:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1324069215; bh=ZxyJvgsIJB8cvRhfIqos+t0kbtW6chBOC68tT781n7g=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=JBQro/jZRinLCGp7Sd1HeXur9lUtNQOIy51KSbiCVKvahNOSh0/ve2TZVGJhgbnQJ BuI5BUHL/oNFCACo9nTyXkFsQQtInwLxZa4vVw0yXoPEyYcl6zO4U8Kr+flpnPeWrF Q+hS9e3gW1J8Ic4AFhk/WOORauIFd/mxFvBTrDws= From: Sean Bruno To: Alan Cox In-Reply-To: <4EEB9CCE.6090701@rice.edu> References: <4EEB9CCE.6090701@rice.edu> Content-Type: text/plain; charset="UTF-8" Date: Fri, 16 Dec 2011 13:00:14 -0800 Message-ID: <1324069214.2669.6.camel@hitfishpass-lx.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit Cc: Alan Cox , "xen@freebsd.org" Subject: Re: PV i386 patch X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2011 21:11:07 -0000 I'll test this out on the VMs in the fbsd cluster later. Sean On Fri, 2011-12-16 at 11:32 -0800, Alan Cox wrote: > Is anyone here actively working on fixing problems with SMP support > under PV i386? While doing some other maintenance on the > vm_page_alloc() callers in the source tree, I happened to take a look at > cpu_initialize_context() in mp_machdep.c. This function is involved in > bringing up the 2nd, 3rd, etc. CPUs on an SMP system. I spotted a > couple obvious errors. First, the size parameter given to kmem_*() > functions is expected to be in terms of bytes and not pages. Second, I > believe that PV i386 requires PAE to be used. If so, there are out of > range accesses to the array m[]. > > Index: i386/xen/mp_machdep.c > =================================================================== > --- i386/xen/mp_machdep.c (revision 228561) > +++ i386/xen/mp_machdep.c (working copy) > @@ -810,7 +810,7 @@ cpu_initialize_context(unsigned int cpu) > { > /* vcpu_guest_context_t is too large to allocate on the stack. > * Hence we allocate statically and protect it with a lock */ > - vm_page_t m[4]; > + vm_page_t m[NPGPTD + 2]; > static vcpu_guest_context_t ctxt; > vm_offset_t boot_stack; > vm_offset_t newPTD; > @@ -831,8 +831,8 @@ cpu_initialize_context(unsigned int cpu) > pmap_zero_page(m[i]); > > } > - boot_stack = kmem_alloc_nofault(kernel_map, 1); > - newPTD = kmem_alloc_nofault(kernel_map, NPGPTD); > + boot_stack = kmem_alloc_nofault(kernel_map, PAGE_SIZE); > + newPTD = kmem_alloc_nofault(kernel_map, NPGPTD * PAGE_SIZE); > ma[0] = VM_PAGE_TO_MACH(m[0])|PG_V; > > #ifdef PAE > @@ -854,7 +854,7 @@ cpu_initialize_context(unsigned int cpu) > nkpt*sizeof(vm_paddr_t)); > > pmap_qremove(newPTD, 4); > - kmem_free(kernel_map, newPTD, 4); > + kmem_free(kernel_map, newPTD, 4 * PAGE_SIZE); > /* > * map actual idle stack to boot_stack > */ > > _______________________________________________ > freebsd-xen@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-xen > To unsubscribe, send any mail to "freebsd-xen-unsubscribe@freebsd.org"