You are not logged in.

#1 2026-09-06 01:14:04

naff
Member
Registered: 2026-09-05
Posts: 2

PCI passthrough of NVMe drive broken since 7.2.2

I've got a windows 11 vm, doing PCI passthrough with my GPU and NVMe drive. Since kernel 7.2.2 (including 7.2.3) passthrough of the NVMe has stopped working (GPU still works though).

My specs:
Samsung 990 EVO Plus 2TB
Ryzen 9 9900X
MSI MAG X670E TOMAHAWK WIFI (MS-7E12)
Nvidia 4070 super

Output of lcpci -nnk

02:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller PM9C1a (DRAM-less) [144d:a80d]
    Subsystem: Samsung Electronics Co Ltd Device [144d:a801]
    Kernel driver in use: nvme
    Kernel modules: nvme

virt manager xml for the drive:

<hostdev mode="subsystem" type="pci" managed="yes">
  <source>
    <address domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
  </source>
  <boot order="1"/>
  <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
</hostdev>

libvirtd.log for the error:

2026-09-01 23:28:09.529+0000: 1286: info : libvirt version: 12.7.0
2026-09-01 23:28:09.529+0000: 1286: info : hostname: arch, uid: 0
2026-09-01 23:28:09.529+0000: 1286: error : virNetSocketReadWire:1782 : End of file while reading data: Input/output error
2026-09-01 23:28:30.697+0000: 43062: error : qemuMonitorIORead:381 : Unable to read from monitor: Connection reset by peer
2026-09-01 23:28:30.697+0000: 43062: error : qemuProcessReportLogError:2151 : internal error: QEMU unexpectedly closed the monitor (vm='win11'): 2026-09-01T23:28:30.180307Z qemu-system-x86_64: -device {"driver":"v
fio-pci","host":"0000:02:00.0","id":"hostdev3","bus":"pci.4","addr":"0x0"}: vfio 0000:02:00.0: invalid PCI interrupt pin 255
2026-09-01 23:28:31.300+0000: 1391: error : virPCIGetHeaderType:3411 : internal error: Unknown PCI header type '127' for device '0000:02:00.0'
2026-09-01 23:28:31.300+0000: 1391: error : virHostdevResetAllPCIDevices:604 : Failed to reset PCI device: internal error: Unknown PCI header type '127' for device '0000:02:00.0'
2026-09-01 23:28:59.566+0000: 1286: error : virNetSocketReadWire:1782 : End of file while reading data: Input/output error
2026-09-01 23:29:17.234+0000: 1389: error : virPCIGetHeaderType:3411 : internal error: Unknown PCI header type '127' for device '0000:02:00.0'

I've got workarounds for now (downgrade kernel to 7.1.9, or just use the nvme as a block device) so it's not urgent, just posting here to see if anyone else has had problems, and to ask if I should file a bug report somewhere. First post here, sorry if I got something wrong smile

Offline

#2 2026-10-10 16:23:55

alegru
Member
Registered: 2026-10-10
Posts: 3

Re: PCI passthrough of NVMe drive broken since 7.2.2

Update: the fix is queued for kernel 7.3 and now covers both the 990 PRO and the 990 EVO Plus (patch series, EVO Plus patch). Until a kernel with the fix reaches Arch, use the workaround below.

Same problem here with a 990 PRO [144d:a80c]. Cause is commit 10baa9b4df40 "PCI: Drop unnecessary retries when restoring BARs", new in 7.2. My drive advertises Immediate Readiness, so the kernel doesn't wait after the FLR that vfio-pci does when the VM starts, but with older firmware the drive needs 1–7 ms after an FLR. The config restore gets lost, and vfio-pci then saves and writes back all-ones. That's the "Unknown PCI header type '127'" / "invalid PCI interrupt pin 255", and the drive is gone until reboot.

990 PRO: updating the firmware from 1B2QJXD7 to 8B2QJXD7 (Samsung Magician) fixed it here, even on 7.2.9 without the workaround. While the drive is bound to the nvme driver, this shows the firmware version:

cat /sys/class/nvme/nvme*/firmware_rev

Workaround until the fix lands: make the kernel use a bus reset instead of FLR, which waits for the drive. Run this before starting the VM (the setting lasts until reboot):

echo bus | sudo tee /sys/bus/pci/devices/0000:02:00.0/reset_method

Three starts in a row worked for me. A udev rule should make it permanent, but I haven't tested that:

ACTION=="add", SUBSYSTEM=="pci", KERNEL=="0000:02:00.0", ATTR{reset_method}="bus"

Last edited by alegru (Today 18:00:36)

Offline

#3 2026-10-13 07:07:58

alegru
Member
Registered: 2026-10-10
Posts: 3

Re: PCI passthrough of NVMe drive broken since 7.2.2

naff, the accepted fix only covers the 990 PRO [144d:a80c], because I don't know whether your 990 EVO Plus [144d:a80d] also advertises Immediate Readiness. Could you post the output of

sudo setpci -s 02:00.0 STATUS.w

(an odd value like 0011 means it does), and whether the reset_method workaround from my post above fixes it for you? Then I can send a follow-up patch for the EVO Plus. Also worth checking Magician or Samsung's firmware page for an EVO Plus update, it has its own firmware line.

Offline

#4 Yesterday 21:21:06

naff
Member
Registered: 2026-09-05
Posts: 2

Re: PCI passthrough of NVMe drive broken since 7.2.2

Thanks so much for your help. The reset_method fix works consistently for me on 7.2.9, and output of setpci is 0011.

I'm already on the latest firmware version available from the samusung driver site or magician (2B2QKXG7), so it looks like a firmware fix isn't available for the 990 evo plus right now.

Please let me know if you need any more information.

Offline

#5 Today 18:06:09

alegru
Member
Registered: 2026-10-10
Posts: 3

Re: PCI passthrough of NVMe drive broken since 7.2.2

naff wrote:

Thanks so much for your help. The reset_method fix works consistently for me on 7.2.9, and output of setpci is 0011.

I'm already on the latest firmware version available from the samusung driver site or magician (2B2QKXG7), so it looks like a firmware fix isn't available for the 990 evo plus right now.

Please let me know if you need any more information.

I sent a patch adding your 990 EVO Plus to the fix, and the maintainer folded it into the 990 PRO fix, so both are queued for kernel 7.3 now. Thanks for checking the setpci output and testing the workaround, that's what got your drive included.

Until Arch ships a kernel with the fix, the reset_method workaround should do.

Offline

#6 Today 19:23:40

gabrielsec
Member
From: Rio De Janeiro | Brazil
Registered: Today
Posts: 16

Re: PCI passthrough of NVMe drive broken since 7.2.2

This looks like a kernel regression affecting PCI passthrough of certain Samsung NVMe drives. The ArchWiki PCI passthrough guide explains why a supported device reset method is important for passthrough.

For the Samsung 990 EVO Plus, the workaround reported in this thread is to use the bus reset method instead of FLR. Check the available methods first:

cat /sys/bus/pci/devices/0000:02:00.0/reset_method

Then, before starting the VM, try:

echo bus | sudo tee /sys/bus/pci/devices/0000:02:00.0/reset_method

This setting lasts until reboot. The Linux PCI documentation describes PCI reset mechanisms, and the upstream patch for the 990 EVO Plus addresses this specific issue.

The thread reports that this workaround works on the affected system and that a fix is queued for Linux 7.3. I'd use the workaround until an Arch kernel containing the fix is available.

Regards, 
Gabriel


B R A Z I L

You never know what's going on inside a clown's mind.

Online

#7 Today 19:24:31

gabrielsec
Member
From: Rio De Janeiro | Brazil
Registered: Today
Posts: 16

Re: PCI passthrough of NVMe drive broken since 7.2.2

If this solves your issue, please edit the thread title to mark it as [SOLVED]. This helps other users find the solution more easily.

Regards, 
Gabriel


B R A Z I L

You never know what's going on inside a clown's mind.

Online

#8 Today 19:52:18

5hridhyan
Member
Registered: 2025-12-25
Posts: 1,096

Re: PCI passthrough of NVMe drive broken since 7.2.2

gabrielsec wrote:

I'd use the workaround until an Arch kernel containing the fix is available.

I do think that was exactly what the responder said and suggested and if the original poster frequented the forum would have known about it.

I also think marking the thread as [SOLVED] would be premature unless the OP considers the workaround sufficient to resolve their issue for now. In that case, a [WORKAROUND] tag might be more appropriate.

And, to my understanding, marking a thread with its status quo after a satisfactory discussion is more about forum etiquette rather than simply a way to improve its visibility in search results.

Offline

#9 Today 20:48:23

gabrielsec
Member
From: Rio De Janeiro | Brazil
Registered: Today
Posts: 16

Re: PCI passthrough of NVMe drive broken since 7.2.2

Ok lol cool

Last edited by gabrielsec (Today 20:49:23)


B R A Z I L

You never know what's going on inside a clown's mind.

Online

Board footer

Powered by FluxBB