From owner-freebsd-virtualization@FreeBSD.ORG Wed Feb 13 03:34:13 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2C15BC02 for ; Wed, 13 Feb 2013 03:34:13 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-ia0-x231.google.com (ia-in-x0231.1e100.net [IPv6:2607:f8b0:4001:c02::231]) by mx1.freebsd.org (Postfix) with ESMTP id 03122828 for ; Wed, 13 Feb 2013 03:34:12 +0000 (UTC) Received: by mail-ia0-f177.google.com with SMTP id k38so751322iah.8 for ; Tue, 12 Feb 2013 19:34:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=uusS2SfMfrXs1G0atfaebMPoM7D/NSXR4R5RzE66MlY=; b=qGcDQR0LdQjNxRN64wNx+JOYYVrCOXe+FxSiAPEx7ZGqiksb4Kt2HLRT2HLNH/8fMM iqZcshHNYQPjSYTBKg+AxlHf1ACCUzAQQKxSjAVjh1D6SXiPpisk/rPeqZKiU6gtetKD TezoCmKPyebKHhaaJXO+3RHg9hQD52kvWE5Aft1WhrPo3u0NKRVsujQVQzjfRMiw5I19 l+YOtkl1K+laeR5mzF/eQGmu7oSMoQpYsH8vYNXymw8rARRvxO3q2128e84GJQydEXDn cUxGWxqHWFxh0Y91BhPHVWO3G70ytSyo4g1Pdw5T5aaEey/uULNjqC8GGZUh28fMT3yb 4ojA== MIME-Version: 1.0 X-Received: by 10.50.161.135 with SMTP id xs7mr8347195igb.3.1360726452410; Tue, 12 Feb 2013 19:34:12 -0800 (PST) Received: by 10.42.23.132 with HTTP; Tue, 12 Feb 2013 19:34:12 -0800 (PST) In-Reply-To: <511A0CDB.7090309@Hawara.com> References: <5118E47B.9020807@Hawara.com> <1399173350.4891.1360607669873.JavaMail.root@daemoninthecloset.org> <51193EED.2070004@hawara.com> <511A0CDB.7090309@Hawara.com> Date: Tue, 12 Feb 2013 19:34:12 -0800 Message-ID: Subject: Re: vtnet cannot allocate interrupts From: Neel Natu To: Marat Bakeev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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, 13 Feb 2013 03:34:13 -0000 Hi Marat, On Tue, Feb 12, 2013 at 1:35 AM, Marat Bakeev wrote: > On 12/02/2013 05:21, Neel Natu wrote: >> Hi Marat, >> >> On Mon, Feb 11, 2013 at 10:56 AM, Marat Bakeev wrote= : >>> 11.02.2013 22:34, Bryan Venteicher =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >>> >>>> Recent bhyve changed to use MSIX instead of MSI. I wonder if that >>>> is causing this. If you do: >>>> >>>> $ BHYVE_USE_MSI=3Dtrue bhyve ... >>>> >>>> does it work? >>>> >>> No, it won`t work, but it seems i had msix disabled in loader.conf, as = in >>> example from here - http://www.emulsoft.com/bhyve-ufs.txt. >>> I enabled msix, and the vtnet device is now loading fine. >>> >> Glad to hear. >> >>> Do I need other options in loader.conf, like these?: >>> >>> smbios.bios.vendor=3D"BHYVE" >>> console=3D"userboot" >>> hw.pci.honor_msi_blacklist=3D"0" >>> >> No, you don't need these anymore. >> >> Here is a simple set of instructions that should get you started: >> http://people.freebsd.org/~neel/bhyve/bhyve_instructions.txt >> >> They do not have all the bells-and-whistles as some of the other >> HOWTOs but it should get you a working VM in a short amount of time. >> >> best >> Neel > > > It seems it`s not really working :( I only tested 10-current guest, and > only that it boots with vtnet device. > The vtnet device appears, but i can`t get it to work - no packets come > inside the guest. > > 10-CURRENT guest: > > root@vm2:~ # uname -a > FreeBSD vm2 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Sat Dec 8 18:14:15 > PST 2012 root@bhyve:/usr/obj/usr/src/sys/GENERIC amd64 > root@vm2:~ # ifconfig > vtnet0: flags=3D8943 > metric 0 mtu 1500 > options=3D80028 > ether 00:a0:98:e0:a7:44 > inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255 > inet6 fe80::2a0:98ff:fee0:a744%vtnet0 prefixlen 64 scopeid 0x1 > nd6 options=3D29 > media: Ethernet 1000baseT > status: active > > Host system: > [root@spark /usr/src]# ifconfig > em0: flags=3D8943 metric = 0 > mtu 1500 > > options=3D42098 > ether 08:60:6e:44:5f:17 > inet x.x.x.2 netmask 0xffffffe0 broadcast x.x.x..31 > inet6 fe80::a60:6eff:fe44:5f17%em0 prefixlen 64 scopeid 0x1 > inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 > nd6 options=3D29 > media: Ethernet autoselect (1000baseT ) > status: active > > bridge0: flags=3D8802 metric 0 mtu 1500 > ether 02:f3:6c:99:4a:00 > nd6 options=3D29 > id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 > maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 > root id 00:00:00:00:00:00 priority 0 ifcost 0 port 0 > member: tap3 flags=3D143 > ifmaxaddr 0 port 4 priority 128 path cost 2000000 > member: em0 flags=3D143 > ifmaxaddr 0 port 1 priority 128 path cost 20000 'bridge0' needs to be 'up'. Try doing 'ifconfig bridge0 up' and that should get the packets flowing to the guest. best Neel > tap3: flags=3D8943 metric > 0 mtu 1500 > options=3D80000 > ether 00:bd:8c:3f:30:03 > nd6 options=3D29 > media: Ethernet autoselect > status: active > Opened by PID 63225 > > [root@spark /usr/src]# ping 192.168.0.2 > PING 192.168.0.2 (192.168.0.2): 56 data bytes > ping: sendto: Host is down > ping: sendto: Host is down > ping: sendto: Host is down > ping: sendto: Host is down > > root@vm2:~ # ping 192.168.0.1 > PING 192.168.0.1 (192.168.0.1): 56 data bytes > load: 0.00 cmd: ping 702 [select] 16.51r 0.00u 0.00s 0% 9888k > 0/17 packets received (0.0%) > > > > After enabling msix - 9.1 guest won`t boot at all, it cannot attach vtblk= : > > virtio_pci0: port 0x2000-0x201f mem > 0x40000000-0x40001fff at device 1.0 on pci0 > vtnet0: on virtio_pci0 > virtio_pci0: host features: 0x18020 > virtio_pci0: negotiated features: 0x18020 > virtio_pci0: cannot allocate interrupts > vtnet0: cannot allocate virtqueues > device_attach: vtnet0 attach returned 6 > virtio_pci1: port 0x2040-0x207f at device 2.0 > on pci0 > vtblk0: on virtio_pci1 > virtio_pci1: host features: 0x10000004 > virtio_pci1: negotiated features: 0x10000004 > virtio_pci1: cannot allocate interrupts > vtblk0: cannot allocate virtqueue > device_attach: vtblk0 attach returned 6 > > If I run 9.1 with BHYVE_USE_MSI - vtblk works, but no vtnet device