Skip to content

Fixes for PMF and CCP drivers after S4

Mario Limonciello (AMD) linux-crypto platform-driver-x86 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest5 patches 9 repliesIn review
  2. v55 patches 3 repliesSuperseded
  3. v45 patches 4 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v35 patches5 repliesSuperseded
v24 patches4 repliesSuperseded
v12 patches0 repliesSuperseded

Changes in v6 from the cover letter

* Fix Tom's feedback on patch 3/5

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5platform/x86/amd/pmf: Prevent TEE errors after hibernatedrivers/platform/x86/amd/pmf/core.c drivers/platform/x86/amd/pmf/pmf.h drivers/platform/x86/amd/pmf/tee-if.c+74 -100 replies
2/5crypto: ccp - Declare PSP dead if PSP_CMD_TEE_RING_INIT failsdrivers/crypto/ccp/tee-dev.c+1 -02 replies
3/5crypto: ccp - Add an S4 restore flowdrivers/crypto/ccp/psp-dev.c drivers/crypto/ccp/sp-dev.c drivers/crypto/ccp/sp-dev.h +3 more+47 -12 replies
4/5crypto: ccp - Factor out ring destroy handling to a helperdrivers/crypto/ccp/tee-dev.c+24 -122 replies
5/5crypto: ccp - Send PSP_CMD_TEE_RING_DESTROY when PSP_CMD_TEE_RING_INIT failsdrivers/crypto/ccp/tee-dev.c include/linux/psp.h+15 -02 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchYijun ShenShyam Sundar S KTom Lendacky
1/5T-b
2/5T-b R-b A-b
3/5T-b R-b R-b
4/5T-b R-b A-b
5/5T-b R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/5] Fixes for PMF and CCP drivers after S4

Lars Francke reported that the PMF driver fails to work afer S4 with:
ccp 0000:c3:00.2: tee: command 0x5 timed out, disabling PSP

This is because there is a TA loaded to the TEE environment that is lost during S4. The TEE rings need to be reinitialized and the TA needs to be reloaded.

This series adds those flows to the PMF and CCP drivers.

v5->v6:
* Fix Tom's feedback on patch 3/5

Mario Limonciello (AMD) (4):
crypto: ccp - Declare PSP dead if PSP_CMD_TEE_RING_INIT fails
crypto: ccp - Add an S4 restore flow
crypto: ccp - Factor out ring destroy handling to a helper
crypto: ccp - Send PSP_CMD_TEE_RING_DESTROY when PSP_CMD_TEE_RING_INIT
fails

Shyam Sundar S K (1):
platform/x86/amd/pmf: Prevent TEE errors after hibernate

 drivers/crypto/ccp/psp-dev.c          | 11 +++++
 drivers/crypto/ccp/sp-dev.c           | 12 ++++++
 drivers/crypto/ccp/sp-dev.h           |  3 ++
 drivers/crypto/ccp/sp-pci.c           | 16 ++++++-
 drivers/crypto/ccp/tee-dev.c          | 56 ++++++++++++++++++------
 drivers/crypto/ccp/tee-dev.h          |  1 +
 drivers/platform/x86/amd/pmf/core.c   | 62 ++++++++++++++++++++++++++-
 drivers/platform/x86/amd/pmf/pmf.h    | 10 +++++
 drivers/platform/x86/amd/pmf/tee-if.c | 12 ++----
 include/linux/psp.h                   |  1 +
 10 files changed, 161 insertions(+), 23 deletions(-)
Signature · 1 line
2.43.0