VM wont start with NVMe device passed through

i am attempting to pass through my NVMe device to my VM, lspci -nnk shows that vfio-pci is loaded into the device, but attempting to start the VM yields this error:

error: internal error: process exited while connecting to monitor: 2019-01-11T23:19:26.245272Z qemu-system-x86_64: -device vfio-pci,host=41:00.0,id=hostdev2,bootindex=
1,bus=pci.0,addr=0x8,rombar=0: vfio 0000:41:00.0: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don’t fit in BARs, or don’t align

ive never seen this error before and have no idea what could be causing it.
any help is apreciated.

More detail would be nice, (hardware used, software etc)

my motherboard is the asus prime x399-a and the NVMe device in question is the crucial CT500P1SSD8

Ive seen this before where NVMe devices are using the SMI SM2262 controller. Detailed here:
I think there’s some things detailed in the later posts which might help patch the issue.

Samsung NVMe devices dont have this issue.


Looks like im also having this issue.

Crucial, CT500P1SSD8

Error: failed to add PCI capability 0x11[0x50]@0xb0: table & pba overlap, or they don’t fit in BARs, or don’t align

Maybe I need to refund my Amazon M.2 Drive before March 3rd lol.

Rats… I also have the same issue as well (I own a ADATA SX8200NP)…

I have not tried the patch yet.

Edit: I am also going to assume that the patch has not been upstreamed, right?

Update: Just edit your xml (taken from this comment):

Here is an example that Alex Williamson provided. Make sure that your apply it to the right PCI device.

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
    <hostdev mode='subsystem' type='pci' managed='yes'>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      <alias name='ua-sm2262'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.ua-sm2262.x-msix-relocation=bar2'/>

Make sure to read the comment though, there are limitations with this workaround, but I can confirm that this works wonders for my Hackintosh VM.

1 Like

For Intel SSD 660p series, the latest firmware is required for pass-through to work without issues. The latest one should be from mid 2020 at the time of writing this.

Not even any workarounds or special settings for qemu/libvirt are needed, just a simple pass-through setup as with any other PCIe device.