From owner-freebsd-virtualization@freebsd.org Mon Feb 27 00:09:21 2017 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA605CEEB11 for ; Mon, 27 Feb 2017 00:09:21 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 6BBE36D3 for ; Mon, 27 Feb 2017 00:09:21 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTPS id E3DC420195B6 for ; Mon, 27 Feb 2017 10:08:55 +1000 (AEST) Received: from localhost (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id DE5A62809F4 for ; Mon, 27 Feb 2017 10:08:55 +1000 (AEST) X-Amavis-Modified: Mail body modified (using disclaimer) - iredmail.onthenet.com.au Received: from iredmail.onthenet.com.au ([127.0.0.1]) by localhost (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fZUaBsdfOTJn for ; Mon, 27 Feb 2017 10:08:55 +1000 (AEST) Received: from Peters-MacBook-Pro-2.local (50-0-69-205.dsl.static.fusionbroadband.com [50.0.69.205]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id B5B3B2808F6; Mon, 27 Feb 2017 10:08:53 +1000 (AEST) Subject: Re: bhyve passthrough problem after updated host to 10.3 To: Sergey Matveychuk References: <98d35860-7d18-1864-700f-29df58fb85ba@semmy.ru> Cc: freebsd-virtualization@freebsd.org From: Peter Grehan Message-ID: Date: Sun, 26 Feb 2017 16:09:12 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=XKlAcUpE c=1 sm=1 tr=0 a=A6CF0fG5TOl4vs6YHvqXgw==:117 a=3jPexO113QScgro132hsCQ==:17 a=IkcTkHD0fZMA:10 a=n2v9WMKugxEA:10 a=DxHNoa_YZIh5Lw7yM6YA:9 a=QEXdDO2ut3YA:10 wl=host:3 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Feb 2017 00:09:21 -0000 Hi Sergey, >> Now, after experiments I can say the card can work only on 2 slot and >> function=function on host. >> >> Example: >> -s 2:1,passthrough,3/0/1 > > It's even worse I thought. > The network card work only if spare slot with a disk device (may be any > device, I did not try). > So, it works: > -s 2:1,passthru,3/0/1 -s 2:0,virtio-blk,mydisk > > and it does not work: > -s 2:1,passthru,3/0/1 -s 3:0,virtio-blk,mydisk Guests in general won't probe non-zero functions if function 0 is not present. Putting something at function 0 allows the device probe to be extended to the non-zero functions you have configured. > It does not make a sense for me. Only idea is the network card is a > quad-port card. And its driver need to have any device in the same slot > with 0 feature (to initialize PHY?). Because of my host system is > connected to first ethernet I can't passthrough it to guest and test the > theory. Certain PCI devices do have dependencies between functions (e.g. certain Qlogic FC adapters), while others are independent (Intel multi-port NICs). This part is probably a case of the former. I'd suspect that if you passed the entire device through (and matched function numbers) to a guest, it would work. However, as you have mentioned, a port needs to be dedicated to the host :( later, Peter.