]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bhyve nvme: Add Temperature Threshold support
authorChuck Tuffli <chuck@FreeBSD.org>
Sun, 30 Jan 2022 07:08:47 +0000 (23:08 -0800)
committerChuck Tuffli <chuck@FreeBSD.org>
Tue, 22 Feb 2022 03:26:45 +0000 (19:26 -0800)
commit0bb86659cbcabcd8ec7d1a7eecefa6be2192c84d
treebefdf702cb85c940d54501d8c36993705dcd1cd5
parent6e5e38c241e618007ae7edb0d26b704b68851dd6
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.

(cherry picked from commit ea9ee35583a8faec1ec3d2f8df550baefc2b86b5)
usr.sbin/bhyve/pci_nvme.c