Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Nov 2020 23:31:56 +0000
From:      bugzilla-noreply@freebsd.org
To:        virtualization@FreeBSD.org
Subject:   [Bug 250802] bhyve exited with status 134 when GPU PCI passthrough
Message-ID:  <bug-250802-27103-xvlIMpIF8l@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-250802-27103@https.bugs.freebsd.org/bugzilla/>
References:  <bug-250802-27103@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250802

Robert Crowston <crowston@protonmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crowston@protonmail.com

--- Comment #2 from Robert Crowston <crowston@protonmail.com> ---
Are you on AMD? I have had the same problem.

For some reason the processor is unable to handle accesses to BARs mapped a=
bove
4 GB.  The vm exits on such access and transfers control back to the vmm. B=
ut
the vmm does not expect to handle memory passthrough -- the processor is
supposed to handle that natively -- only i/o passthrough, tripping this
assertion.

There is a hardcoded limit where we decide whether to allocate a bar above =
or
below the 4 GB mark, in pci_emul.c, at pci_emul_alloc_pbar():

/*
 * XXX
 * Some drivers do not work well if the 64-bit BAR is allocated
 * above 4GB. Allow for this by allocating small requests under
 * 4GB unless then allocation size is larger than some arbitrary
 * number (32MB currently).
 */
 if (size > 32 * 1024 * 1024) {

In the past I have found that by raising this limit, such that all bars are
allocated in the lower 32 bit address space, I can start a GPU under Linux.=
 I
have not had success under Windows.

It's worth noting that most real BIOS or UEFIs preferentially allocate even
large BARs in the lower 4 GB of the address space, so that configuration is
much better tested for consumer devices.

    -- RHC.

--=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-250802-27103-xvlIMpIF8l>