Jump to content
Jerky_san

NVME M.2 Passthrough

64 posts in this topic Last Reply

Recommended Posts

So I got my gaming machine up and running on a Ryzen system with a gpu passthrough and everything going good. Last thing I want to do is pass through an NVME drive to the machine but I keep getting this error

internal error: qemu unexpectedly closed the monitor: 2018-06-04T23:48:57.302131Z qemu-system-x86_64: -device vfio-pci,host=01:00.0,id=hostdev2,bus=pci.0,addr=0x8: vfio error: 0000:01:00.0: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don't fit in BARs, or don't align

 

https://i.imgur.com/NDShzQT.png

 

I used this guide 

Anyone have any suggestions?

tower-diagnostics-20180604-1852.zip

Edited by Jerky_san

Share this post


Link to post
29 minutes ago, trurl said:

merged duplicates

 

Sorry I thought I had deleted the one in General Support

Share this post


Link to post

Can you post your VMs XML? 

Also, have you stubbed the NVME device? from looking at your logs, it doesnt look like it has been. 

 

 

 

 

 

Share this post


Link to post
On 6/6/2018 at 8:45 AM, billington.mark said:

Can you post your VMs XML? 

Also, have you stubbed the NVME device? from looking at your logs, it doesnt look like it has been. 

 

 

 

 

 

So I went both ways stubbed/not. The guide is for doing it without stubbing it. Both result in the same error. The VM's XML currently doesn't have it on there because it is my normal gaming machine so I'll have to re-add it. I'll get it in a little after I finish this work.

Share this post


Link to post
On 6/6/2018 at 8:45 AM, billington.mark said:

Can you post your VMs XML? 

Also, have you stubbed the NVME device? from looking at your logs, it doesnt look like it has been. 

 

 

 

 

 

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>

 

Here is the XML where it lets you mount it without stubbing it via the video.

Share this post


Link to post
On 6/7/2018 at 10:14 PM, Jerky_san said:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>

 

Here is the XML where it lets you mount it without stubbing it via the video.

 

Can you paste your syslinux config (with the device stubbed), and post another diag zip after trying to start up the Vm with the device passed through? 

 

 

Edited by billington.mark

Share this post


Link to post

I am also getting this error and have been unable to get around it. Subbing the device made no difference for me. I even tried installing just ubuntu on the server and using kvm myself and ran in to this same issue again. Are some motherboards just not able to do this? Running a 8600k in a MSI Z370M Mortar motherboard.

 

Edit: Was able to confirm my motherboard has VT-D and it is enabled.

Edited by dev_codec
More infomation

Share this post


Link to post

I found out what is causing this, its something to do with the nvme drive itself. I was trying to pass-though a Mushkin Pilot (MKNSSDPL250GB-D8), uses a SMI SM2262 for its controller. However I just tried a samsung pm961 and it worked just fine. Very odd, this must be an issue with kvm or maybe the nvme is not made to spec.

 

Edit: Ill also add that i had 2 of the pilots in my system, not sure if that would some how make a difference but thought i would add it. I would like to test it again with only one but I have no way to.

Edited by dev_codec
More infomation

Share this post


Link to post

Updated to 6.6rc1 and still won't pass through sadly. This is on my new threadripper build. Zenith x399 and 2990wx.

Share this post


Link to post

I am running unraid 6.6.2 and tried to pass through an ADATA XPG SX8200 with Silicon Motion SM2262 controller. Appears to be same issue:

 

vfio error: 0000:0b:00.0: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don't fit in BARs, or don't align

 

My system is  an Asus X99-WS and i7 5960X. Anyone have any ideas?

Share this post


Link to post
On 10/14/2018 at 6:03 PM, bpsystems said:

I am running unraid 6.6.2 and tried to pass through an ADATA XPG SX8200 with Silicon Motion SM2262 controller. Appears to be same issue:

 

vfio error: 0000:0b:00.0: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don't fit in BARs, or don't align

 

My system is  an Asus X99-WS and i7 5960X. Anyone have any ideas?

Seems to be a hardware issue with the  SMI SM2262 controller on these NVME devices. 
 

A few posts up, this was resolved by swapping out to a Samsung PM961.

Id stick to known good hardware like Samsung\Intel NVME drives tbh. 

Share this post


Link to post
On 12/5/2018 at 11:23 PM, zinkpro45 said:

Any update to this? I have a HP EX920 and would very much like to be able to passthrough the drive to my VM.

Never got it to work.. there is a conflict that I posted about but no one more knowledgeable said anything back. I've never tinkered with the base bits of code for qemu but the post I found does a check and that check fails but it shouldn't and it's a bug. The person changed it slightly to pass the check for this nvme. I ended up just getting a Samsung.

Share this post


Link to post

I just grabbed 2 Western Digital Black m.2 1TB drives and it seems I might have gotten the same controller in them- does anyone know what the process looks like to get these things going?

Share this post


Link to post

Everyone experiencing this issue who has an NVMe drive making use of the SM2262 controller, please:

 - Report the device model

 - Report the PCI vendor and device IDs (lspci -nn)

 - Step through comments 1 and 10 in https://bugzilla.kernel.org/show_bug.cgi?id=202055 to verify the device behaves the same, particularly the MSI-X Count is initially 16, after reset it's reported as 22, but the value remains 16 if a secondary bus reset is triggered via setpci.

 

There's also a patch there for testing, but it only includes the Intel 760p device ID, we'll need to compile a list of all affected device IDs or figure out if there's a way to interrogate the NVMe controller interface to find the these chips since it seems to be in use by Intel, Mushkin, ADATA, and WD.  Thanks

Share this post


Link to post

I'm  happy to assist but those comments go beyond my technical understanding. If you would be willing to clarify which commands need to be run I would happily do so and provide the output.

 

ADATA XPG SX8200

0b:00.0 Non-Volatile memory controller [0108]: Silicon Motion, Inc. Device [126f:2262] (rev 03)

Share this post


Link to post
On 7/16/2018 at 4:01 AM, dev_codec said:

I found out what is causing this, its something to do with the nvme drive itself. I was trying to pass-though a Mushkin Pilot (MKNSSDPL250GB-D8), uses a SMI SM2262 for its controller. However I just tried a samsung pm961 and it worked just fine. Very odd, this must be an issue with kvm or maybe the nvme is not made to spec.

 

Edit: Ill also add that i had 2 of the pilots in my system, not sure if that would some how make a difference but thought i would add it. I would like to test it again with only one but I have no way to.

5 days prior he made a topic reporting ids of device.

 

Apparently some devices with SM2262 share same vendor:device id 126f:2262.

Edited by Maker

Share this post


Link to post

Hopefully someone will show us how to install the patch to Unraid.

 

I have Adata SX8200

Share this post


Link to post

We can try to add that patch to upcoming Unraid 6.7 release which is on 4.19 kernel at the moment.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.