[vfio-users] OVMF + OS X El Capitan + 970 gtx passthrough = Success

Andrew Morgan andrew.morgan4453 at gmail.com
Mon Dec 7 08:02:32 UTC 2015


Thanks for the reply Okky, apparently I marked it as read without
actually thinking about it and then proceeded to wait for your response
for a few weeks until I realized I had already received it. Whoops :P

Either way, after following your suggestions, I have managed to get VFIO
working successfully with OSX! The steps necessary for me since my last
email were:

* Download and install Nvidia web drivers for OSX
(https://www.nvidia.com/download/driverResults.aspx/73628/en-us). I did
this while it was running without a GPU attached.
* Reboot VM this time with GPU attached in Qemu command script
* Insert "nvda_drv=1" at the end of the Boot Options line in Clover's
"Options".

I also set up Synergy for use with the VM, since mouse control through
Qemu's VNC(?) is a bit sluggish.

My Synergy script if anyone needs it:
https://gist.github.com/anonymous/2884c7c5612fdc77d171

My qemu startup if anyone needs it:
https://gist.github.com/anonymous/52c6cbc7bc292c755e0c

Finally, while adding nvda_drv=1 in boot options works, I seem to have
to do this each time the VM boots. Is there a way to change Clover's
boot options permanently?

Also, sound does not currently work, however as I'm only using this VM
for iOS development, it's not too big of a deal.

Thanks all,
Andrew Morgan


On 11/22/2015 04:46 PM, Okky Hendriansyah wrote:
> On November 22, 2015 at 18:57:10, Andrew Morgan
> (andrew.morgan4453 at gmail.com <mailto:andrew.morgan4453 at gmail.com>) wrote:
>> Hey Okky, 
> 
> Hi Andrew,
> 
>> Through your example and Gabriel's notes here ( 
>> http://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/), I've managed to get 
>> the VM booting. App Store and app updates are working. Networking was a 
>> hassle, but seemingly appending the networking bits from the top of the 
>> qemu launch script from above seems to work flawlessly. 
> 
> Can you try my networking config? As long as you have the bridge
> networking (by default br0) configured, I think you can use my script it
> is using the Tap networking [1]. The qemu-mac-hasher script is the
> script to autogenerate my guest MAC address based on its name, which I
> borrowed from [2]
> 
>> I was unsuccessful (I believe) at passing through the GPU however. When 
>> booting, I do get output from my GeForce GTX 970, however all I see are 
>> a line of +'s across the top of the screen. 
>>
>> I can still manipulate Clover through the Qemu window, though Clover 
>> doesn't actually seem to show on the GPU. Debug info from qemu is 
>> outputted in the terminal it is run from. I believe this is actually 
>> logs from the VM itself however. Here 
>> (https://gist.github.com/anoadragon453/68da824929e05c9b038d) is the log 
>> output. It always seems to be getting stuck at: 
> 
> If you would like to disable the behavior to output the serial output to
> the Terminal, you can disable it by using “-serial none” instead of
> “-serial stdio”
> 
>> > Waiting for remote debugger connection. 
>>
>> with no progress even after nearly 10 minutes of waiting. 
>>
>> I am not able to reach OSX with the vfio qemu options enabled, yet it 
>> does boot flawlessly without them. However the performance is thus
>> sub-par. 
>>
>> Here is my qemu start-up script: 
>> https://gist.github.com/anoadragon453/fa687e88c887044f5dd9 
> 
> You’re using OVMF with Clover, but I see there was a "x-vga=on" option
> in your GPU passthrough line which depicts that the passthrough is on
> VGA (legacy) mode. You don’t need that option in OVMF (legacy-free
> mode), so I’d suggest you to remove the "x-vga=on" option. In addition,
> I see your Mac OS X boot arguments missing the option to enable the
> NVIDIA driver. Add the option "nvda_drv=1”.
> 
>> Any help would be appreciated. 
>>
>> Thanks, 
>> Andrew Morgan 
> 
> Please let me know your results.
> 
> 
> [1] https://wiki.archlinux.org/index.php/QEMU#Tap_networking_with_QEMU
> 
> [2] https://wiki.archlinux.org/index.php/QEMU#Link-level_address_caveat
> 
> 
> Best regards,
> 
> -- 
> *Okky Hendriansyah*
> 




More information about the vfio-users mailing list