From owner-freebsd-virtualization@FreeBSD.ORG Tue Jan 21 16:46:26 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADE21A19 for ; Tue, 21 Jan 2014 16:46:26 +0000 (UTC) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F7C6108B for ; Tue, 21 Jan 2014 16:46:26 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id ld10so6312732pab.24 for ; Tue, 21 Jan 2014 08:46:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=TRPVnD0CjpLsce630xAXwYuviT76zz/FR2g4k1Ci58c=; b=H8fjtOoQxU2InhprF37ULxl/RQ9wgKVAc4A1QOsFTwnAf6sPcQhzxxI/rKrNnZvU7g Vmt0btB/G9aj5fqG6fLFfHYxUAC5we3hOberXemxVv7QjHOLYdLjV9PU9RmyiOCyjMOU Ebq+VXsUwnGuh9LgzlUNA8c5sJUXwezoN0iNgAHOP1lDOuDkFP5ape9PIEsEzNzCdTqo 8Q+Qdhf0zyweS1CAIfcfBB7slnlWDVzoWuV+kEoKARxzprGWakBwD9S7rx/TP8iwpCDp KGlwI/6ZdNLz12G13/Aa2yaw7xXHbwmh8/8IRce6dnMR464zGf5Wegw+Zscm+lyaBk5r RNpA== X-Received: by 10.68.66.33 with SMTP id c1mr26124827pbt.118.1390322785666; Tue, 21 Jan 2014 08:46:25 -0800 (PST) Received: from [10.97.82.79] (mobile-166-137-213-204.mycingular.net. [166.137.213.204]) by mx.google.com with ESMTPSA id jp3sm13919832pbc.36.2014.01.21.08.46.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 08:46:24 -0800 (PST) References: <52DD7C56.4090804@semmy.ru> <52DE3D8A.5070209@semmy.ru> Mime-Version: 1.0 (1.0) In-Reply-To: <52DE3D8A.5070209@semmy.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: <09444E73-EF4F-473F-9A75-8B0DA73E2620@gmail.com> X-Mailer: iPhone Mail (11B554a) From: Neel Natu Subject: Re: bhyve: can't to passthru bge(4) card Date: Tue, 21 Jan 2014 08:46:19 -0800 To: Sergey Matveychuk Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.17 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: Tue, 21 Jan 2014 16:46:26 -0000 Hi Sergey, > On Jan 21, 2014, at 1:27 AM, Sergey Matveychuk wrote: >=20 > 21.01.2014 8:56, Neel Natu =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> I suspect that this is because the function number of the virtual PCI >> device and the physical PCI device are different. >>=20 >> Could you try to use the following instead: -s 2:1,passthru,3/0/1 >=20 > Thank you. It works. >=20 > I've tried 3:1,passthru,3/0/1 but it does not work. What rules for a slot n= umber to choose? >=20 It depends on the PCI function that you are passing to the guest. For some, e.g. Intel e1000, it does not matter. You can have it appear on a c= ompletely different function number in the guest as compared to the host. For others, e.g. bge, as you discovered, the function numbers in the guest a= nd host have to match. Also, PCI requires that for a multi-function device, function 0 must be pres= ent. So, it is not possible to assign a device to a function > 0 without als= o having some device present at function 0. Hope that helps. Best Neel >>=20 >> Alternatively you could try assigning the physical PCI device 3/0/0: >> -s 3:0,passthru,3/0/0 >=20 > 3/0/0 is a first network card. I'd like to leave it for the host system.