Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Apr 2020 07:29:55 +0000
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)
Message-ID:  <bug-245392-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-245392-27103>