nvme: support NVMe 1.0 controllers
Rather than using the Identify command with CNS 01b (GET_NS_LIST), which
was added in NVMe 1.1, we can just enumerate all of the possible
The relevant part of the NVMe spec reads:
Namespaces shall be allocated in order (starting with 1) and packed
Since the previously-used GET_NS_LIST only returns active namespaces, we
also need a check in nvme_probe_ns() to ensure that inactive namespaces
are not reported as boot devices. This can be accomplished by checking
for non-zero block count - the spec indicates that Identify Namespace
for an inactive namespace ID will return all zeroes.
This should have no impact on the QEMU NVMe device model, since it
always reports exactly one namespace (NSID 1).
Signed-off-by: Daniel Verkamp <email@example.com>
1 file changed