[SOLVED] VFIO/Passthrough Troubles; Ubuntu18.04 -> Windows10 /w nVidia Cards

I think the solution is here: Explaining CSM, efifb=off, and Setting the Boot GPU Manually.

Failed to mmap 0000:0b:00.0 BAR 3 is a sign that your graphics card uses a shadow BIOS. Try the remedies in the article linked above.

See also GPU Virtualization with KVM / QEMU under “Primary GPU Workaround”, as well as this post: romfile=/home/bender/gt1030.rom: VFIO 0000:01:00.0 BAR 3 mmap unsupported and the answer to it.

Another post that sheds light on the problem: https://bbs.archlinux.org/viewtopic.php?id=225481.

In essence, it’s a matter of your passthrough graphics card being initialized during system boot. There are several ways to prevent that, or you may need to load a romfile to supersede the shadow BIOS.

Hope this helps.

2 Likes

Success!

Pulled the board and swapped the 710b and 1080.

1080 occupies PCIe_1
710b occupies PCIe_2
BAR3 and MMAP errors are gone. It seems the mobo pushes slot 1 as primary VGA, other settings be damned.

Currently sorting out a boot issue, I think related to the fact that the VM was installed onto a separate storage drive than the host.

Thanks for the help, I will update as soon as things are working 100%!

EDIT:

Up and running. Thanks again for all the assistance. As soon as my testing is done I will put a summary above the OP in case anyone else runs into a similar set of issues.

3 Likes

I only just noticed this thread. Glad to hear you got all your issues sorted.

I wanted to thank you for your excellent quality of documentation.

1 Like

Glad you got it to work. Have fun with your new lean, mean slave windows machine. :wink:

1 Like

Updated OP to reflect some problems > solutions, will continue to update and refine as I go.

Thanks for the introduction to linux and this forum, I think I’ll stay a while!

1 Like

What a ride - but in the end your persistence paid.

As you wrote, your motherboard defaulted to PCIe slot 1 as the primary VGA to boot with. So switching graphics cards was an easy solution. With PCIe 8x speed this should not impact graphics performance.

However, did you have a chance to try loading an unshadowed ROM file as suggested in my previous post?

Even if you don’t try that, it might be a good idea to create a ROM image from your 1080 GPU, as described in Primary GPU Workaround.

Thanks also for documenting your steps/workarounds so that others can benefit from your experience. Hope you don’t mind me linking to your post.

Hi there and great job making the passthrough work on your system. I see you still have the Virtual processors showing in task manager. In case that’s still the case, you might want to try “host-passthrough” cpu model instead of any other options available. Here’s the explanation. The video isn’t mine, I only found it looking for cpu pinning documentation. Cheers.