Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jun 2019 14:13:22 -0500
From:      Adam <amvandemore@gmail.com>
To:        Robert Crowston <crowston@protonmail.com>
Cc:        FreeBSD virtualization <freebsd-virtualization@freebsd.org>
Subject:   Re: Bhyve GPU passthrough
Message-ID:  <CA%2BtpaK3ammB6M2eFr2essU2LybycZDNFeNb7jkk6r2bU0ydNZw@mail.gmail.com>
In-Reply-To: <KVHni2a5QeHJo0IM7SJc3NTCqnYLxZzabJYtbcZk3EHsNlUwRni8FM0txIjXFZyh5STUUq5tqHG1Fyvo6lDOyIxGuAzCHXL8ASvirE7MJ9A=@protonmail.com>
References:  <CA%2BtpaK3GFCDJ98%2B%2BVyTnKgLGXN5Fo4Wdxy2tXCcnXqZLxDQ7YQ@mail.gmail.com> <KVHni2a5QeHJo0IM7SJc3NTCqnYLxZzabJYtbcZk3EHsNlUwRni8FM0txIjXFZyh5STUUq5tqHG1Fyvo6lDOyIxGuAzCHXL8ASvirE7MJ9A=@protonmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 15, 2019 at 5:52 AM Robert Crowston <crowston@protonmail.com>
wrote:

> I think I am the most recent adventurer, but if you go back a couple of
> years I am only building on material I found discussed in this mailing li=
st.
>
> I do have an nVidia GPU working on Linux under the nouveau drivet. It
> required some changes to the bhyve source; in particular I had to remap t=
he
> 64 bit PCI BAR allocations into the lower 4 GB of the guest=E2=80=99s add=
ress
> space. I am not sure if that is a quirk of the AMD processor I=E2=80=99m =
using.
>
> I think there are a few things that prevent this from working in the
> general case. Probably the most serious is bhyve doesn=E2=80=99t support =
emulation
> or passthrough of PCI ROMs. I am working on a hack to make that work in m=
y
> spare time. But I am not an official member of the project, just tinkerin=
g.
> :-)
>
> The nVidia Windows driver only checks the pending break enable bit on the
> feature flags register to see if it is virtualized (or at least that was
> the case about a year ago). You can readily change that to 0 in the bhyve
> source code. But we are some way from that yet.
>

Hey yes your information both previous and current is helpful.  nouveau
doesn't get me anything so I didn't test it.  Pretty much only goal is CUDA
in the VM, but it seems you are right in that this is a ways off.  There
are some changes relative to my experience vs what you originally
describe.  Maybe part of that are the changes to bhyve 12-stable.  The only
thing that shows in the FreeBSD VM when trying nvidia-smi is:

Jun 15 14:09:38 passthrough kernel: NVRM: GPU 0000:00:01.0: RmInitAdapter
failed! (0x26:0x65:1133)
Jun 15 14:09:38 passthrough kernel: nvidia0: NVRM: rm_init_adapter() failed=
!

So I guess that is the PCI ROM issue.

If you do work up some patches and need some other testing, let me know.

--=20
Adam



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BtpaK3ammB6M2eFr2essU2LybycZDNFeNb7jkk6r2bU0ydNZw>