NVME M.2 Passthrough


Recommended Posts

  • 3 weeks later...

The problem also seems to occur with NVMe's using the Silicon Motion SM2263 controller. In my case the Crucial P1 (CT500P1SSD8).

I'm running version 6.7.0-rc1 and get the same error:

internal error: qemu unexpectedly closed the monitor: 2019-01-23T17:55:09.769688Z qemu-system-x86_64: -device vfio-pci,host=82:00.0,id=hostdev0,bus=pci.4,addr=0x0: vfio 0000:82:00.0: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don't fit in BARs, or don't align

Device: [c0a9:2263] 82:00.0 Non-Volatile memory controller: Micron/Crucial Technology Device 2263 (rev 03)

My Corsair MP510 NVMe with Phison PS5012-E12 controller passes through without any problems.
 

Link to comment
3 hours ago, limetech said:

Correct.  Patch referenced earlier by @aw_ earlier in the topic has been applied to kernel used in 6.7.0-rc1.  Please confirm if this solves the issue.

I will report back once I solve my no video issues on my vm. But I think it's fine now since I'm not getting any error anymore on my Adata SX8200 using SM 2262 controller.

Link to comment
2 hours ago, Initial.F said:

The problem also seems to occur with NVMe's using the Silicon Motion SM2263 controller. In my case the Crucial P1 (CT500P1SSD8).

I'm running version 6.7.0-rc1 and get the same error:

internal error: qemu unexpectedly closed the monitor: 2019-01-23T17:55:09.769688Z qemu-system-x86_64: -device vfio-pci,host=82:00.0,id=hostdev0,bus=pci.4,addr=0x0: vfio 0000:82:00.0: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don't fit in BARs, or don't align

Device: [c0a9:2263] 82:00.0 Non-Volatile memory controller: Micron/Crucial Technology Device 2263 (rev 03)

My Corsair MP510 NVMe with Phison PS5012-E12 controller passes through without any problems.
 

I think the patch that was applied was only for the SM2262 controller. Maybe @aw_ can make another patch for the SM2263 controller.

Link to comment
4 hours ago, limetech said:

Please try 6.7.0-rc2.  Updated the patch to include the SM2263 controller.

Upgraded to 6.7.0-rc2 and I can confirm the patch solved the problem with the Crucial P1 using the SM2263 controller. 
Passthrough works perfectly now, thank you for the great support! 

Link to comment
8 hours ago, Initial.F said:

Upgraded to 6.7.0-rc2 and I can confirm the patch solved the problem with the Crucial P1 using the SM2263 controller. 
Passthrough works perfectly now, thank you for the great support! 

Nice!  Thank you for the testing.  Unfortunately it appears some manufacturers are 'rebranding' the vendor-id of that chip, so this might end up being an unending series of patches as different products are being used 🤬

Link to comment
  • 2 weeks later...

The problem also seems to occur with NVMe's using the Silicon Motion SM2263XT (different from SM2263) controller. In my case the HP EX900 250G.

I'm running version 6.7.0-rc2 and get the same error:

 

internal error: qemu unexpectedly closed the monitor: 2019-02-07T17:55:09.769688Z qemu-system-x86_64: -device vfio-pci,host=05:00.0,id=hostdev0,bus=pci.3,addr=0x0: vfio 0000:05:00.0: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don't fit in BARs, or don't align
 

IOMMU group 51:[126f:2263] 05:00.0 Non-Volatile memory controller: Silicon Motion, Inc. Device 2263 (rev 03)

IOMMU group 52:[126f:2263] 06:00.0 Non-Volatile memory controller: Silicon Motion, Inc. Device 2263 (rev 03)

 

Please add the SM2263XT controller support, Thanks !

Edited by xxb
Link to comment
  • 4 weeks later...

I found another SSD that uses the SM2263 controller, but the patch in 6.7.0-rc5 doesn't work.  It's an Intel SSD 660p, 

 

internal error: qemu unexpectedly closed the monitor: 2019-03-02T07:23:43.702484Z qemu-system-x86_64: -device vfio-pci,host=08:00.0,id=hostdev2,bus=pci.0,addr=0x8: vfio 0000:08:00.0: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don't fit in BARs, or don't align

 

IOMMU group 15:[8086:f1a8] 08:00.0 Non-Volatile memory controller: Intel Corporation Device f1a8 (rev 03)

 

Is there any other information that you may need to get it included? 

 

Thanks for all you do @limetech.

Link to comment
  • 1 month later...
  • 2 weeks later...

Struggling to passthrough nvme drive too.

 

Crucial CT1000P1SSD8 P1 1 TB

[c0a9:2263] 07:00.0 Non-Volatile memory controller: Micron/Crucial Technology Device 2263 (rev 03)

 

internal error: qemu unexpectedly closed the monitor: 2019-05-08T16:39:22.718254Z qemu-system-x86_64: -device vfio-pci,host=07:00.0,id=hostdev3,bus=pci.0,addr=0x9: vfio 0000:07:00.0: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don't fit in BARs, or don't align

 

Unraid 6.7.0-rc8

 

I have tried adding the alias line to my xml but that doesnt change anything, as the qemu code is also need. Is there anything i must do or should i be patient?

 

EDIT: While i wait patiently :) i have rolled back to rc7 and all is well.

Edited by raidserver
Link to comment
21 hours ago, raidserver said:

Struggling to passthrough nvme drive too.

 

Crucial CT1000P1SSD8 P1 1 TB

[c0a9:2263] 07:00.0 Non-Volatile memory controller: Micron/Crucial Technology Device 2263 (rev 03)

 

internal error: qemu unexpectedly closed the monitor: 2019-05-08T16:39:22.718254Z qemu-system-x86_64: -device vfio-pci,host=07:00.0,id=hostdev3,bus=pci.0,addr=0x9: vfio 0000:07:00.0: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don't fit in BARs, or don't align

 

Unraid 6.7.0-rc8

 

I have tried adding the alias line to my xml but that doesnt change anything, as the qemu code is also need. Is there anything i must do or should i be patient?

 

EDIT: While i wait patiently :) i have rolled back to rc7 and all is well.

If you read the release notes of rc8, you will see a patch to work with SM controller NVME's was reverted in favor of another method:

Quote

 Removed kernel patch which was trying to work around problematic Silicon Motion SM2262/SM2263 NVMe controllers.  A different workaround is recommended.

https://bugzilla.kernel.org/show_bug.cgi?id=202055#c42

I assume you didn't follow the new method?

Edited by cybrnook
Link to comment

With a good dose of patience windows has made it to desktop via VNC i see the NVME drive.

 

Performance is terrible though it takes forever to boot & shutdown.

 

the VM log is showing

2019-05-09T16:48:18.233068Z qemu-system-x86_64: warning: guest updated active QH

 

spamming the log tail

Link to comment

Something else to try: create the file /boot/config/vfio-bind with a line that specifies the PCI ID of your nvme device and then reboot for it to take effect.  Take a look at /usr/local/sbin/vfio-pci script for more details.  If you post diags I can tell you the exact string to use but you can prob figure it out.

This might not make any difference but would be good to know that.

Link to comment

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.