xnvme / xnvme

xNVMe: cross-platform libraries and tools for NVMe devices
https://xnvme.io/
Other
229 stars 65 forks source link

Known Issue: show-regs through SPDK crashes qemu on MacOS #435

Open karlowich opened 7 months ago

karlowich commented 7 months ago

The memcpy in xnvme_be_spdk_sync_cmd_pseudo causes hvf in QEMU to fail an assert, resulting in a crash. It is unclear exactly where the bug is - for now it will remain a known issue.

birkelund commented 7 months ago

The memcpy() of the mmap'ed register causes an HVF data exit (a vcpu trap/VMEXIT) with len=1 if copying more than 8 bytes. That's in itself a little weird. QEMU's trap handler ends up asserting on isv (which I also have no idea what is).

I'm 100% out of my comfort zone here, but I do not believe the bug to be in hw/nvme. It actually kinda feels like the bug would be in the guest kernel doing something that would also be illegal on real hardware (which justifies the QEMU assert).