1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef __KVM_X86_SGX_H 3 #define __KVM_X86_SGX_H 4 5 #include <linux/kvm_host.h> 6 7 #include "capabilities.h" 8 #include "vmx_ops.h" 9 10 #ifdef CONFIG_X86_SGX_KVM 11 extern bool __read_mostly enable_sgx; 12 13 int handle_encls(struct kvm_vcpu *vcpu); 14 15 void setup_default_sgx_lepubkeyhash(void); 16 void vcpu_setup_sgx_lepubkeyhash(struct kvm_vc 17 18 void vmx_write_encls_bitmap(struct kvm_vcpu *v 19 #else 20 #define enable_sgx 0 21 22 static inline void setup_default_sgx_lepubkeyh 23 static inline void vcpu_setup_sgx_lepubkeyhash 24 25 static inline void vmx_write_encls_bitmap(stru 26 stru 27 { 28 /* Nothing to do if hardware doesn't s 29 if (cpu_has_vmx_encls_vmexit()) 30 vmcs_write64(ENCLS_EXITING_BIT 31 } 32 #endif 33 34 #endif /* __KVM_X86_SGX_H */ 35
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.