From owner-freebsd-virtualization@freebsd.org Mon Nov 18 11:53:50 2019 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 112161BCF74 for ; Mon, 18 Nov 2019 11:53:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 47GnRK6jdGz4d3Y for ; Mon, 18 Nov 2019 11:53:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id E64BF1BCF73; Mon, 18 Nov 2019 11:53:49 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E60881BCF72 for ; Mon, 18 Nov 2019 11:53:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47GnRK5rqWz4d3V for ; Mon, 18 Nov 2019 11:53:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ACF5629953 for ; Mon, 18 Nov 2019 11:53:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id xAIBrnfP002474 for ; Mon, 18 Nov 2019 11:53:49 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id xAIBrnum002473 for virtualization@FreeBSD.org; Mon, 18 Nov 2019 11:53:49 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 242023] bhyve pci_vtnet_rx broken after r354552 Date: Mon, 18 Nov 2019 11:53:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: aleksandr.fedorov@itglobal.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: vmaffione@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 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, 18 Nov 2019 11:53:50 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242023 --- Comment #10 from Aleksandr Fedorov --- I created a guest system with windows 10. It seems my theory is correct. I started ping -f on tap interface before starting the VM. root@q1u001:/afedorov/vm # /usr/obj/afedorov/freebsd-head-clean/amd64.amd64/usr.sbin/bhyve/bhyve -c 2 = -m 4G -s 0,hostbridge -s 3,ahci-hd,./Windows-2k19-vstack.raw -s 4,ahci-cd,./seed.iso -s 10,virtio-net,tap1001 -s 31,lpc -l bootrom,/usr /local/share/uefi-firmware/BHYVE_UEFI.fd -H -w -s 16,fbuf,tcp=3D10.78.67.11:5900,w=3D1920,h=3D1080 -s 17,xhci,tablet win10 fbuf frame buffer base: 0x941e00000 [sz 16777216] pci_vtnet_reset pci_vtnet_reset pci_vtnet_neg_features pci_vtnet_rx pci_vtnet_rx pci_vtnet_rx Unhandled ps2 keyboard command 0x02 pci_vtnet_rx pci_vtnet_rx pci_vtnet_rx pci_vtnet_rx Unhandled ps2 keyboard command 0x02 pci_vtnet_rx pci_vtnet_rx pci_vtnet_rx pci_vtnet_reset << Set sc->rx_merge to 1. pci_vtnet_rx <<<-- RX called before features was negotiated, so sc->rx_merg= e =3D=3D 1 Assertion failed: (iov[0].iov_len >=3D sizeof(*hdr)), function pci_vtnet_rx= , file /afedorov/freebsd-head-clean/usr.sbin/bhyve/pci_virtio_net.c, line 278. Abort As far as I understand, RX should be disabled until features are negotiated. Guest starts successfully if you apply the next patch: Index: usr.sbin/bhyve/pci_virtio_net.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.sbin/bhyve/pci_virtio_net.c (revision 354802) +++ usr.sbin/bhyve/pci_virtio_net.c (working copy) @@ -149,6 +149,8 @@ /* Acquire the RX lock to block RX processing. */ pthread_mutex_lock(&sc->rx_mtx); + netbe_rx_disable(sc->vsc_be); + /* Set sc->resetting and give a chance to the TX thread to stop. */ pthread_mutex_lock(&sc->tx_mtx); sc->resetting =3D 1; --=20 You are receiving this mail because: You are on the CC list for the bug.=