[Bug 250802] bhyve exited with status 134 when GPU PCI passthrough

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Nov 2 23:31:57 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250802

Robert Crowston <crowston at protonmail.com> changed:

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

--- Comment #2 from Robert Crowston <crowston at 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 above
4 GB.  The vm exits on such access and transfers control back to the vmm. But
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-virtualization mailing list