HomeFreeBSD

bhyve nvme: Add Temperature Threshold support

Description

bhyve nvme: Add Temperature Threshold support

This adds the ability for a guest OS to send Set / Get Feature,
Temperature Threshold commands. The implementation assumes a constant
temperature and will generate an Asynchronous Event Notification if the
specified threshold is above/below this value. Although the
specification allows 9 temperature values, this implementation only
implements the Composite Temperature.

While in the neighborhood, move the clear of the CSTS register in the
reset function after all other cleanup. This avoids a race with the
guest thinking the reset is complete (i.e. CSTS.RDY = 0) before the NVMe
emulation is actually complete with the reset.

Fixes UNH IOL 16.0 Test 1.7, cases 1, 2, and 4.

Tested by: jason@tubnor.net
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D33572

Details

Provenance
chuckAuthored on Jan 30 2022, 7:08 AM
Differential Revision
D33572: bhyve nvme: Add Temperature Threshold support
Parents
rG1381a118297c: bhyve nvme: Fix Set Features
Branches
Unknown
Tags
Unknown