]> git.baikalelectronics.ru Git - kernel.git/commit
x86/sgx: Add encls_faulted() helper
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 19 Mar 2021 07:23:06 +0000 (20:23 +1300)
committerBorislav Petkov <bp@suse.de>
Tue, 6 Apr 2021 07:43:42 +0000 (09:43 +0200)
commitb0ee61bdda424b03407599f15179476a040578db
treea8c6cd83a88169cb238fd46bd2aa9ca5505c4b19
parent24a164dfa3357ca02f0cdb8e557721a6ac9202f5
x86/sgx: Add encls_faulted() helper

Add a helper to extract the fault indicator from an encoded ENCLS return
value.  SGX virtualization will also need to detect ENCLS faults.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Kai Huang <kai.huang@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
Acked-by: Dave Hansen <dave.hansen@intel.com>
Link: https://lkml.kernel.org/r/c1f955898110de2f669da536fc6cf62e003dff88.1616136308.git.kai.huang@intel.com
arch/x86/kernel/cpu/sgx/encls.h
arch/x86/kernel/cpu/sgx/ioctl.c