From owner-freebsd-virtualization@freebsd.org Mon Apr 6 07:29:55 2020 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 7F9DE2A6191 for ; Mon, 6 Apr 2020 07:29:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48whyC2sVnz4d1t for ; Mon, 6 Apr 2020 07:29:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 624E02A6190; Mon, 6 Apr 2020 07:29:55 +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 6216F2A618F for ; Mon, 6 Apr 2020 07:29:55 +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 48whyC22hLz4d1s for ; Mon, 6 Apr 2020 07:29:55 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 416C124456 for ; Mon, 6 Apr 2020 07:29:55 +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 0367Tt7L078394 for ; Mon, 6 Apr 2020 07:29:55 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0367Tt2f078393 for virtualization@FreeBSD.org; Mon, 6 Apr 2020 07:29:55 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 245392] bhyve PCI passthru built-in rtl8168 to OpenBSD no packets (AMD Ryzen 3 1200) Date: Mon, 06 Apr 2020 07:29:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: me@anatoli.ws X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: 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, 06 Apr 2020 07:29:55 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245392 Bug ID: 245392 Summary: bhyve PCI passthru built-in rtl8168 to OpenBSD no packets (AMD Ryzen 3 1200) Product: Base System Version: 12.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bhyve Assignee: virtualization@FreeBSD.org Reporter: me@anatoli.ws Created attachment 213114 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D213114&action= =3Dedit a dmesg from FreeBSD 12.1-RELEASE r354233 running on the machine Trying to PCI passthru a built-in NIC on 12.1-RELEASE r354233 to OpenBSD 6.6 inside bhyve on a AMD Ryzen 3 1200. OpenBSD sees the NIC (re0 Realtek 8168), it can even detect the link state correctly, but it can't send/receive packets. /boot/loader.conf contains hw.vmm.amdvi.enable=3D"1". I launch the instance this way: sudo bhyve -c 4 -m 4G -wuHP \ -s 0,amd_hostbridge \ -S \ -s 2,passthru,5/0/0 \ -s 3,virtio-blk,/vm/ppt/disk.img \ -s 5,virtio-net,tap0 \ -s 31,lpc -l com1,/dev/nmdm0A \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ ppt When OpenBSD runs on the machine without virtualization, the nic works correctly. When virtualized with passthru, it can't send/receive data on the nic, but it detects the link correctly. Another (possibly related) issue is if I execute the command above without = -w (same happens with or without PCI passthru), OpenBSD fails at initialization with "protection fault trap, code=3D0; Stopped at identifycpu+0xa5c: wrmsr". Please find attached the following files: * dmesg.freebsd: a dmesg from FreeBSD 12.1-RELEASE r354233 running on the machine. * dmesg.openbsd.native: a dmesg from OpenBSD 6.6 running on the maching without virtualization. * dmesg.openbsd.bhyve: a dmesg from OpenBSD 6.6 running inside bhyve, lauc= hed from the FreeBSD (the first dmesg) with the command mentioned above. * pcidump.native: a result of the pcidump command under OpenBSD 6.6 runnin= g on the machine without virtualization (5:0:0 is the device in question). * pcidump.bhyve: a result of the pcidump command under OpenBSD 6.6 inside bhyve (0:2:0). * vm-bhyve.passthru: a result of the vm-bhyve passthru command right before launching an OpenBSD bhyve instance. * boot.crash: the OpenBSD boot sequence that leads to a crash when bhyve is invoked without the -w option. --=20 You are receiving this mail because: You are the assignee for the bug.=