From owner-freebsd-virtualization@freebsd.org Wed Aug 8 18:02:11 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3EA3106563B for ; Wed, 8 Aug 2018 18:02:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C3EB8AD51 for ; Wed, 8 Aug 2018 18:02:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id CE53A10B429; Wed, 8 Aug 2018 14:02:09 -0400 (EDT) Subject: Re: Passthrough not working with OpenBSD nor NetBSD To: Farid Joubbi , freebsd-virtualization@freebsd.org References: From: John Baldwin Message-ID: Date: Wed, 8 Aug 2018 11:02:08 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 08 Aug 2018 14:02:10 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.27 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: Wed, 08 Aug 2018 18:02:12 -0000 On 7/6/18 8:07 AM, Farid Joubbi wrote: > Hello, > > I have configured passthrough of two different PCI Express network > interface cards. I can't get neither OpenBSD nor NetBSD to work with these > NICs. > > I get this in dmesg when booting the NetBSD install: > > wm0 at pci0 dev 5 function 0: 82576 quad-1000BaseT Ethernet (rev. 0x01) > pci_intr_map: no mapping for pin B (line=ff) > wm0: unable to map interrupt > bge0 at pci0 dev 6 function 0: Broadcom BCM5720 Gigabit Ethernet > pci_intr_map: no mapping for pin B (line=ff) > bge0: couldn't map interrupt > > With OpenBSD it's the same error. > > I have no problems running FreeBSD or CentOS with the exact same setup. > > This is how vm is configured for the NetBSD install: > loader="grub" > cpu=1 > memory=4G > passthru0="12/0/1" > passthru1="3/0/1" > disk0_type="virtio-blk" > disk0_name="disk0.img" > uuid="1c9596b9-80a0-11e8-960c-5cb9013bbb64" > grub_install0="knetbsd -h -r cd0a /netbsd" > grub_run0="knetbsd -h -r ld0a /netbsd" > > > I started out with OpenBSD and a Intel NIC. Then I added the Broadcom NIC > since I figured that maybe it's a driver issue. > I'm running bhyve on 11.1-RELEASE-p11. > > Any ideas? You have to use MSI interrupts for pass-through devices for bhyve. Those errors look as if the guests are trying to use legacy INTx interrupts. -- John Baldwin