教學 1 · Shared資料不是每台各有一份
兩台 controller 附加同一 shared namespace,是兩個入口通往同一份資料。某台 reset 不必然讓另一台失去存取,但 Host 仍需協調同時寫入。判斷路徑差異時,先看 attachment 與 ANA,不要把另一台讀到不同時間的資料直接解釋為有兩份獨立副本。
NVMe · Q1–328
Q246–Q255
多路徑、shared namespace 與虛擬化是不同關係。本冊先畫 controller 拓樸,再加入 attachment、ANA 及可分配 queue/interrupt 資源。
每個問題都接著完整解說,依內容帶讀欄位、比較機制或追蹤流程。先看本冊總覽,再沿問題閱讀;必要條件與正常路徑直接顯示。所有數字案例均為教學假設;Status 以 SCT/SC 表示,代碼後的 h 代表十六進位。
Online、Enabled 與 namespace 可存取不是同一件事。
| 狀態 | 查詢 | 用途 |
|---|---|---|
| 管理角色 | Primary Capabilities、Secondary List | 誰可管理誰的資源 |
| 可啟用性 | Secondary state、VQ/VI | 是否具備 Online 前提 |
| 命令介面 | CC、CSTS | controller 是否已啟用 |
| namespace 路徑 | Active List、ANA | 目前可否經此路徑存取 |
舉例看懂:Secondary Online 之後仍需 Host 初始化並 Enable;把 Online 直接當 RDY=1,會跳過必要步驟。
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §2.4.2, 8.1.1 (PCIe namespace access) · Base 2.4 §5.2.13.1.13
兩台 controller 附加同一 shared namespace,是兩個入口通往同一份資料。某台 reset 不必然讓另一台失去存取,但 Host 仍需協調同時寫入。判斷路徑差異時,先看 attachment 與 ANA,不要把另一台讀到不同時間的資料直接解釋為有兩份獨立副本。
VQ 描述一組 SQ/CQ 資源,VI 描述 interrupt vector。資源不能同時屬於兩台 controller;secondary 在 Offline 時才能進行相關配置。常見順序是 Offline、分配資源、適當 CLR、Online,再由 Host 啟用。每一步完成後讀回狀態,才能定位是資源不足還是順序不合法。
Secondary 進入 Offline 也會設定 CFS,所以先查角色與管理狀態。若 primary 被 disable、reset 或 shutdown,相關 secondary 也會受影響。只看 CFS 就立即判硬體故障,會忽略這種由合法管理流程造成的狀態。
Controller 是命令入口,namespace 是儲存物件;虛擬化把部分 queue 與 interrupt 資源交由 primary 管理分配。
一個 subsystem 可有多個 primary,各有 secondary 群組;secondary 與其 primary 必須在同一 domain。
VQ 管一組 SQ/CQ,VI 管一個 interrupt vector;Private Resources 固定歸屬,Flexible Resources 可受管理重新分配。
查 OACS.VMS、Primary Controller Capabilities 與 Secondary Controller List,不憑 PCI function 編號猜 parent。
先畫出 primary→secondary 關係,再標每個 controller 的可用資源與 attached namespaces,最後才規劃 queues。
每個 Online 且啟用的 secondary 仍是完整 NVMe controller,Host 可用正常 NVMe 命令操作。
不支援 Virtualization Management 的 controller 不能被要求接受資源管理命令;管理命令需送到對應 primary。
PCIe PF/VF 與 NVMe primary/secondary 在支援兩者時相對應,但不能把所有多 controller 裝置都假定有 SR-IOV。
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
Attach 建立存取路徑,不是複製 namespace 資料。Private/Shared 決定能否同時附加到多個 controller。
Private 同時只附加一台,Shared 可附加多台,但仍受命令集、資源與數量限制。
查 namespace.NMIC、相關 controller 能力與已附加 Controller List。
Namespace Attachment 以 NSID 指目標,SEL 指 Attach/Detach,資料 buffer 列出 CNTLID。
先確認目標已配置與分享能力,再 Attach 所選 controller,讀各台 Active List 驗證。
Shared 的多個入口看到同一份資料;Private 已有一個入口時,不能再同時增加另一個。
Private 已附加其他 controller 時,可對應 Namespace Is Private;重複附加同一台則是 Namespace Already Attached。
用每台 Active List 與 namespace Controller List 雙向核對,避免只看一條路徑。
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
這份清單回答 namespace 已附加在哪些 controller,與列出 subsystem 全部 controller 的清單不同。
查詢以指定 namespace 為範圍;同一 subsystem 中未附加的 controller 不應被誤算為可用路徑。
使用 Identify 的 Attached Controller List 選擇,核對 CNS、NSID 與起始 Controller Identifier。
回覆有數量及 Controller Identifier entries;分段時遵守起始 ID 的包含規則,不套用 Active Namespace List 的不同條件。
讀第一段,依最後 ID 推進下一次起點直到讀完,並留意期間 attachment 可能改變。
取得當時 attached controllers,再逐台確認 Online、Ready 與 ANA,才知道哪條路徑現在能用。
NSID 或 CNS 不合法依 Identify 規則回應;一份空清單不代表 namespace 一定已刪除。
與各台 Active Namespace List 交叉確認,必要時在管理操作完成後重讀,避免比較不同時點。
先確認使用的是 attached list,還是 subsystem controller inventory。
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
Shared namespace 提供多條路徑,但不能保證任何故障都完全不影響其他路徑。
一般 CLR 針對一台;primary 重設可使其 secondary Offline,共用媒體或 domain 問題也可能擴大影響。
其他 controller 的獨立 queues 可繼續有效;但資料命令是否可執行仍受 namespace Ready、ANA 與存取限制。
查 parent 關係、domain、attachment、ANA 及其他路徑 Ready 狀態。
停止失效路徑新提交,確認替代路徑可用,再處理原路徑未完成命令與新命令的相依性。
在其他路徑與共享資源都正常時,可以繼續存取同一資料,不需要再建立一份 namespace。
不能因路徑切換成功,就假定舊路徑的 Write 全部未執行;重試可能與原操作效果重疊。
以控制關係與命令結果判斷影響,避免「一台 Reset 一定不影響其他台」的過度概括。
來源:Base 2.4 §2.4.2, 8.1.1 (PCIe namespace access) · Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
來源:Base 2.4 §2.4.2, 8.1.1 (PCIe namespace access) · Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
Reset 名稱包含 subsystem,但多 domain 裝置仍可能只重設一個 domain,必須確認實作範圍。
單 domain 涵蓋全部;multi-domain 依實作涵蓋發起所在 domain,或全部 domains。
NSSR.NSSRC=4E564D65h 是受支援時的觸發方式;受影響範圍會 CLR 各 controller,並停用其 PMR。
查 domain 拓樸、CAP.NSSRS 與重設後 CSTS.NSSRO。
先停止範圍內工作,觸發 Reset,逐台確認重新初始化與路徑恢復。
受影響 queues 必須重建;範圍外 controller 是否可用仍由其自身與共享媒體狀態決定。
Register Reset 沒有一筆可指定 DNR/More 的 CQE;不能等待虛構的 Reset Command Completion。
把實際受影響 controller 清單與 domain 配置比較,而不只觀察發起端。
NSSR Register 寫入沒有 CQE,因此 DNR 與 More 不適用;恢復後查詢命令的 CQE 是另一筆命令的結果。
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
管理操作可能由一條路徑發起,其他 Host 仍需要更新自己的 namespace 視圖。
通知依受影響的 attached namespace 與 controller 觀察範圍,不是每台都無條件收到同一個通知。
查 AEC.NAN、待處理 AER、Changed Namespace List 與各台 Active List;ANA 變更另外查其通知設定。
Attached Namespace Attribute Changed 提醒 Host 重查,Changed Namespace List 提供需重查的 NSID;清單溢位以 FFFFFFFFh 表示需全面重查。
操作完成後處理通知、讀清單並更新 Identify;讀取確認與遮蔽規則影響後續同類通知。
其他受影響 controller 的視圖與新配置一致;不要求每次改動一筆對一筆保留無限通知。
Admin Namespace Delete 的處理 controller 有通知排除規則,不能要求它因自己的刪除再收到相同通知。
Namespace attribute notice 與 ANA change notice 描述不同變化,不能拿其中一份 Log 取代另一份。
來源:Base 2.4 §5.2.13.1.5 · Base 2.4 §5.2.2 (PCIe-applicable events) · Base 2.4 §5.2.13.1.13 · Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
來源:Base 2.4 §5.2.13.1.5 · Base 2.4 §5.2.2 (PCIe-applicable events) · Base 2.4 §5.2.13.1.13 · Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
相同 namespace 經不同 controller 存取,可能有不同效能或可用性;非對稱行為不只出現在網路傳輸。
ANA 狀態描述 controller 與 ANA Group 的關係;不是 namespace 永久只有一個全域狀態。
查 CMIC.ANARS、ANACAP、ANATT、namespace.ANAGRPID 與 LID0Ch。
Optimized/Non-Optimized 都可正常執行支援命令;Inaccessible、Persistent Loss 與 Change 對資料存取有不同限制與恢復建議。
先找可用路徑,再優先考慮 Optimized;遇到通知重新讀 ANA,不能永久把某 controller 寫死為最佳路徑。
Non-Optimized 可能較慢但不是錯誤;另一條路徑可對同一群組回不同狀態。
受限制狀態對非例外命令分別回 Asymmetric Access Inaccessible、Persistent Loss 或 Transition;不是所有 Admin 命令都被一律禁止。
僅量到效能不同,不能反推必定支援 ANA Reporting;應先確認宣告再用 Log 解釋。
先確認 ANAGRPID 對應的 controller 視圖,而不是讀錯路徑的 Log。
來源:Base 2.4 §2.4.2, 8.1.1 (PCIe namespace access) · Base 2.4 §5.2.13.1.13 · Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
來源:Base 2.4 §2.4.2, 8.1.1 (PCIe namespace access) · Base 2.4 §5.2.13.1.13 · Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
Online 代表資源與狀態允許 Host 使用,還不等於 CC.EN/RDY 已經完成啟用。
由 associated primary 管理該 secondary;Offline 時 CSTS.CFS=1,其他 controller properties undefined。
查 Secondary List.SCS、NVQ、NVI 與 primary 是否已 enabled。
Virtualization Management ACT=7 Offline、8 Assign、9 Online;Offline 會移除 Flexible Resources。
建議先 Offline,再配置 VQ/VI,做 CLR;若為 VF 建議 VF FLR,再 Online,最後執行 NVMe enable 與 queue 初始化。
支援 VQ 時至少 2 組,包含 Admin 與至少 1 組 I/O;支援 VI 時至少 vector0 的資源,才可 Online。
未 Offline 就 Assign,或資源不足/primary 未 enabled 卻要求 Online,回 Invalid Secondary Controller State;重複相同 Online/Offline 不是錯誤。
把 SCS 與 CC.EN/CSTS.RDY 分開驗證,避免把 Offline 的 CFS 當成一定發生未知硬體故障。
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
Flexible Resource pool 可在 primary 與它的 secondary 間分配,但不是動態擴充實體總資源。
VQ 與 VI 分開計數;Private Resources 不可用此命令重新指派。
查 CRT、總量、已分配量、secondary 最大值與 preferred granularity。
CDW10.CNTLID/RT/ACT 選目標、種類與動作,CDW11.NR 指要求數量;CQE.DW0.NRM 是實際修改數量。
secondary 先 Offline,再 Assign;要釋放 Online secondary 的 Flexible Resources,可將其 Offline。Primary 新配置則等指定類型的 CLR 才生效。
NRM 可比 NR 小或大,須讀回能力與清單確認,不能把 requested count 當成實際值。
超出總量或每台上限對應 Invalid Number of Controller Resources;不存在、Private 或已被使用的資源範圍對應 Invalid Resource Identifier。
將所有配置加總與 pool 比較;相同 resource 不能同時屬兩台,preferred granularity 也不能直接當成任意硬性拒絕規則。
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
Primary 的持久配置與 secondary 的即時資源指派有不同生命週期,必須分開保存與驗證。
除了被重設的 controller,也要檢查依賴該 primary 的 secondary 群組。
保存 Primary Capabilities、Secondary List、重設來源與 PCIe function 關係。
Primary Flexible Allocation 是持久設定,新值在非 Controller Reset 的 CLR 後生效;僅清 CC.EN 不符合這個生效條件。
Primary 恢復後重新查 secondary 狀態,依 Offline→Assign→適當 CLR→Online→Enable 重建使用環境。
可保留的 allocation 設定正確恢復,secondary 重新取得適足資源,新的 queues 才有效。
| 觸發方式 | 這項操作或狀態會如何變化 |
|---|---|
| Controller Reset 後是否保留或繼續? | Primary 被 Disable、CLR 或 Shutdown 時,其 secondary 必須轉 Offline;Online 轉 Offline 會移除 Flexible Resources。Primary 的 Flexible Allocation 設定可持續,但新配置需由非 CC.EN Controller Reset 的 CLR 生效。 |
| NVM Subsystem Reset 後是否保留或繼續? | Subsystem Reset 影響範圍內的 primary/secondary 操作環境須重建。不要把持續的 primary allocation 設定,誤當成 secondary 仍 Online 或原 queues 仍存在。 |
| Power Cycle 後是否保留或繼續? | Primary Flexible Allocation 跨 Power Cycle 保留;secondary 的 Online 狀態與資源需重新查詢及配置。Namespace 與 attachment 的持續性是另一項規則,不因 secondary Offline 就刪除。 |
不能因 primary allocation 還在,就要求 secondary 原 I/O queues 或原 Online 狀態一併保留。
Namespace attachment 可持續存在,即使 secondary 暫時 Offline;不應因此重複 Create Namespace。
先檢查 Reset 是否使 primary Disable,連帶造成 secondary Offline 與資源移除。
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
來源:Base 2.4 §2.4.1–2.4.2 (PCIe topology) · Base 2.4 §8.2.7 · Base 2.4 §5.3.6 · Base 2.4 §5.2.14.3.1–5.2.14.3.2 (Primary Capabilities, Secondary List) · Base 2.4 §5.2.24–5.2.25, 8.1.17–8.1.17.2 · Base 2.4 §5.2.14.2.2–5.2.14.2.19, 5.2.14.3.1–5.2.14.3.2 · Base 2.4 §3.7.1–3.7.4 · Base 2.4 §4.2.3 · Base 2.4 §5.2.13.1.2 · Base 2.4 §5.2.2 · Base 2.4 §5.2.13.1.14 (header, reset, hardware, Set Feature events)
Base 的文件頁碼等於 PDF 頁碼減 26;NVM 與 PCIe 兩份規格的文件頁碼則與 PDF 頁碼相同。以下依提供的 PDF 本文列出章節、頁碼及 Figure 編號。若同一頁包含其他主題,只引用本題需要的定義,不納入 Fabrics 或 PCIe Link、封包內容。
以下連結可開啟對應的圖表教學,查閱欄位及判讀方式。每張圖保留固定的教學位置,方便之後反覆查詢。
NVM-Express-Base-Specification-Revision-2.4-Ratified-2026.07.31.pdfNVM-Express-NVM-Command-Set-Specification-Revision-1.3-Ratified-2026.07.31.pdfNVM-Express-NVMe-over-PCIe-Transport-Specification-Revision-1.4-Ratified-2026.07.31.pdf