Re: [PATCH v1 5/8] x86/sev: Add a function to contain all SEV-specific setup operations
From: Borislav Petkov
Date: Wed Sep 09 2026 - 16:16:29 EST
On Sat, Aug 29, 2026 at 03:39:43AM +0000, Melody Wang wrote:
> +bool sev_prepare(void)
> +{
> + u64 unsupported = snp_get_unsupported_features(sev_get_status());
> + if (unsupported) {
> + error("Unsupported SEV-SNP features detected\n");
> + return true;
Sashiko says here:
| Does calling error() here inadvertently cause a silent system hang?
| Since error() is a __noreturn function that halts the system via an infinite
| asm("hlt") loop, the return statement directly below it becomes unreachable
| dead code.
Yes dear Sashiko, it used to do that before too with
efi_exit(handle, EFI_UNSUPPORTED);
| Additionally, the early diagnostic output from error() might fail because the
| console lines and cols are not yet initialized in the EFI stub context before
| extract_kernel() runs, resulting in dropped diagnostic information.
Not a big surprise there.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette