From owner-freebsd-xen@FreeBSD.ORG Mon Feb 25 11:07:00 2013 Return-Path: Delivered-To: freebsd-xen@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4C09F197 for ; Mon, 25 Feb 2013 11:07:00 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 319D5E98 for ; Mon, 25 Feb 2013 11:07:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r1PB70V3066838 for ; Mon, 25 Feb 2013 11:07:00 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1PB6xrw066833 for freebsd-xen@FreeBSD.org; Mon, 25 Feb 2013 11:06:59 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 25 Feb 2013 11:06:59 GMT Message-Id: <201302251106.r1PB6xrw066833@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 Subject: Current problem reports assigned to freebsd-xen@FreeBSD.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Feb 2013 11:07:00 -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/176053 xen [xen] [patch] i386: Correct wrong usage of vsnprintf() o kern/175954 xen [xen] XENHVM xn network driver extreme packet loss dur o kern/175822 xen [xen] FreeBSD 9.1 does not work with Xen 4.0 o kern/175757 xen [xen] [patch] xen pvhvm looses keyboard input from VNC o kern/171873 xen [xen] xn network device floods warning in dmesg o kern/171138 xen [xen] [panic] Deactivating network interface produces o kern/171118 xen [xen] FreeBSD XENHVM guest doesn't shutdown cleanly o kern/166174 xen [xen] Problems ROOT MOUNT ERROR o kern/165418 xen [xen] Problems mounting root filesystem from XENHVM o kern/164630 xen [xen] XEN HVM kernel: run_interrupt_driven_hooks: stil o kern/164450 xen [xen] Failed to install FreeeBSD 9.0-RELEASE from CD i o kern/162677 xen [xen] FreeBSD not compatible with "Current Stable Xen" 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/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 35 problems total. From owner-freebsd-xen@FreeBSD.ORG Mon Feb 25 20:57:26 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0E17DB4A for ; Mon, 25 Feb 2013 20:57:26 +0000 (UTC) (envelope-from nukama@gmail.com) Received: from mail-bk0-f45.google.com (mail-bk0-f45.google.com [209.85.214.45]) by mx1.freebsd.org (Postfix) with ESMTP id 94726796 for ; Mon, 25 Feb 2013 20:57:25 +0000 (UTC) Received: by mail-bk0-f45.google.com with SMTP id i18so1500483bkv.32 for ; Mon, 25 Feb 2013 12:57:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=dip+0FAsJ5yqarBmlMGlRhWUdw4sroQlsAaWVCwGSsc=; b=o4aU3WbY3oiG+gJuLA/0rHohK7gh3rRIqe5kD3uiQvmzuRIMySV3tyQ5maurytDvF0 fc5V+jYIlDd+mJq5zez3U26G3YbHcLliZ4WWGJSYqyvkzxjvyiPmAtQqVDy1kNcAWtEr xz3sdrRUktmZhWraWsO0RSn2ApCd7lCMh3d4NKV2P9d1hYHTtPAFkmzc0RgmsDDxTV9N i4ly0tY38R2jIFZUcSBZSkaQs124P6UHsQ2Jy42tTBLpdOQ9UZyZtdOgluxUaFumL2hu 3SGv/u+XDDoibqGd96juuTYFvP+mFOIrumFglrAl/SEJYFG+APP+dy3b57aAPqGqWRJr 894w== MIME-Version: 1.0 X-Received: by 10.204.150.16 with SMTP id w16mr5515700bkv.139.1361825344171; Mon, 25 Feb 2013 12:49:04 -0800 (PST) Received: by 10.205.113.6 with HTTP; Mon, 25 Feb 2013 12:49:04 -0800 (PST) Date: Mon, 25 Feb 2013 20:49:04 +0000 Message-ID: Subject: Running FreeBSD inside Qubes Xen HVM From: Hakisho Nukama To: freebsd-xen@freebsd.org, qubes-devel@googlegroups.com Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 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, 25 Feb 2013 20:57:26 -0000 Hello folks, I've installed FreeBSD-9.1-RELEASE inside a Xen HVM created with Qubes-R2-Beta1 according to https://www.qubes-os.org/trac/wiki/HvmCreate and this installation works quite well. Except the mouse movements aren't recognized. Clicking works, and I can select text from center of console screen with a double click and paste it back with middle mouse button. kernel: ums0: on usbus0 kernel: ums0: 3 buttons and [Z] coordinates ID=0 Best Regards, Hakisho Nukama From owner-freebsd-xen@FreeBSD.ORG Wed Feb 27 14:55:00 2013 Return-Path: Delivered-To: freebsd-xen@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B5F38E05; Wed, 27 Feb 2013 14:55:00 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 924FD7EC; Wed, 27 Feb 2013 14:55:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r1REt01h010929; Wed, 27 Feb 2013 14:55:00 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1REt0dT010925; Wed, 27 Feb 2013 14:55:00 GMT (envelope-from linimon) Date: Wed, 27 Feb 2013 14:55:00 GMT Message-Id: <201302271455.r1REt0dT010925@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-xen@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: kern/176471: [xen] xn driver crash on detach X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 27 Feb 2013 14:55:00 -0000 Old Synopsis: xn driver crash on detach New Synopsis: [xen] xn driver crash on detach Responsible-Changed-From-To: freebsd-bugs->freebsd-xen Responsible-Changed-By: linimon Responsible-Changed-When: Wed Feb 27 14:54:25 UTC 2013 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=176471 From owner-freebsd-xen@FreeBSD.ORG Thu Feb 28 17:10:05 2013 Return-Path: Delivered-To: freebsd-xen@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B519BD98 for ; Thu, 28 Feb 2013 17:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8F3A428A for ; Thu, 28 Feb 2013 17:10:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r1SHA46J011773 for ; Thu, 28 Feb 2013 17:10:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1SHA43h011772; Thu, 28 Feb 2013 17:10:04 GMT (envelope-from gnats) Date: Thu, 28 Feb 2013 17:10:04 GMT Message-Id: <201302281710.r1SHA43h011772@freefall.freebsd.org> To: freebsd-xen@FreeBSD.org Cc: From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= Subject: Re: kern/176471: [xen] xn driver crash on detach X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= 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, 28 Feb 2013 17:10:05 -0000 The following reply was made to PR kern/176471; it has been noted by GNATS. From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= To: , Cc: Subject: Re: kern/176471: [xen] xn driver crash on detach Date: Thu, 28 Feb 2013 18:00:12 +0100 Hello, I've been able to reproduce this bug with Xen unstable, here is a fix for it. --- From 6206137f80cbe5812294b1733a86f28e5cdc01bd Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Thu, 28 Feb 2013 17:43:34 +0100 Subject: [PATCH] xen-netfront: fix detach of network interfaces Remove all the media and the interface when detaching it. Prevents the following panic when detaching an interface (xl network-detach freebsd 1) xn1: detached Fatal trap 12: page fault while in kernel mode cpuid = 3; apic id = 06 fault virtual address = 0xffffff80028ff2a0 fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff809653af stack pointer = 0x28:0xffffff8117cb4940 frame pointer = 0x28:0xffffff8117cb4980 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 699 (devd) [ thread pid 699 tid 100107 ] Stopped at ifmedia_ioctl+0x3f: movq 0x8(%r12),%rcx db> trace Tracing pid 706 tid 100059 td 0xfffffe0006b69480 ifmedia_ioctl() at ifmedia_ioctl+0x3f/frame 0xffffff80f774c980 ifioctl() at ifioctl+0xeb7/frame 0xffffff80f774ca40 kern_ioctl() at kern_ioctl+0x1ce/frame 0xffffff80f774ca90 sys_ioctl() at sys_ioctl+0x11f/frame 0xffffff80f774cae0 amd64_syscall() at amd64_syscall+0x265/frame 0xffffff80f774cbf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xffffff80f774cbf0 --- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x44c60a, rsp = 0x7fffffffd678, rbp = 0x7fffffffd750 --- PR: 176471 --- sys/dev/xen/netfront/netfront.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 88641e3..167fd12 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -2172,6 +2172,9 @@ static void netif_free(struct netfront_info *info) { netif_disconnect_backend(info); + ifmedia_removeall(&info->sc_media); + ether_ifdetach(info->xn_ifp); + if_free(info->xn_ifp); #if 0 close_netdev(info); #endif -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Thu Feb 28 18:00:02 2013 Return-Path: Delivered-To: freebsd-xen@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 276F79B7 for ; Thu, 28 Feb 2013 18:00:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 01FEB748 for ; Thu, 28 Feb 2013 18:00:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r1SI01I8021281 for ; Thu, 28 Feb 2013 18:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r1SI01Vo021280; Thu, 28 Feb 2013 18:00:01 GMT (envelope-from gnats) Date: Thu, 28 Feb 2013 18:00:01 GMT Message-Id: <201302281800.r1SI01Vo021280@freefall.freebsd.org> To: freebsd-xen@FreeBSD.org Cc: From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= Subject: Re: kern/176471: [xen] xn driver crash on detach X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= 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, 28 Feb 2013 18:00:02 -0000 The following reply was made to PR kern/176471; it has been noted by GNATS. From: =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= To: , Cc: Subject: Re: kern/176471: [xen] xn driver crash on detach Date: Thu, 28 Feb 2013 18:58:44 +0100 Hi (again), I've just realized the previous patch also crashed when trying to detach an interface that's up and running, the following patch allows to detach the interface while running without crashing the FreeBSD kernel. Also, what do you mean by "changing configuration of xn network"? --- From 9c0097ed4775c68769049c61e474ddb62cc11d1f Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Thu, 28 Feb 2013 17:43:34 +0100 Subject: [PATCH] xen-netfront: fix detach of network interfaces Remove all the media and the interface when detaching it. Prevents the following panic when detaching an interface (xl network-detach freebsd 1) xn1: detached Fatal trap 12: page fault while in kernel mode cpuid = 3; apic id = 06 fault virtual address = 0xffffff80028ff2a0 fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff809653af stack pointer = 0x28:0xffffff8117cb4940 frame pointer = 0x28:0xffffff8117cb4980 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 699 (devd) [ thread pid 699 tid 100107 ] Stopped at ifmedia_ioctl+0x3f: movq 0x8(%r12),%rcx db> trace Tracing pid 706 tid 100059 td 0xfffffe0006b69480 ifmedia_ioctl() at ifmedia_ioctl+0x3f/frame 0xffffff80f774c980 ifioctl() at ifioctl+0xeb7/frame 0xffffff80f774ca40 kern_ioctl() at kern_ioctl+0x1ce/frame 0xffffff80f774ca90 sys_ioctl() at sys_ioctl+0x11f/frame 0xffffff80f774cae0 amd64_syscall() at amd64_syscall+0x265/frame 0xffffff80f774cbf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xffffff80f774cbf0 --- syscall (54, FreeBSD ELF64, sys_ioctl), rip = 0x44c60a, rsp = 0x7fffffffd678, rbp = 0x7fffffffd750 --- PR: 176471 --- sys/dev/xen/netfront/netfront.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 88641e3..3a8b8ea 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -2171,7 +2171,14 @@ netfront_detach(device_t dev) static void netif_free(struct netfront_info *info) { + XN_LOCK(info); + xn_stop(info); + XN_UNLOCK(info); + callout_drain(&info->xn_stat_ch); netif_disconnect_backend(info); + ifmedia_removeall(&info->sc_media); + ether_ifdetach(info->xn_ifp); + if_free(info->xn_ifp); #if 0 close_netdev(info); #endif -- 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Thu Feb 28 22:59:24 2013 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 77F2787E for ; Thu, 28 Feb 2013 22:59:24 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2E71C83A for ; Thu, 28 Feb 2013 22:59:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=Message-Id:References:In-Reply-To:Subject:To:From:Date:Content-Transfer-Encoding:Content-Type:Mime-Version; bh=+e7EgUBc/5/dEHo0qeTl3ouzg7ZZbMpUcCDgVfOGgIY=; b=nNwkB8r5D7ieKjeU0AMjnH/SDFhHRwU79n1kmtjUxvRL7KhWDBeukU36419boznyx4p3T9sOpkkgd7264G1ieWE4lRwsLrSND84LbMC1+gGpQrFMoEhfc8vdlnzAgzG1; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1UBCRa-000NzX-5U for freebsd-xen@freebsd.org; Thu, 28 Feb 2013 16:59:19 -0600 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpsa id 1362092352-84237-84087/5/1; Thu, 28 Feb 2013 22:59:12 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Date: Thu, 28 Feb 2013 16:59:11 -0600 From: Mark Felder To: freebsd-xen@freebsd.org Subject: Re: kern/176471: [xen] xn driver crash on detach In-Reply-To: <201302281800.r1SI01Vo021280@freefall.freebsd.org> References: <201302281800.r1SI01Vo021280@freefall.freebsd.org> Message-Id: <1b9733a351388111218dba92eafa84e5@feld.me> X-Sender: feld@feld.me User-Agent: Roundcube Webmail/0.8 X-SA-Report: ALL_TRUSTED=-1, KHOP_THREADED=-0.5 X-SA-Score: -1.5 X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 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, 28 Feb 2013 22:59:24 -0000 On 28.02.2013 12:00, Roger Pau Monn=C3=A9 wrote: >=20 > Also, what do you mean by "changing configuration of xn network"? He means changing the native VLAN of the interface attached to the Xen=20 VM. I have also hit this bug and will gladly test this patch tomorrow=20 when I'm in the office. It's probably the exact same bug, so if you=20 fixed the add/remove interface panic I'd assume it fixes this other one. Thanks for looking into this, Roger! From owner-freebsd-xen@FreeBSD.ORG Fri Mar 1 10:20:02 2013 Return-Path: Delivered-To: freebsd-xen@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9C8EE303 for ; Fri, 1 Mar 2013 10:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7D88061F for ; Fri, 1 Mar 2013 10:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r21AK1o1014322 for ; Fri, 1 Mar 2013 10:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r21AK1JA014321; Fri, 1 Mar 2013 10:20:01 GMT (envelope-from gnats) Date: Fri, 1 Mar 2013 10:20:01 GMT Message-Id: <201303011020.r21AK1JA014321@freefall.freebsd.org> To: freebsd-xen@FreeBSD.org Cc: From: Petri Helenius Subject: Re: kern/176471: [xen] xn driver crash on detach X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Petri Helenius 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, 01 Mar 2013 10:20:02 -0000 The following reply was made to PR kern/176471; it has been noted by GNATS. From: Petri Helenius To: =?iso-8859-1?Q?Roger_Pau_Monn=E9?= Cc: , Subject: Re: kern/176471: [xen] xn driver crash on detach Date: Fri, 1 Mar 2013 12:19:34 +0200 On Feb 28, 2013, at 19:58 , Roger Pau Monn=E9 = wrote: > Hi (again), >=20 > I've just realized the previous patch also crashed when trying to=20 > detach an interface that's up and running, the following patch allows=20= > to detach the interface while running without crashing the FreeBSD=20 > kernel. >=20 > Also, what do you mean by "changing configuration of xn network"? Using the management console, I think it just does detach / attach.=20 The second patch works in 10-CURRENT, will try 9-STABLE.=20 Pete >=20 > --- > =46rom 9c0097ed4775c68769049c61e474ddb62cc11d1f Mon Sep 17 00:00:00 = 2001 > From: Roger Pau Monne > Date: Thu, 28 Feb 2013 17:43:34 +0100 > Subject: [PATCH] xen-netfront: fix detach of network interfaces >=20 > Remove all the media and the interface when detaching it. Prevents the > following panic when detaching an interface (xl network-detach freebsd > 1) >=20 > xn1: detached >=20 > Fatal trap 12: page fault while in kernel mode > cpuid =3D 3; apic id =3D 06 > fault virtual address =3D 0xffffff80028ff2a0 > fault code =3D supervisor read data, page not present > instruction pointer =3D 0x20:0xffffffff809653af > stack pointer =3D 0x28:0xffffff8117cb4940 > frame pointer =3D 0x28:0xffffff8117cb4980 > code segment =3D base 0x0, limit 0xfffff, type 0x1b > =3D DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags =3D interrupt enabled, resume, IOPL =3D 0 > current process =3D 699 (devd) > [ thread pid 699 tid 100107 ] > Stopped at ifmedia_ioctl+0x3f: movq 0x8(%r12),%rcx > db> trace > Tracing pid 706 tid 100059 td 0xfffffe0006b69480 > ifmedia_ioctl() at ifmedia_ioctl+0x3f/frame 0xffffff80f774c980 > ifioctl() at ifioctl+0xeb7/frame 0xffffff80f774ca40 > kern_ioctl() at kern_ioctl+0x1ce/frame 0xffffff80f774ca90 > sys_ioctl() at sys_ioctl+0x11f/frame 0xffffff80f774cae0 > amd64_syscall() at amd64_syscall+0x265/frame 0xffffff80f774cbf0 > Xfast_syscall() at Xfast_syscall+0xfb/frame 0xffffff80f774cbf0 > --- syscall (54, FreeBSD ELF64, sys_ioctl), rip =3D 0x44c60a, rsp =3D = 0x7fffffffd678, rbp =3D 0x7fffffffd750 --- >=20 > PR: 176471 > --- > sys/dev/xen/netfront/netfront.c | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) >=20 > diff --git a/sys/dev/xen/netfront/netfront.c = b/sys/dev/xen/netfront/netfront.c > index 88641e3..3a8b8ea 100644 > --- a/sys/dev/xen/netfront/netfront.c > +++ b/sys/dev/xen/netfront/netfront.c > @@ -2171,7 +2171,14 @@ netfront_detach(device_t dev) > static void > netif_free(struct netfront_info *info) > { > + XN_LOCK(info); > + xn_stop(info); > + XN_UNLOCK(info); > + callout_drain(&info->xn_stat_ch); > netif_disconnect_backend(info); > + ifmedia_removeall(&info->sc_media); > + ether_ifdetach(info->xn_ifp); > + if_free(info->xn_ifp); > #if 0 > close_netdev(info); > #endif > --=20 > 1.7.7.5 (Apple Git-26) From owner-freebsd-xen@FreeBSD.ORG Fri Mar 1 14:40:02 2013 Return-Path: Delivered-To: freebsd-xen@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A2BBEC8E for ; Fri, 1 Mar 2013 14:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7D31E111 for ; Fri, 1 Mar 2013 14:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r21Ee2YS060572 for ; Fri, 1 Mar 2013 14:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r21Ee1QM060571; Fri, 1 Mar 2013 14:40:01 GMT (envelope-from gnats) Date: Fri, 1 Mar 2013 14:40:01 GMT Message-Id: <201303011440.r21Ee1QM060571@freefall.freebsd.org> To: freebsd-xen@FreeBSD.org Cc: From: Mark Felder Subject: Re: kern/171138: [xen] [panic] Deactivating network interface produces panic on XENHVM X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Mark Felder 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, 01 Mar 2013 14:40:02 -0000 The following reply was made to PR kern/171138; it has been noted by GNATS. From: Mark Felder To: bug-followup@freebsd.org Cc: Subject: Re: kern/171138: [xen] [panic] Deactivating network interface produces panic on XENHVM Date: Fri, 1 Mar 2013 08:37:40 -0600 This is a duplicate of pr 176471 and should be closed. From owner-freebsd-xen@FreeBSD.ORG Fri Mar 1 14:40:03 2013 Return-Path: Delivered-To: freebsd-xen@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9B518C8F for ; Fri, 1 Mar 2013 14:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8E8E8112 for ; Fri, 1 Mar 2013 14:40:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r21Ee3dX060582 for ; Fri, 1 Mar 2013 14:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r21Ee3SC060581; Fri, 1 Mar 2013 14:40:03 GMT (envelope-from gnats) Date: Fri, 1 Mar 2013 14:40:03 GMT Message-Id: <201303011440.r21Ee3SC060581@freefall.freebsd.org> To: freebsd-xen@FreeBSD.org Cc: From: Mark Felder Subject: Re: kern/176471: [xen] xn driver crash on detach X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Mark Felder 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, 01 Mar 2013 14:40:03 -0000 The following reply was made to PR kern/176471; it has been noted by GNATS. From: Mark Felder To: bug-followup@freebsd.org, pete@helenius.fi Cc: Subject: Re: kern/176471: [xen] xn driver crash on detach Date: Fri, 1 Mar 2013 08:37:40 -0600 ------------ZKr8kQLgp1eZBwnNXnyCtT Content-Type: text/plain; format=flowed; delsp=yes I had to reformat the patch (the one in this PR didn't come through well) but I've tested this on FreeBSD 9.0 and our Xen environment and I can successfully add/remove network interfaces and change their properties without crashes. I still have to attempt this on the FreeBSD 9.1 VMs but I don't expect different results. Thank you very much Roger! ------------ZKr8kQLgp1eZBwnNXnyCtT Content-Disposition: attachment; filename=xen-netfront.patch Content-Type: application/octet-stream; name=xen-netfront.patch Content-Transfer-Encoding: base64 LS0tIHN5cy9kZXYveGVuL25ldGZyb250L25ldGZyb250LmMub3JpZwkyMDEzLTAzLTAxIDA2 OjUyOjQ2LjAwMDAwMDAwMCAtMDYwMAorKysgc3lzL2Rldi94ZW4vbmV0ZnJvbnQvbmV0ZnJv bnQuYwkyMDEzLTAzLTAxIDA2OjU0OjE5LjAwMDAwMDAwMCAtMDYwMApAQCAtMjE5OSw3ICsy MTk5LDE0IEBACiBzdGF0aWMgdm9pZAogbmV0aWZfZnJlZShzdHJ1Y3QgbmV0ZnJvbnRfaW5m byAqaW5mbykKIHsKKwlYTl9MT0NLKGluZm8pOworCXhuX3N0b3AoaW5mbyk7CisJWE5fVU5M T0NLKGluZm8pOworCWNhbGxvdXRfZHJhaW4oJmluZm8tPnhuX3N0YXRfY2gpOwogCW5ldGlm X2Rpc2Nvbm5lY3RfYmFja2VuZChpbmZvKTsKKwlpZm1lZGlhX3JlbW92ZWFsbCgmaW5mby0+ c2NfbWVkaWEpOworCWV0aGVyX2lmZGV0YWNoKGluZm8tPnhuX2lmcCk7CisJaWZfZnJlZShp bmZvLT54bl9pZnApOwogI2lmIDAKIAljbG9zZV9uZXRkZXYoaW5mbyk7CiAjZW5kaWYK ------------ZKr8kQLgp1eZBwnNXnyCtT-- From owner-freebsd-xen@FreeBSD.ORG Sat Mar 2 00:06:11 2013 Return-Path: Delivered-To: freebsd-xen@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1E7F8496; Sat, 2 Mar 2013 00:06:11 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E79541DD7; Sat, 2 Mar 2013 00:06:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2206ADM075971; Sat, 2 Mar 2013 00:06:10 GMT (envelope-from eadler@freefall.freebsd.org) Received: (from eadler@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r22069DS075967; Sat, 2 Mar 2013 00:06:09 GMT (envelope-from eadler) Date: Sat, 2 Mar 2013 00:06:09 GMT Message-Id: <201303020006.r22069DS075967@freefall.freebsd.org> To: feld@feld.me, eadler@FreeBSD.org, freebsd-xen@FreeBSD.org From: eadler@FreeBSD.org Subject: Re: kern/171138: [xen] [panic] Deactivating network interface produces panic on XENHVM X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 02 Mar 2013 00:06:11 -0000 Synopsis: [xen] [panic] Deactivating network interface produces panic on XENHVM State-Changed-From-To: open->closed State-Changed-By: eadler State-Changed-When: Sat Mar 2 00:06:09 UTC 2013 State-Changed-Why: per mark, see 176471 http://www.freebsd.org/cgi/query-pr.cgi?pr=171138