Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178161611
D62239.1796156421.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D62239.1796156421.diff
View Options
diff --git a/usr.sbin/bhyve/pci_nvme.c b/usr.sbin/bhyve/pci_nvme.c
--- a/usr.sbin/bhyve/pci_nvme.c
+++ b/usr.sbin/bhyve/pci_nvme.c
@@ -134,6 +134,8 @@
/* Reported temperature in Kelvin (i.e. room temperature) */
#define NVME_TEMPERATURE 296
+/* Over Temperature Threshold reported until the guest sets one (343 K, 70 C) */
+#define NVME_TEMPERATURE_THRESHOLD_OVER 343
/* helpers */
@@ -439,6 +441,10 @@
struct nvme_feature_obj *,
struct nvme_command *,
struct nvme_completion *);
+static void nvme_feature_int_coalescing(struct pci_nvme_softc *,
+ struct nvme_feature_obj *,
+ struct nvme_command *,
+ struct nvme_completion *);
static void nvme_feature_temperature(struct pci_nvme_softc *,
struct nvme_feature_obj *,
struct nvme_command *,
@@ -704,15 +710,18 @@
switch (fid) {
case NVME_FEAT_ARBITRATION:
case NVME_FEAT_POWER_MANAGEMENT:
- case NVME_FEAT_INTERRUPT_COALESCING: //XXX
case NVME_FEAT_WRITE_ATOMICITY:
/* Mandatory but no special handling required */
//XXX hang - case NVME_FEAT_PREDICTABLE_LATENCY_MODE_CONFIG:
//XXX hang - case NVME_FEAT_HOST_BEHAVIOR_SUPPORT:
// this returns a data buffer
break;
+ case NVME_FEAT_INTERRUPT_COALESCING:
+ sc->feat[fid].set = nvme_feature_int_coalescing;
+ break;
case NVME_FEAT_TEMPERATURE_THRESHOLD:
sc->feat[fid].set = nvme_feature_temperature;
+ sc->feat[fid].cdw11 = NVME_TEMPERATURE_THRESHOLD_OVER;
break;
case NVME_FEAT_ERROR_RECOVERY:
sc->feat[fid].namespace_specific = true;
@@ -1731,6 +1740,18 @@
pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD);
}
+/*
+ * Interrupt coalescing is advisory: accept and keep the setting (Get Features
+ * returns it) but post completions without delay.
+ */
+static void
+nvme_feature_int_coalescing(struct pci_nvme_softc *sc __unused,
+ struct nvme_feature_obj *feat __unused,
+ struct nvme_command *command __unused,
+ struct nvme_completion *compl __unused)
+{
+}
+
#define NVME_TEMP_THRESH_OVER 0
#define NVME_TEMP_THRESH_UNDER 1
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 1, 8:20 PM (23 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42129666
Default Alt Text
D62239.1796156421.diff (2 KB)
Attached To
Mode
D62239: bhyve: nvme: report a temperature threshold, accept interrupt coalescing
Attached
Detach File
Event Timeline