[PATCH] x86/sgx: Skip EPC initialization in the kdump kernel

Dave Hansen dave.hansen at intel.com
Wed Nov 11 07:06:41 PST 2026


On 11/11/26 04:39, Yuanhe Shu wrote:
> +	/* The kdump kernel has no use for SGX.  Skip it. */
> +	if (is_kdump_kernel())
> +		return -ENODEV;

I'd much rather this be inverted: have the kdump code maintain a list of
things it needs to turn off rather than sprinkle is_kdump_kernel()
around any further.

I'd suggest a small bit of kdump specific code that does:

	setup_clear_cpu_cap(X86_FEATURE_SGX);

It'll need to be in x86 code or under an x86 #ifdef.



More information about the kexec mailing list