x86/sev: Register tpm-svsm platform device
authorStefano Garzarella <sgarzare@redhat.com>
Thu, 10 Apr 2025 13:51:16 +0000 (15:51 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 10 Apr 2025 14:25:33 +0000 (16:25 +0200)
commite396dd85172c6098e3b70b17e91424edc7bb2d8f
tree1b2a9a51f71eafd38661c803498393e56d638109
parent93b7c6b3ce918c3d24de82dcff7a87b8bd631b2e
x86/sev: Register tpm-svsm platform device

SNP platform can provide a vTPM device emulated by SVSM.

The "tpm-svsm" device can be handled by the platform driver registered by the
x86/sev core code.

Register the platform device only when SVSM is available and it supports vTPM
commands as checked by snp_svsm_vtpm_probe().

  [ bp: Massage commit message. ]

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Link: https://lore.kernel.org/r/20250410135118.133240-5-sgarzare@redhat.com
arch/x86/coco/sev/core.c