共用方式為


StorNVMe 命令集支援

本文中的表格列出:

  • NVMe管理命令集的NVM Express規格中定義的命令和操作碼。
  • 所有 I/O 命令 (基本規格)、NVM 命令集的 I/O 命令,以及分區命名空間命令集的 I/O 命令。

表格包含下列資訊:

  • Header Definition – Indicates that an enumeration for the command is defined in the relevant Windows header file.
  • StorNVMe Supported – Indicates that the StorNVMe device driver supports the command on Windows 10 version 1903 and later.
  • 驅動程式內部使用 (驅動程式內部使用) – 表示 StorNVMe 驅動程式可以在內部產生/發出命令。
  • Comments – Any other relevant information; for example, whether the command can be issued as part of an IOCTL operation. 「僅限 WinPE」 表示只有 WinPE 版本的 Windows 才支援命令。

Admin commands

Opcode NVMe 管理命令 Header Definition StorNVMe Supported 驅動程式 int 使用 Comments
0h Delete I/O Submission Queue Yes Yes Yes
1h Create I/O Submission Queue Yes Yes Yes
2h Get Log Page Yes Yes Yes IOCTL_STORAGE_QUERY_PROPERTY
4h Delete I/O Completion Queue Yes Yes Yes
5h Create I/O Completion Queue Yes Yes Yes
6h Identify Yes Yes Yes IOCTL_STORAGE_QUERY_PROPERTY, IOCTL_STORAGE_FIRMWARE_GET_INFO
8h Abort Yes
9h Set Features Yes Yes Yes IOCTL_STORAGE_SET_PROPERTY. 目前僅支援主機控制的熱管理。
Ah Get Features Yes Yes Yes IOCTL_STORAGE_QUERY_PROPERTY
Ch Asynchronous Event Request Yes Yes Yes
Dh Namespace Management Yes Yes WinPE only. IOCTL_STORAGE_PROTOCOL_COMMAND
10h Firmware Commit (以前 Firmware Activate Yes Yes Yes IOCTL_STORAGE_FIRMWARE_ACTIVATE
11h Firmware Image Download Yes Yes Yes IOCTL_STORAGE_FIRMWARE_DOWNLOAD
14h Device Self-Test Yes Yes IOCTL_STORAGE_PROTOCOL_COMMAND
15h Namespace Attachment Yes Yes WinPE only. IOCTL_STORAGE_PROTOCOL_COMMAND
18h Keep Alive
19h Directive Send Yes Yes Yes
1Ah Directive Receive Yes Yes Yes
1Ch Virtualization Management Yes
1Dh NVMe-MI Send Yes Yes WinPE only. IOCTL_STORAGE_PROTOCOL_COMMAND
1Eh NVMe-MI Receive Yes Yes WinPE only. IOCTL_STORAGE_PROTOCOL_COMMAND
20h Capacity Management
24h Lockdown
7Ch Doorbell Buffer Config Yes
7Fh Fabric Commands
80h Format NVM Yes Yes Yes IOCTL_STORAGE_PROTOCOL_COMMAND for WinPE only. IOCTL_SCSI_PASS_THROUGH for SCSIOP_SANITIZE. IOCTL_STORAGE_REINITIALIZE_MEDIA for crypto erase only.
81h Security Send Yes Yes Yes IOCTL_SCSI_PASS_THROUGH for SCSIOP_SECURITY_PROTOCOL_OUT
82h Security Receive Yes Yes Yes IOCTL_SCSI_PASS_THROUGH for SCSIOP_SECURITY_PROTOCOL_IN
84h Sanitize Yes Yes Yes IOCTL_STORAGE_PROTOCOL_COMMAND. 從 Windows 10 版本 2004 / 2020 年 5 月更新、Windows Server 版本 2004 (Server Core) 開始。 WinPE 僅限在 Windows 11、Windows Server 2022 之前,且只有在使用者使用 IOCTL_STORAGE_PROTOCOL_COMMAND 時。
86h Get LBA Status Yes 從 Windows 11、Windows Server 2022 開始
C0h-FFh Vendor Specific N/A Yes IOCTL_STORAGE_PROTOCOL_COMMAND. 廠商特定的傳遞命令需要在每個廠商特定命令操作碼的相應命令支援和效果日誌頁面中輸入 CSUPP=1。

I/O commands

下表包含NVM Express I/O命令的下列資訊:

  • NVMe Spec: indicates the NVM Express specification that defines the I/O command:
    • A = 所有 I/O 命令集,NVM Express 基本規範 2.0a,2021 年 7 月 23 日
    • N = NVM 命令集,NVM Express NVM 命令集規範 1.0a,2021 年 7 月 23 日
    • Z = 分區命名空間命令集 I/O 命令,分區命名空間命令集規格 1.1a,2021 年 7 月 23 日
Opcode NVMe I/O 命令 Header Definition StorNVMe Supported 驅動程式 int 使用 NVMe Spec Comments
0h Flush Yes Yes Yes A,N,Z SCSIOP_SYNCHRONIZE_CACHE for IOCTL_SCSI_PASS_THROUGH
1h Write Yes Yes Yes N,Z SCSIOP_WRITE/SCSIOP_WRITE16 for IOCTL_SCSI_PASS_THROUGH
2h Read Yes Yes Yes N,Z SCSIOP_READ/SCSIOP_READ16 for IOCTL_SCSI_PASS_THROUGH
4h Write Uncorrectable Yes N,Z
5h Compare Yes Yes N,Z WinPE only. IOCTL_STORAGE_PROTOCOL_COMMAND
8h Write Zeroes Yes N,Z
9h Dataset Management Yes Yes N,Z 只有 TRIM (解除配置)。 SCSIOP_UNMAP for IOCTL_SCSI_PASS_THROUGH
Ch Verify Yes N,Z
Dh Reservation Register Yes A,N,Z 從 Windows 11、Windows Server 2022 開始。
Eh Reservation Report Yes A,N,Z 從 Windows 11、Windows Server 2022 開始。
11h Reservation Acquire Yes A,N,Z 從 Windows 11、Windows Server 2022 開始。
15h Reservation Release Yes A,N,Z 從 Windows 11、Windows Server 2022 開始。
19h Copy Yes N,Z 從 Windows 11、Windows Server 2022 開始。 保留供Microsoft內部使用。
79h Zone Management Send Yes Yes Z 從 Windows 11、Windows Server 2022 開始。 保留供Microsoft內部使用。
7Ah Zone Management Receive Yes Yes Z 從 Windows 11、Windows Server 2022 開始。 保留供Microsoft內部使用。
7Dh Zone Append Yes Yes Z 從 Windows 11、Windows Server 2022 開始。 保留供Microsoft內部使用。
80h-FFh Vendor Specific N/A Yes A,N,Z IOCTL_STORAGE_PROTOCOL_COMMAND. 廠商特定的傳遞命令需要在每個廠商特定命令操作碼的相應命令支援和效果日誌頁面中輸入 CSUPP=1。

可能會發生變化。 如需相關資訊,請參閱 使用 NVMe 磁碟機