Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Apr 2020 04:45:06 -0300
From:      Anatoli <me@anatoli.ws>
To:        virtualization@FreeBSD.org
Subject:   Re: [Bug 245392] bhyve PCI passthru built-in rtl8168 to OpenBSD no packets (AMD Ryzen 3 1200)
Message-ID:  <ba78f84f-1db6-6f1d-1752-dd2a07592131@anatoli.ws>
In-Reply-To: <bug-245392-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-245392-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

I just submitted a bug as to not send here all the attachments.

Is this something known? Or maybe I'm missing some configuration option?
Should I submit more details?

Thanks,
Anatoli

On 6/4/20 04:29, bugzilla-noreply@freebsd.org wrote:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245392
> 
>             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=213114&action=edit
> 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="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=0; 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, lauched
> from the FreeBSD (the first dmesg) with the command mentioned above.
>  * pcidump.native: a result of the pcidump command under OpenBSD 6.6 running 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.
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ba78f84f-1db6-6f1d-1752-dd2a07592131>