HomeFreeBSD

nvme: Initialize HMB entries before loading them into the controller

Description

nvme: Initialize HMB entries before loading them into the controller

struct nvme_hmb_desc contains a pad field which was not getting
initialized before being synced. This doesn't have much consequence but
triggers a report from KMSAN, which verifies that host-filled DMA memory
is initialized before it is made visible to the device. So, let's just
initialize it properly.

Reported by: KMSAN
Reviewed by: mav, imp
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D43090

(cherry picked from commit d9b7301bb791faab48b6c7733c34078427b9a374)

Details

Provenance
markjAuthored on Dec 18 2023, 10:45 PM
Reviewer
mav
Differential Revision
D43090: nvme: Initialize HMB entries before loading them into the controller
Parents
rG2bc5d0db67e0: arm64: Remove an unused global variable
Branches
Unknown
Tags
Unknown