From owner-freebsd-xen@FreeBSD.ORG Sun Dec 5 03:30:11 2010 Return-Path: Delivered-To: freebsd-xen@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21125106566B for ; Sun, 5 Dec 2010 03:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 06BF48FC13 for ; Sun, 5 Dec 2010 03:30:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB53UAQZ079838 for ; Sun, 5 Dec 2010 03:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB53UAYY079833; Sun, 5 Dec 2010 03:30:10 GMT (envelope-from gnats) Date: Sun, 5 Dec 2010 03:30:10 GMT Message-Id: <201012050330.oB53UAYY079833@freefall.freebsd.org> To: freebsd-xen@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/152818: commit references a PR X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service 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: Sun, 05 Dec 2010 03:30:11 -0000 The following reply was made to PR kern/152818; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/152818: commit references a PR Date: Sun, 5 Dec 2010 03:21:00 +0000 (UTC) Author: cperciva Date: Sun Dec 5 03:20:55 2010 New Revision: 216194 URL: http://svn.freebsd.org/changeset/base/216194 Log: MFamd64 r204214: Enforce stronger alignment semantics (require that the end of segments be aligned, not just the start of segments) in order to allow Xen's blkfront driver to operate correctly. PR: kern/152818 MFC after: 3 days Modified: head/sys/i386/i386/busdma_machdep.c Modified: head/sys/i386/i386/busdma_machdep.c ============================================================================== --- head/sys/i386/i386/busdma_machdep.c Sun Dec 5 01:17:53 2010 (r216193) +++ head/sys/i386/i386/busdma_machdep.c Sun Dec 5 03:20:55 2010 (r216194) @@ -246,8 +246,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, newtag->alignment = alignment; newtag->boundary = boundary; newtag->lowaddr = trunc_page((vm_paddr_t)lowaddr) + (PAGE_SIZE - 1); - newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + - (PAGE_SIZE - 1); + newtag->highaddr = trunc_page((vm_paddr_t)highaddr) + (PAGE_SIZE - 1); newtag->filter = filter; newtag->filterarg = filterarg; newtag->maxsize = maxsize; @@ -594,15 +593,19 @@ _bus_dmamap_count_pages(bus_dma_tag_t dm vendaddr = (vm_offset_t)buf + buflen; while (vaddr < vendaddr) { + bus_size_t sg_len; + + sg_len = PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK); if (pmap) paddr = pmap_extract(pmap, vaddr); else paddr = pmap_kextract(vaddr); if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && run_filter(dmat, paddr) != 0) { + sg_len = roundup2(sg_len, dmat->alignment); map->pagesneeded++; } - vaddr += (PAGE_SIZE - ((vm_offset_t)vaddr & PAGE_MASK)); + vaddr += sg_len; } CTR1(KTR_BUSDMA, "pagesneeded= %d\n", map->pagesneeded); } @@ -669,6 +672,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm bmask = ~(dmat->boundary - 1); for (seg = *segp; buflen > 0 ; ) { + bus_size_t max_sgsize; + /* * Get the physical address for this segment. */ @@ -680,11 +685,16 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm /* * Compute the segment size, and adjust counts. */ - sgsize = PAGE_SIZE - ((u_long)curaddr & PAGE_MASK); - if (sgsize > dmat->maxsegsz) - sgsize = dmat->maxsegsz; - if (buflen < sgsize) - sgsize = buflen; + max_sgsize = MIN(buflen, dmat->maxsegsz); + sgsize = PAGE_SIZE - ((vm_offset_t)curaddr & PAGE_MASK); + if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && + map->pagesneeded != 0 && run_filter(dmat, curaddr)) { + sgsize = roundup2(sgsize, dmat->alignment); + sgsize = MIN(sgsize, max_sgsize); + curaddr = add_bounce_page(dmat, map, vaddr, sgsize); + } else { + sgsize = MIN(sgsize, max_sgsize); + } /* * Make sure we don't cross any boundaries. @@ -695,10 +705,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dm sgsize = (baddr - curaddr); } - if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) && - map->pagesneeded != 0 && run_filter(dmat, curaddr)) - curaddr = add_bounce_page(dmat, map, vaddr, sgsize); - /* * Insert chunk into a segment, coalescing with * previous segment if possible. _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-xen@FreeBSD.ORG Mon Dec 6 10:26:47 2010 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 D1B181065670 for ; Mon, 6 Dec 2010 10:26:47 +0000 (UTC) (envelope-from ykohut@onapp.com) Received: from edgelb.ocscloud.net (edge02.ocscloud.net [91.210.68.36]) by mx1.freebsd.org (Postfix) with ESMTP id 65B378FC0C for ; Mon, 6 Dec 2010 10:26:46 +0000 (UTC) Received: from W01EXHUB01.hosting.tg.local (10.101.22.23) by W01EXEDGE02.hosting.tg.local (91.210.68.36) with Microsoft SMTP Server (TLS) id 8.1.311.2; Mon, 6 Dec 2010 10:26:44 +0000 Received: from [192.168.128.133] (194.44.160.178) by smtpauth.thinkgrid.net (10.101.22.25) with Microsoft SMTP Server (TLS) id 8.1.311.2; Mon, 6 Dec 2010 10:26:43 +0000 MIME-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset="us-ascii" From: Yuriy Kohut In-Reply-To: <87FC5EFE-EB1A-46CE-9E83-1109DD305C73@scsiguy.com> Date: Mon, 6 Dec 2010 12:26:42 +0200 Content-Transfer-Encoding: quoted-printable Message-ID: References: <4CED1799.6030608@scsiguy.com> <1290619446.2630.63.camel@home-yahoo> <1290781561.30429.289.camel@pow> <8E57474B-C39A-4B22-BDA5-373047093D8E@onapp.com> <4CF04C1E.2080906@scsiguy.com> <7AD6B2AA-AF37-4B09-AFC6-7447E9078F59@onapp.com> <4CF3C15D.6050105@scsiguy.com> <56A316BA-A9C1-4D3E-9B48-8B10E2B81B22@onapp.com> <99072F77-647D-4EF5-BAEA-D7172B36D9DE@onapp.com> <62E0B248-CE58-4EA6-86B8-726108A72E16@onapp.com> <1291153559.2928.198.camel@home-yahoo> <4CF57AAB.4020903@scsiguy.com> <4CF6B091.90608@scsiguy.com> <87FC5EFE-EB1A-46CE-9E83-1109DD305C73@scsiguy.com> To: Justin T.Gibbs X-Mailer: Apple Mail (2.1082) Cc: "freebsd-xen@freebsd.org" , Sean Bruno , "luke@hybrid-logic.co.uk" Subject: Re: Xen PV drivers for FreeBSD 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, 06 Dec 2010 10:26:47 -0000 Hi, Just let you know: everything starts work for me in 8.2-PRERELEASE = (RELENG_8) Thank you for your work. I'm also highly interesting FreeBSD paravirtualized DOMU to be stable. = I'll build test XEN i386 today. I'll let you know results if you want. --- Yura On Dec 3, 2010, at 3:23 PM, Justin T. Gibbs wrote: > On Dec 3, 2010, at 4:12 AM, Yuriy Kohut wrote: >=20 >> Hi, >>=20 >> I would not like to disturb you, but, have you a chance to reproduce = the issue ? >=20 > A FreeBSD stable/8 XENHVM kernel from yesterday functions properly for = me in my Xen environment. >=20 >> The problem is not with CDROM device, but with boot process stops. >=20 > Did you remove the CDROM from the device configuration for your = domain? My host systems do not have CDROM devices to pass through, so = I have not tested the impact of detecting a CDROM device on the FreeBSD = XENHVM device probe process.=20 >=20 > In short, I understand that you are not directly complaining a about = CDROM functionality, but my hunch is that the detection of a CDROM = device is exposing a bug in the block front driver which leads to a hang = during boot.=20 >=20 > -- > Justin From owner-freebsd-xen@FreeBSD.ORG Mon Dec 6 11:07:12 2010 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 4CA5D1065712 for ; Mon, 6 Dec 2010 11:07:12 +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 39CFC8FC18 for ; Mon, 6 Dec 2010 11:07:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB6B7CTZ068430 for ; Mon, 6 Dec 2010 11:07:12 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB6B7BUn068428 for freebsd-xen@FreeBSD.org; Mon, 6 Dec 2010 11:07:11 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 6 Dec 2010 11:07:11 GMT Message-Id: <201012061107.oB6B7BUn068428@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, 06 Dec 2010 11:07:12 -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/152818 xen [panic][xen] disk driver data cannot cross a page boun 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 o kern/143069 xen [xen] [panic] Xen Kernel Panic - Memory modified after o kern/141328 xen [xen] [panic] gstat exit causes kernel panic from unma o kern/140313 xen [xen] [panic] FreeBSD8 RC2 as PV domU crashes during c o 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 o 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 12 problems total. From owner-freebsd-xen@FreeBSD.ORG Mon Dec 6 16:02:05 2010 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 9ABE2106566B for ; Mon, 6 Dec 2010 16:02:05 +0000 (UTC) (envelope-from ykohut@onapp.com) Received: from edgelb.ocscloud.net (edge01.ocscloud.net [91.210.68.35]) by mx1.freebsd.org (Postfix) with ESMTP id 3F3038FC15 for ; Mon, 6 Dec 2010 16:02:04 +0000 (UTC) Received: from W01EXHUB01.hosting.tg.local (10.101.22.23) by W01EXEDGE01.hosting.tg.local (91.210.68.35) with Microsoft SMTP Server (TLS) id 8.1.311.2; Mon, 6 Dec 2010 16:02:02 +0000 Received: from [192.168.128.133] (194.44.160.178) by smtpauth.thinkgrid.net (10.101.22.25) with Microsoft SMTP Server (TLS) id 8.1.311.2; Mon, 6 Dec 2010 16:02:02 +0000 From: Yuriy Kohut Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 6 Dec 2010 18:02:01 +0200 Message-ID: To: "freebsd-xen@freebsd.org" MIME-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) Cc: Subject: FreeBSD 8.2-PRERELEASE (XEN) kernel panic at mkdir 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, 06 Dec 2010 16:02:05 -0000 Hi, I'm just installed the latest FreeBSD i386 Paravirtualized DomU based on = the XEN kernel from RELENG_8. Kernel panics while ports installing (using sysinstall).=20 lock order reversal: 1st 0xc0f37ab0 bufwait (bufwait) @ /usr/src/sys/kern/vfs_bio.c:2636 2nd 0xc13d3e00 dirhash (dirhash) @ = /usr/src/sys/ufs/ufs/ufs_dirhash.c:285 KDB: stack backtrace: X_db_sym_numargs(c03635ba,c0514c30,c1232870,c14116f0,636bf9e5,...) at = X_db_sym_numargs+0x146 kdb_backtrace(c010e7ab,c03664cf,c10cc6d8,c10cf0b0,c80fc8a0,...) at = kdb_backtrace+0x2a = witness_display_spinlock(c03664cf,c13d3e00,c03814cd,c10cf0b0,c0381166,...)= at witness_display_spinlock+0x75 witness_checkorder(c13d3e00,9,c0381166,11d,0,...) at = witness_checkorder+0x839 _sx_xlock(c13d3e00,0,c0381166,11d,c141e32c,...) at _sx_xlock+0x85 ufsdirhash_enduseful(c0f37a50,c4214800,200,c4214810,c80fc970,...) at = ufsdirhash_enduseful+0x2f5 ufsdirhash_add(c141e32c,c80fc9fc,810,c80fc95c,c80fc960,...) at = ufsdirhash_add+0x13 ufs_direnter(c1411648,c14fe648,c80fc9fc,c80fcbe0,c0f452e0,...) at = ufs_direnter+0x729 ufs_readdir(c80fcc08,c80fcc1c,0,c80fcbb4,c80fcb4c,...) at = ufs_readdir+0x2267 VOP_MKDIR_APV(c03bd600,c80fcc08,68,0,0,...) at VOP_MKDIR_APV+0xa5 kern_mkdirat(c1232870,ffffff9c,2843a780,0,1ed,...) at kern_mkdirat+0x211 kern_mkdir(c1232870,2843a780,0,1ed,c80fcc8c,...) at kern_mkdir+0x2e mkdir(c1232870,c80fccfc,c80fcd38,c0364eb3,0,...) at mkdir+0x29 syscallenter(c1232870,c80fccf4,c80fccf4,2,c0332bfa,...) at = syscallenter+0x246 syscall(c80fcd38) at syscall+0x34 Xint0x80_syscall() at Xint0x80_syscall+0x22 --- syscall (136, FreeBSD ELF32, mkdir), eip =3D 0x28331a53, esp =3D = 0xbf7fc47c, ebp =3D 0xbf7fc4a8 --- panic: ufs_dirbad: /: bad dir ino 95182 at offset 0: mangled entry cpuid =3D 0 KDB: enter: panic [thread pid 849 tid 100032 ] Stopped at kdb_enter+0x3a: movl $0,kdb_why DomU details: kernel =3D "/var/lib/xen/images/kernel.freebsd" memory =3D "128" name =3D "freebsd" vcpus =3D "1" vif =3D [ 'mac=3D00:16:3e:fb:41:28, bridge=3Dxenbr0, ip=3D68.169.47.45, = vifname=3Dfreebsd ] disk =3D [ 'phy:/dev/iscsi_0_5,sda,w', 'phy:/dev/iscsi_0_125,sdb,w' ] extra =3D "boot_verbose=3D1" extra +=3D ",vfs.root.mountfrom=3Dufs:/dev/da0" extra +=3D ",kern.hz=3D100" Dom0 details: CentOS release 5.4 (Final) Linux .... 2.6.18-164.6.1.el5xen #1 SMP Tue Nov 3 16:48:13 EST 2009 = x86_64 x86_64 x86_64 GNU/Linux xen-3.0.3-94.el5_4.2 --- Yura From owner-freebsd-xen@FreeBSD.ORG Thu Dec 9 07:30:06 2010 Return-Path: Delivered-To: freebsd-xen@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3475D1065670; Thu, 9 Dec 2010 07:30:06 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 031698FC18; Thu, 9 Dec 2010 07:30:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oB97U52k019924; Thu, 9 Dec 2010 07:30:05 GMT (envelope-from cperciva@freefall.freebsd.org) Received: (from cperciva@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oB97U5PN019917; Thu, 9 Dec 2010 07:30:05 GMT (envelope-from cperciva) Date: Thu, 9 Dec 2010 07:30:05 GMT Message-Id: <201012090730.oB97U5PN019917@freefall.freebsd.org> To: cperciva@freebsd.org, cperciva@FreeBSD.org, freebsd-xen@FreeBSD.org From: cperciva@FreeBSD.org Cc: Subject: Re: kern/152818: [panic][xen] disk driver data cannot cross a page boundary 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: Thu, 09 Dec 2010 07:30:06 -0000 Synopsis: [panic][xen] disk driver data cannot cross a page boundary State-Changed-From-To: open->closed State-Changed-By: cperciva State-Changed-When: Thu Dec 9 07:29:48 UTC 2010 State-Changed-Why: Fix committed and MFCed to stable/8. http://www.freebsd.org/cgi/query-pr.cgi?pr=152818 From owner-freebsd-xen@FreeBSD.ORG Fri Dec 10 13:40:11 2010 Return-Path: Delivered-To: freebsd-xen@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECBEE1065675 for ; Fri, 10 Dec 2010 13:40:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C12398FC1C for ; Fri, 10 Dec 2010 13:40:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oBADeBbc022490 for ; Fri, 10 Dec 2010 13:40:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oBADeBnn022489; Fri, 10 Dec 2010 13:40:11 GMT (envelope-from gnats) Date: Fri, 10 Dec 2010 13:40:11 GMT Message-Id: <201012101340.oBADeBnn022489@freefall.freebsd.org> To: freebsd-xen@FreeBSD.org From: Andrew Kolchoogin Cc: Subject: Re: kern/143340: [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't work on solaris dom0's X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andrew Kolchoogin 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, 10 Dec 2010 13:40:12 -0000 The following reply was made to PR kern/143340; it has been noted by GNATS. From: Andrew Kolchoogin To: bug-followup@FreeBSD.org, wonslung@gmail.com Cc: Subject: Re: kern/143340: [xen] FreeBSD 8-RELEASE XEN pvm networking doesn't work on solaris dom0's Date: Fri, 10 Dec 2010 16:05:50 +0300 Dear colleagues, this is the correct patch resolving the problem: =3D=3D=3D --- sys/dev/xen/netfront/netfront.c.orig 2010-12-10 12:59:03.000000000 +000= 0 +++ sys/dev/xen/netfront/netfront.c 2010-12-10 12:31:01.000000000 +0000 @@ -258,6 +258,7 @@ u_int irq; u_int copying_receiver; u_int carrier; + u_int sg_allowed; =09 /* Receive-ring batched refills. */ #define RX_MIN_TARGET 32 @@ -1499,7 +1500,7 @@ * deal with nfrags > MAX_TX_REQ_FRAGS, which is a quirk of * the Linux network stack. */ - if (nfrags > MAX_TX_REQ_FRAGS) { + if (nfrags > (sc->sg_allowed? MAX_TX_REQ_FRAGS : 1)) { m =3D m_defrag(m_head, M_DONTWAIT); if (!m) { /* @@ -1878,6 +1879,37 @@ if_link_state_change(ifp, LINK_STATE_DOWN); } +static void +xennet_set_features(device_t dev, struct netfront_info *np) +{ + struct ifnet *ifp; + int val; + + device_printf(dev, "backend features:"); + + if (xs_scanf(XST_NIL, xenbus_get_otherend_path(np->xbdev), "feature-sg", NULL, "%d", &val) < 0) + val =3D 0; + + np->sg_allowed =3D val; + + if (val) + printf(" feature-sg"); + + if (xs_scanf(XST_NIL, xenbus_get_otherend_path(np->xbdev), "feature-gso-tcpv4", NULL, "%d", &val) < 0) + val =3D 0; + + if (val =3D=3D 0) { + ifp =3D np->xn_ifp; + ifp->if_capabilities &=3D ~(IFCAP_TSO4|IFCAP_LRO); + ifp->if_capenable &=3D ~(IFCAP_TSO4|IFCAP_LRO); + ifp->if_hwassist &=3D ~(CSUM_TSO); + xn_enable_lro =3D 0; + } else + printf(" feature-gso-tcp4"); + + printf("\n"); +} + /* START of Xenolinux helper functions adapted to FreeBSD */ int network_connect(struct netfront_info *np) @@ -1909,6 +1941,8 @@ if (error) return (error); =09 + xennet_set_features(np->xbdev, np); + /* Step 1: Reinitialise variables. */ netif_release_tx_bufs(np); =3D=3D=3D I've tested it on my system -- Solaris 11 Express 2010.11 + FreeBSD v8.2-BETA1 in paravirtualised mode. All is working as designed, I'm able at least to ssh into Guest and csup entire source tree. --=20 =C2=A0 =C2=A0 Yours =C2=A0 =C2=A0 =C2=A0 =C2=A0 Andrew Kolchoogin.