On a many-core SoC, one noisy neighbor can wreck another workload’s latency through the shared L3 and memory controllers. Ssqosid gives the OS a handle: two identifiers, riding on every request the hart issues, that downstream resource controllers use to enforce allocations and meter usage (the controller-side programming model is the separate CBQRI spec).
srmcfg (0x181) — layout reconstructed (Figures 45/46 are missing from the PDF; field positions per the Ssqosid spec)
The IDs apply to all privilege modes by default — M-mode firmware runs under the same tags unless it swaps them. On context switch the kernel may deliberately run the switch path under the outgoing task’s srmcfg (attributing the cost to it), loading the new task’s IDs last. Requests may carry extra metadata (access type, supervisor domain) for finer policies.
Gating follows the Smstateen pattern:
mstateen0.SRMCFG=0 → illegal-instruction below M;
V=1 access → virtual-instruction always, so hypervisors emulate
srmcfg for guests rather than sharing the physical tags. Notably,
Ssqosid doesn’t even require S-mode.
Hardware Designer Notes
The hart-side cost is trivial — one CSR plus request-bus sideband wires. The real engineering lives in the resource controllers (CBQRI): way-masking or capacity-based cache partitioning and bandwidth throttling keyed by RCID, counter arrays keyed by MCID.
Minimal Linux-boot hart MUST
- Carry RCID/MCID on every outbound request of the hart — loads, stores, fetches, prefetches, page-table walks — through whatever interconnect metadata channel you have
- Trap srmcfg accesses per the stateen/virtual-instruction rules (mstateen0.SRMCFG, unconditional V=1 trap)
MAY simplify / trap-and-emulate
- Size RCID/MCID however the platform needs — both are WARL; unimplemented high bits read zero
- Skip Ssqosid entirely for a Linux-boot core: it only pays off once you have contended shared caches/memory controllers worth partitioning
Check yourself — QoS identifiers
1.Why does srmcfg carry TWO identifiers (RCID and MCID) instead of one?
2.Which privilege levels do the srmcfg IDs tag by default?