x86/sgx: Hook arch_memory_failure() into mainline code
mainline inclusion from mainline-5.17 commit 03b122da category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5EZFM CVE: NA Intel-SIG: commit 03b122da x86/sgx: Hook arch_memory_failure() into mainline code. Backport for SGX MCA recovery co-existence support -------------------------------- Add a call inside memory_failure() to call the arch specific code to check if the address is an SGX EPC page and handle it. Note the SGX EPC pages do not have a "struct page" entry, so the hook goes in at the same point as the device mapping hook. Pull the call to acquire the mutex earlier so the SGX errors are also protected. Make set_mce_nospec() skip SGX pages when trying to adjust the 1:1 map. Signed-off-by:Tony Luck <tony.luck@intel.com> Signed-off-by:
Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by:
Jarkko Sakkinen <jarkko@kernel.org> Reviewed-by:
Naoya Horiguchi <naoya.horiguchi@nec.com> Tested-by:
Reinette Chatre <reinette.chatre@intel.com> Link: https://lkml.kernel.org/r/20211026220050.697075-6-tony.luck@intel.com Signed-off-by:
Zhiquan Li <zhiquan1.li@intel.com>
Loading
Please sign in to comment