xref: /linux/arch/x86/kvm/vmx/sgx.h (revision 8f102445d4045384799627c53d82c45ca2cad3a5)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __KVM_X86_SGX_H
3 #define __KVM_X86_SGX_H
4 
5 #include <linux/kvm_host.h>
6 
7 #ifdef CONFIG_X86_SGX_KVM
8 extern bool __read_mostly enable_sgx;
9 
10 int handle_encls(struct kvm_vcpu *vcpu);
11 
12 void setup_default_sgx_lepubkeyhash(void);
13 void vcpu_setup_sgx_lepubkeyhash(struct kvm_vcpu *vcpu);
14 #else
15 #define enable_sgx 0
16 
17 static inline void setup_default_sgx_lepubkeyhash(void) { }
18 static inline void vcpu_setup_sgx_lepubkeyhash(struct kvm_vcpu *vcpu) { }
19 #endif
20 
21 #endif /* __KVM_X86_SGX_H */
22