Re: [RFC v5 13/28] hw/arm/smmuv3: Pass sec_sid into cmdq consume path
Jim MacArthur <[email protected]>
| Newsgroups | org.nongnu.qemu-arm,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Aug 14, 2026 at 12:25:10AM +0800, Tao Tang wrote: > Make smmuv3_cmdq_consume() security-state aware by passing sec_sid > from smmu_writel() call sites (CR0/GERRORN/CMDQ_PROD paths), instead > of hardcoding non-secure state. The related AddressSpace and MemTxAttrs > are also obtained based on sec_sid. > > Also move CMD_SSEC legality checking to a single early check before > command dispatch: secure commands are rejected on non-secure queues > (including future Realm queue) with CERROR_ILL. This removes duplicated > per-command checks in CFGI handlers. > > Finally, extend cmdq trace output with sec_sid so command processing > can be correlated with the correct security bank. > > Signed-off-by: Tao Tang <[email protected]> > Reviewed-by: Eric Auger <[email protected]> > Reviewed-by: Pierrick Bouvier <[email protected]> > --- > hw/arm/smmuv3.c | 47 +++++++++++++++++++++------------------------ > hw/arm/trace-events | 2 +- > 2 files changed, 23 insertions(+), 26 deletions(-) > Reviewed-by: Jim MacArthur <[email protected]>