linux/arch/x86/coco
Melody Wang 6c43c72748 x86/sev: Make vTPM SVSM calls preemption-safe
Two functions in the SVSM vTPM guest implementation do not disable
preemption when fetching the SVSM Calling Area Address (CAA).

The SVSM CAA is a per-CPU structure. When a thread is preempted and migrated
to a different CPU after fetching the per-CPU CAA, the SVSM call will execute
on the new CPU with the original CPU's CAA. Which is wrong.

Move the CAA fetching operation inside svsm_perform_call_protocol() which
disables interrupts around the SVSM call and thus runs preemption-safe.

Fixes: 770de678bc ("x86/sev: Add SVSM vTPM probe/send_command functions")
Signed-off-by: Melody Wang <huibo.wang@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/a5bc0d4a2c462a0089109e145c21626b244b2ff0.1789345277.git.huibo.wang@amd.com
History 2026-09-21 19:59:25 -07:00
..
sev x86/sev: Make vTPM SVSM calls preemption-safe 2026-09-21 19:59:25 -07:00
tdx x86/tdx: Fix zero-extension for 32-bit port I/O 2026-07-13 14:45:07 -07:00
core.c x86/apic: Add new driver for Secure AVIC 2025-08-28 17:57:19 +02:00
Makefile x86/sev: Move SEV compilation units 2024-07-11 11:55:58 +02:00