x86/sgx: Add hook to error injection address validation
authorTony Luck <tony.luck@intel.com>
Tue, 26 Oct 2021 22:00:49 +0000 (15:00 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Mon, 15 Nov 2021 19:13:16 +0000 (11:13 -0800)
commitc6acb1e7bf4656b9434335c72b8245cc84575fde
treeb97d6134e6af7d05b966523b83f3e331e6123295
parent03b122da74b22fbe7cd98184fa5657a9ce13970c
x86/sgx: Add hook to error injection address validation

SGX reserved memory does not appear in the standard address maps.

Add hook to call into the SGX code to check if an address is located
in SGX memory.

There are other challenges in injecting errors into SGX. Update the
documentation with a sequence of operations to inject.

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>
Tested-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lkml.kernel.org/r/20211026220050.697075-7-tony.luck@intel.com
Documentation/firmware-guide/acpi/apei/einj.rst
drivers/acpi/apei/einj.c