Commit 5bb9e11f authored by Tony Luck's avatar Tony Luck Committed by Zhiquan Li
Browse files

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: default avatarTony Luck <tony.luck@intel.com>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Reviewed-by: default avatarNaoya Horiguchi <naoya.horiguchi@nec.com>
Tested-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Link: https://lkml.kernel.org/r/20211026220050.697075-6-tony.luck@intel.com


Signed-off-by: default avatarZhiquan Li <zhiquan1.li@intel.com>
parent 4fccae8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment