• Tom Lendacky's avatar
    x86/sev: Provide SVSM discovery support · 1beb348d
    Tom Lendacky authored
    The SVSM specification documents an alternative method of discovery for
    the SVSM using a reserved CPUID bit and a reserved MSR. This is intended
    for guest components that do not have access to the secrets page in
    order to be able to call the SVSM (e.g. UEFI runtime services).
    
    For the MSR support, a new reserved MSR 0xc001f000 has been defined. A #VC
    should be generated when accessing this MSR. The #VC handler is expected
    to ignore writes to this MSR and return the physical calling area address
    (CAA) on reads of this MSR.
    
    While the CPUID leaf is updated, allowing the creation of a CPU feature,
    the code will continue to use the VMPL level as an indication of the
    presence of an SVSM. This is because the SVSM can be called well before
    the CPU feature is in place and a non-zero VMPL requires that an SVSM be
    present.
    Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
    Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
    Link: https://lore.kernel.org/r/4f93f10a2ff3e9f368fd64a5920d51bf38d0c19e.1717600736.git.thomas.lendacky@amd.com
    1beb348d
cpufeatures.h 34.2 KB