8c29f01654
The hypervisor can enable various new features (SEV_FEATURES[1:63]) and start a
SNP guest. Some of these features need guest side implementation. If any of
these features are enabled without it, the behavior of the SNP guest will be
undefined. It may fail booting in a non-obvious way making it difficult to
debug.
Instead of allowing the guest to continue and have it fail randomly later,
detect this early and fail gracefully.
The SEV_STATUS MSR indicates features which the hypervisor has enabled. While
booting, SNP guests should ascertain that all the enabled features have guest
side implementation. In case a feature is not implemented in the guest, the
guest terminates booting with GHCB protocol Non-Automatic Exit(NAE) termination
request event, see "SEV-ES Guest-Hypervisor Communication Block Standardization"
document (currently at https://developer.amd.com/wp-content/resources/56421.pdf),
section "Termination Request".
Populate SW_EXITINFO2 with mask of unsupported features that the hypervisor can
easily report to the user.
More details in the AMD64 APM Vol 2, Section "SEV_STATUS MSR".
[ bp:
- Massage.
- Move snp_check_features() call to C code.
Note: the CC:stable@ aspect here is to be able to protect older, stable
kernels when running on newer hypervisors. Or not "running" but fail
reliably and in a well-defined manner instead of randomly. ]
Fixes:
|
||
---|---|---|
.. | ||
i386 | ||
x86_64 | ||
amd-memory-encryption.rst | ||
amd_hsmp.rst | ||
boot.rst | ||
booting-dt.rst | ||
buslock.rst | ||
cpuinfo.rst | ||
earlyprintk.rst | ||
elf_auxvec.rst | ||
entry_64.rst | ||
exception-tables.rst | ||
features.rst | ||
ifs.rst | ||
index.rst | ||
intel-hfi.rst | ||
intel_txt.rst | ||
iommu.rst | ||
kernel-stacks.rst | ||
mds.rst | ||
microcode.rst | ||
mtrr.rst | ||
orc-unwinder.rst | ||
pat.rst | ||
pti.rst | ||
resctrl.rst | ||
sgx.rst | ||
sva.rst | ||
tdx.rst | ||
tlb.rst | ||
topology.rst | ||
tsx_async_abort.rst | ||
usb-legacy-support.rst | ||
xstate.rst | ||
zero-page.rst |