[Skiboot] [PATCH v4] Add purging CPU L2 and L3 caches into NPU hreset.

Stewart Smith stewart at linux.ibm.com
Tue Dec 11 17:28:32 AEDT 2018


Rashmica Gupta <rashmica.g at gmail.com> writes:
> If a GPU is passed through to a guest and the guest unexpectedly terminates,
> there can be cache lines in CPUs that belong to the GPU. So purge the caches
> as part of the reset sequence. L1 is write through, so doesn't need to be purged.
>
> The sequence to purge the L2 and L3 caches from the hw team:
>
> "L2 purge:
>  (1) initiate purge
>  putspy pu.ex EXP.L2.L2MISC.L2CERRS.PRD_PURGE_CMD_TYPE L2CAC_FLUSH -all
>  putspy pu.ex EXP.L2.L2MISC.L2CERRS.PRD_PURGE_CMD_TRIGGER ON -all
>
>  (2) check this is off in all caches to know purge completed
>  getspy pu.ex EXP.L2.L2MISC.L2CERRS.PRD_PURGE_CMD_REG_BUSY -all
>
>  (3) putspy pu.ex EXP.L2.L2MISC.L2CERRS.PRD_PURGE_CMD_TRIGGER OFF -all
>
> L3 purge:
>  1) Start the purge:
>  putspy pu.ex EXP.L3.L3_MISC.L3CERRS.L3_PRD_PURGE_TTYPE FULL_PURGE -all
>  putspy pu.ex EXP.L3.L3_MISC.L3CERRS.L3_PRD_PURGE_REQ ON -all
>
>  2) Ensure that the purge has completed by checking the status bit:
>  getspy pu.ex EXP.L3.L3_MISC.L3CERRS.L3_PRD_PURGE_REQ -all
>
>  You should see it say OFF if it's done:
>  p9n.ex k0:n0:s0:p00:c0
>  EXP.L3.L3_MISC.L3CERRS.L3_PRD_PURGE_REQ
>  OFF"
>
> Suggested-by: Alistair Popple <alistair at popple.id.au>
> Reviewed-by: Alexey Kardashevskiy <aik at ozlabs.ru>
> Signed-off-by: Rashmica Gupta <rashmica.g at gmail.com>

Thanks for the magic review and revisions. Merged to master as of
b2e120fa5b0e5c9b03752d416b183a0361b31cfd.

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list