diff --git a/lib/nvme/nvme_ctrlr.c b/lib/nvme/nvme_ctrlr.c index 3386dc494a..09f1ac8bc9 100644 --- a/lib/nvme/nvme_ctrlr.c +++ b/lib/nvme/nvme_ctrlr.c @@ -403,7 +403,7 @@ nvme_ctrlr_set_supported_log_pages(struct spdk_nvme_ctrlr *ctrlr) if (ctrlr->cdata.lpa.celp) { ctrlr->log_page_supported[SPDK_NVME_LOG_COMMAND_EFFECTS_LOG] = true; } - if (ctrlr->cdata.vid == SPDK_PCI_VID_INTEL) { + if (ctrlr->cdata.vid == SPDK_PCI_VID_INTEL && !(ctrlr->quirks & NVME_INTEL_QUIRK_NO_LOG_PAGES)) { nvme_ctrlr_set_intel_support_log_pages(ctrlr); } } diff --git a/lib/nvme/nvme_internal.h b/lib/nvme/nvme_internal.h index aca8d716d7..5dfa772de0 100644 --- a/lib/nvme/nvme_internal.h +++ b/lib/nvme/nvme_internal.h @@ -107,6 +107,13 @@ extern pid_t g_spdk_nvme_pid; */ #define NVME_QUIRK_OCSSD 0x80 +/* + * The controller has an Intel vendor ID but does not support Intel vendor-specific + * log pages. This is primarily for QEMU emulated SSDs which report an Intel vendor + * ID but do not support these log pages. + */ +#define NVME_INTEL_QUIRK_NO_LOG_PAGES 0x100 + #define NVME_MAX_ASYNC_EVENTS (8) #define NVME_MIN_TIMEOUT_PERIOD (5) diff --git a/lib/nvme/nvme_quirks.c b/lib/nvme/nvme_quirks.c index 73dc76442c..9a213b12da 100644 --- a/lib/nvme/nvme_quirks.c +++ b/lib/nvme/nvme_quirks.c @@ -76,7 +76,8 @@ static const struct nvme_quirk nvme_quirks[] = { NVME_QUIRK_DELAY_AFTER_QUEUE_ALLOC }, { {SPDK_PCI_VID_INTEL, 0x5845, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID}, - NVME_QUIRK_IDENTIFY_CNS + NVME_QUIRK_IDENTIFY_CNS | + NVME_INTEL_QUIRK_NO_LOG_PAGES }, { {SPDK_PCI_VID_CNEXLABS, 0x1f1f, SPDK_PCI_ANY_ID, SPDK_PCI_ANY_ID}, NVME_QUIRK_IDENTIFY_CNS |