HomeFreeBSD

bhyve nvme: Fix Controller init error cases

Description

bhyve nvme: Fix Controller init error cases

Fuzzing of bhyve uncovered an assertion failure in the NVMe emulation.
Investigation uncovered several corner cases the code did not handle.
This change handles several Controller initialization errors, including

  • bad AQ sizes
  • bad AQ vm_map_gpa
  • doorbell writes prior to RDY
  • doorbell writes to uninitialized queue
  • CSTS.RDY if CFS set

PR: 256317,256319,256320,256322
Reported by: Cheolwoo Myung <cwmyung@snu.ac.kr>
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D35453

(cherry picked from commit d7d1becad4b692b97dd1f32706947aae5118294b)

Details

Provenance
chuckAuthored on Aug 14 2022, 2:47 PM
jhbCommitted on Jan 26 2023, 7:29 PM
Reviewer
jhb
Differential Revision
D35453: bhyve nvme: Fix Controller init error cases
Parents
rGbe9a57eda106: vmm: Fix snapshots for AMD CPUs
Branches
Unknown
Tags
Unknown