]> Gentwo Git Trees - linux/.git/commit
virt: sev-guest: Choose the VMPCK key based on executing VMPL
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 5 Jun 2024 15:18:51 +0000 (10:18 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 17 Jun 2024 18:42:57 +0000 (20:42 +0200)
commiteb65f96cb332d577b490ab9c9f5f8de8c0316076
treef932d135f9ed2a9d52de8f38610bb6a570c4e839
parent61564d346809aa84729e651b98032592a7d63d3e
virt: sev-guest: Choose the VMPCK key based on executing VMPL

Currently, the sev-guest driver uses the vmpck-0 key by default. When an
SVSM is present, the kernel is running at a VMPL other than 0 and the
vmpck-0 key is no longer available. If a specific vmpck key has not be
requested by the user via the vmpck_id module parameter, choose the
vmpck key based on the active VMPL level.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/b88081c5d88263176849df8ea93e90a404619cab.1717600736.git.thomas.lendacky@amd.com
Documentation/virt/coco/sev-guest.rst
arch/x86/include/asm/sev.h
arch/x86/kernel/sev-shared.c
drivers/virt/coco/sev-guest/sev-guest.c