From owner-freebsd-bugs@FreeBSD.ORG Mon May 20 06:30:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A7193E5D for ; Mon, 20 May 2013 06:30:00 +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 89A63EDA for ; Mon, 20 May 2013 06:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r4K6U0Ej017315 for ; Mon, 20 May 2013 06:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r4K6U0MO017313; Mon, 20 May 2013 06:30:00 GMT (envelope-from gnats) Resent-Date: Mon, 20 May 2013 06:30:00 GMT Resent-Message-Id: <201305200630.r4K6U0MO017313@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jason Shi Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 21237E44 for ; Mon, 20 May 2013 06:28:02 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.FreeBSD.org (oldred.freebsd.org [8.8.178.121]) by mx1.freebsd.org (Postfix) with ESMTP id 13F56EC8 for ; Mon, 20 May 2013 06:28:02 +0000 (UTC) Received: from oldred.FreeBSD.org ([127.0.1.6]) by oldred.FreeBSD.org (8.14.5/8.14.5) with ESMTP id r4K6S1xR077861 for ; Mon, 20 May 2013 06:28:01 GMT (envelope-from nobody@oldred.FreeBSD.org) Received: (from nobody@localhost) by oldred.FreeBSD.org (8.14.5/8.14.5/Submit) id r4K6S14J077860; Mon, 20 May 2013 06:28:01 GMT (envelope-from nobody) Message-Id: <201305200628.r4K6S14J077860@oldred.FreeBSD.org> Date: Mon, 20 May 2013 06:28:01 GMT From: Jason Shi To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/178782: [ixgbe] 82599EB SFP does not work with passthrough under KVM. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2013 06:30:00 -0000 >Number: 178782 >Category: kern >Synopsis: [ixgbe] 82599EB SFP does not work with passthrough under KVM. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 20 06:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Jason Shi >Release: 9.1-PRERELEASE >Organization: Arraynetworks >Environment: Host OS: OpenSUSE 12.2 Linux linux-kj2u 3.4.6-2.10-desktop #1 SMP PREEMPT Thu Jul 26 09:36:26 UTC 2012 (641c197) x86_64 x86_64 x86_64 GNU/Linux QEMU emulator version 1.1.1 (kvm-1.1.1-1.8.1), Copyright (c) 2003-2008 Fabrice Bellard Guest OS: FreeBSD freebsd9.1 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: The 10G Intel 82599EB SFP NIC could not work with passthrough on KVM. I did some tests with different Hypervisors and Guest OS, which make me think it's a FreeBSD problem. 1. OpenXen + FreeBSD9.1 guest os. -- [OK] 2. OpenXen + Linux guest os (e.g. Fedora 12). -- [OK] 3. KVM + Linux guest os (e.g. Fedora 12). -- [OK] 4. KVM + FreeBSD9.1 guest os. -- [Failed] >How-To-Repeat: 1.Make the pci device of 82599SFP assignale. From lspci on OpenSUSE: 0d:00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01) Subsystem: QLogic, Corp. Device 00e4 Flags: fast devsel, IRQ 25 Memory at f8fe0000 (64-bit, prefetchable) [size=128K] I/O ports at cc00 [size=32] Memory at f8fdc000 (64-bit, prefetchable) [size=16K] Capabilities: [40] Power Management version 3 Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+ Capabilities: [70] MSI-X: Enable- Count=64 Masked- Capabilities: [a0] Express Endpoint, MSI 00 Capabilities: [e0] Vital Product Data Capabilities: [100] Advanced Error Reporting Capabilities: [140] Device Serial Number 00-00-00-ff-ff-00-00-00 Capabilities: [150] Alternative Routing-ID Interpretation (ARI) Capabilities: [160] Single Root I/O Virtualization (SR-IOV) Kernel driver in use: pci-stub 2. Passthrough it to the guest FreeBSD os. Here is my vm configuration file FreeBSD9.1 4d56613e-400c-f37d-2a9a-e0332d81ca63 2097152 2097152 2 hvm destroy restart destroy /usr/bin/qemu-kvm
3.The device could be probed and attached by FreeBSD. From dmesg on FreeBSD: ix0: port 0xc020-0xc03f mem 0xfe000000-0xfe01ffff,0xfe020000-0xfe023fff irq 11 at device 4.0 on pci0 ix0: Using MSIX interrupts with 2 vectors ix0: Ethernet address: 00:0c:bd:05:7d:4a ix0: PCI Express Bus: Speed 5.0Gb/s Width x8 But no interrupt could be found. From "vmstat -i": interrupt total rate irq1: atkbd0 143 0 irq4: uart0 177 1 irq15: ata1 1593 10 cpu0:timer 7140 46 Total 9053 58 And ix0 keeps to be "no carrier" (even if I config an IP address on it and ping). From "ifconfig": ix0: flags=8802 metric 0 mtu 1500 options=401bb ether 00:0c:bd:05:7d:4a nd6 options=29 media: Ethernet autoselect status: no carrier >Fix: >Release-Note: >Audit-Trail: >Unformatted: