From nobody Sun Jun 19 19:15:20 2022 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CD862868D5A for ; Sun, 19 Jun 2022 19:15:43 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from webmail5.jnielsen.net (webmail5.jnielsen.net [IPv6:2607:f170:34:11::b0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.freebsdsolutions.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LR2YV57MKz3tKS for ; Sun, 19 Jun 2022 19:15:42 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from smtpclient.apple ([IPv6:2001:470:4aee:2:6d36:fa10:326b:72b7]) (authenticated bits=0) by webmail5.jnielsen.net (8.17.1/8.17.1) with ESMTPSA id 25JJFRYI025389 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 19 Jun 2022 13:15:29 -0600 (MDT) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail5.jnielsen.net: Host [IPv6:2001:470:4aee:2:6d36:fa10:326b:72b7] claimed to be smtpclient.apple From: John Nielsen Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: bhyve GPU passthrough + romfile Message-Id: Date: Sun, 19 Jun 2022 13:15:20 -0600 Cc: c.koehne@beckhoff.com To: freebsd-virtualization@freebsd.org X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Rspamd-Queue-Id: 4LR2YV57MKz3tKS X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of lists@jnielsen.net designates 2607:f170:34:11::b0 as permitted sender) smtp.mailfrom=lists@jnielsen.net X-Spamd-Result: default: False [-0.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[jnielsen.net]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-virtualization]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6364, ipnet:2607:f170:30::/44, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Hi all- I was excited to (belatedly) see the work done in D33129 and elsewhere = to improve GPU passthrough support with ROM emulation. However I=E2=80=99m= unsure how to interpret this comment: "it's only possible to use a ROM = when using OVMF with enabled bus enumeration.=E2=80=9D Does =E2=80=9COVMF=E2= =80=9D here refer to the normal tianocore/edk2 UEFI boot rom? How does = one enable bus enumeration with that? I=E2=80=99m trying to pass through an AMD GPU to a Windows 10 machine on = bhyve. The GPU in question is the only one in the box, so if I boot both = the host and guest via UEFI it is initialized for EFI and works fine = when Windows attaches to and initializes it. However (and not = surprisingly), when I reboot the VM the GPU goes in to a funky state and = the VM doesn=E2=80=99t come up. The behavior is the same whether or not I have a =E2=80=98rom=3D=E2=80=98 = argument on the passthru device, so I=E2=80=99m assuming that the ROM is = not actually being used. I=E2=80=99m further assuming that the = aforementioned bus enumeration in the bootrom is the missing piece. I did try rebuilding edk2-bhyve from the 202205 release. The build = succeeded but the behavior was unchanged. I=E2=80=99d love to get some guidance on this. Thanks! JN PS: Is there a known/supported way to get a GPU ROM file from FreeBSD? = The one I have I obtained from a Linux host where this GPU was = secondary.