Qemu: NVMe controller gets stuck during controller config
Posted: Fri Sep 25, 2020 2:32 pm
I'm working on an NVMe driver and it seems to be getting stuck, either when the controller is reset or when its being enabled. (QEMU also seems to be alternating between supporting the NVM command set and only supporting the admin command set at random, which is weird.) The output of my kernel is below:
I'm not honestly sure what's causing this -- it could be an issue with my code or with QEMU. My code is available over here. Initialization code for the NVMe driver is on lines 564-746 (I need to break this file up into chunks). I'm doing my best to follow the NVMe article as well as the NVMe base specification, revision 1.4a.[INFO] [nvme] initializing controller
[INFO] [nvme] running controller checks
[INFO] [nvme] Checking controller version
[DEBUG] [nvme] VS = 7000800, 111000000000000100000000000
[INFO] [nvme] Checking command set support
[INFO] [nvme] NVM command set supported
[DEBUG] [nvme] CSS = 69, 1101001
[INFO] [nvme] device supports 4KiB pages
[DEBUG] [nvme] MPSMIN = 2, 10
[INFO] [nvme] resetting controller
[DEBUG] [nvme] CC = 216876D, 10000101101000011101101101
[DEBUG] [nvme] CSTS = 1C090703, 11100000010010000011100000011
[DEBUG] [nvme] CC[0] = 0
[DEBUG] [nvme] CC = 216876C, 10000101101000011101101100