Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2024 08:19:29 +0100
From:      Corvin =?ISO-8859-1?Q?K=F6hne?= <corvink@FreeBSD.org>
To:        Michael =?ISO-8859-1?Q?Sl=F8gedal?= <michael@sloged.al>,  "freebsd-virtualization@FreeBSD.org" <freebsd-virtualization@FreeBSD.org>
Subject:   Re: bhyve intel 530 integrated graphics error
Message-ID:  <a66487231b4c77dabdd17b4120cc6a5067ae4e97.camel@FreeBSD.org>
In-Reply-To: <gxES.l1BY6Ym_vUi8D9urxKuWvQ@Zoka9TMijEmnc8h1QEfjMc2pA_dP_RxOrEsZw_uiNe4.xz>
References:   <gxES.l1BY6Ym_vUi8D9urxKuWvQ@Zoka9TMijEmnc8h1QEfjMc2pA_dP_RxOrEsZw_uiNe4.xz>

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

--=-WuFv+0F9k1HNmTaxIE3P
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi,

unfortunately, GPU passthrough is supported by bhyve but not OVMF. So,
you have to use a patched OVMF. The required patch stack is available
at https://reviews.freebsd.org/D41714. An older version and most
probably still working prebuilt version is available at
https://reviews.freebsd.org/D26209.

On Wed, 2024-01-17 at 01:18 +0100, Michael Sl=C3=B8gedal wrote:
> Hi,
> =C2=A0
> I=E2=80=99ve been trying to collect the necessary info online about how t=
o do
> gpu passthru with integrated intel graphics to win10, but can=E2=80=99t m=
ake
> it work.
> =C2=A0
> =C2=A0=C2=A0=C2=A01. First tried with just passthru, and after 3-4 reboot=
s, the
> display adapter shows up in win10 guest, but it won=E2=80=99t load proper=
ly.

Despite some configuration requirements (e.g. always use slot 2) that's
all you need.

> =C2=A0=C2=A0=C2=A02. Tried adding the hd audio device as well, get bluesc=
reen with
> =E2=80=9Cmemory_management=E2=80=9D stop code in guest

Shouldn't happen but seems like another issue.

> =C2=A0=C2=A0=C2=A03. Tried adding a gop rom from
> https://github.com/patmagauran/i915ovmfPkg - host crashed and got
> error below

A GOP is only required for pre OS graphics (e.g. grub menu).

I highly recommend using the GOP from your host system to avoid damages
or strange issues due to incompatibilities. Unfortunately, it's not
always possible to easily extract the GOP from your host system. Even
Intel recommends to ask your board manufacturer:
https://projectacrn.github.io/3.2/tutorials/gpu-passthru.html#enable-the-gv=
t-d-gop-driver

Some alternative ways to extract the GOP:

On Windows try GPU-Z:
https://nvidia.custhelp.com/app/answers/detail/a_id/4188/~/extracting-the-g=
eforce-video-bios-rom-file
On Linux try sysfs:
https://pve.proxmox.com/wiki/PCI_Passthrough#The_.27romfile.27_option

> =C2=A0
> I=E2=80=99m at a loss what to try next. Any ideas where I=E2=80=99m going=
 wrong?
> =C2=A0
> # tail /vm/win10ltsc/vm-bhyve.log=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=20
> Jan 17 00:49:02:=C2=A0 [primary disk: disk0.img]
> Jan 17 00:49:02:=C2=A0 [primary disk dev: file]
> Jan 17 00:49:02: dynamically allocated port 5900 for vnc connections
> Jan 17 00:49:02: booting
> Jan 17 00:49:02:=C2=A0 [bhyve options: -c 6,sockets=3D1,cores=3D3,threads=
=3D2 -m
> 8G -Hwl bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -s
> 2:0,passthru,0/2/0,rom=3D/vm/win10ltsc/i915ovmf.rom -U 8dff5c4a-b083-
> 11ee-b2cd-78d004259091 -S]
> Jan 17 00:49:02:=C2=A0 [bhyve devices: -s 0,hostbridge -s 31,lpc -s
> 4:0,ahci,hd:/vm/win10ltsc/disk0.img -s 31:6,passthru,0/31/6 -s
> 6:0,fbuf,tcp=3D0.0.0.0:5900,w=3D1920,h=3D1080 -s 7:0,xhci,tablet]
> Jan 17 00:49:02:=C2=A0 [bhyve console: -l com1,/dev/nmdm-win10ltsc.1A]

You have to use the `-A` flag. There's an open PR for vm-bhyve:
https://github.com/churchers/vm-bhyve/pull/525/commits/653d01f5b53c0bd8ce70=
7137f67617536de8b1c0

> Jan 17 00:49:02: starting bhyve (run 1)
> Jan 17 00:49:04: bhyve exited with status 134
> Jan 17 00:49:04: stopped
> =C2=A0
> # tail /vm/win10ltsc/bhyve.log=C2=A0=C2=A0=20
> pci_fbuf: mmap_memseg failed
> Assertion failed: (mr->name =3D=3D memp->name), function unregister_mem,
> file /usr/src/usr.sbin/bhyve/mem.c, line 344.
> =C2=A0
> # uname -a
> FreeBSD yellowfellow 14.0-RELEASE-p3 FreeBSD 14.0-RELEASE-p3 #0: Mon
> Dec 11 04:56:01 UTC 2023=C2=A0=C2=A0=C2=A0=C2=A0
> root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/G
> ENERIC amd64

--=20
Kind regards,
Corvin

--=-WuFv+0F9k1HNmTaxIE3P
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEgvRSla3m2t/H2U9G2FTaVjFeAmoFAmWnf4EACgkQ2FTaVjFe
Ampkmg/9HIRsa/qHq2r+slypeu07SGfFOObIu5YeJr11A40gXbnOEkjrIteiES/q
CLFT1TG89qostrLm18n/GpoF89XTA1SY/gywXUSQZQ97Lpqp1CGUjIky5iL9tY47
2oAAIU5mCqTtaEsd/eXTQ9bONUPLvw35geHd73a8qo1hZkbS0lyS80HPz2qpzRwG
oWi7CB7PFr3vWUzUISaCNQ+3ibb9sHC8/Z0O8NOV2sjR4P/W+PNxExfcFtpf2tDB
jZpRtQV9hlUZJkvnMEYExO0nGRbot90Q+IgcQO8AiEoOFrvjezJyRYJPjKEC0KD0
gEmqp21hIY/H3ROvEheTDTvy6R2ZQXe+xO4vgtGRNm8zbpf7FIRTUMbvjZ2PT3my
APCcqxeTu7SPNK3iRxF23y9Kxy8XQ3pH9H4nWqzb3lQgFlQqUJeDPtZczBs/S8Kq
BKvHOICUW3rgJsUpbpKkmwwa/4cf3plmeH0v4HLLhxNXYTLfAv7D9zewY64WLPQn
olgMltfn33Rlbxr4U952r2Gstm/jweUr+79WO+rQIHU+9fkLlh1sEgfKP+4Ky8ZU
4+D+52SrgUXJk7PAk7xyQbebnUSQ4AarVEYBKP/l5mhvvDi2DB+wT+LfWiGtovRa
2yjOJYmuv30/pXet0qWpRBX7ESY0m7+mw7kSyBh2tFiScBsdLcg=
=SX8m
-----END PGP SIGNATURE-----

--=-WuFv+0F9k1HNmTaxIE3P--



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