xref: /linux/tools/testing/selftests/kvm/include/x86/smm.h (revision 06bc7ff0a1e0f2b0102e1314e3527a7ec0997851)
1 // SPDX-License-Identifier: GPL-2.0-only
2 #ifndef SELFTEST_KVM_SMM_H
3 #define SELFTEST_KVM_SMM_H
4 
5 #include "kvm_util.h"
6 
7 #define SMRAM_SIZE	65536
8 #define SMRAM_MEMSLOT	((1 << 16) | 1)
9 #define SMRAM_PAGES	(SMRAM_SIZE / PAGE_SIZE)
10 
11 void setup_smram(struct kvm_vm *vm, struct kvm_vcpu *vcpu, u64 smram_gpa,
12 		 const void *smi_handler, size_t handler_size);
13 
14 void inject_smi(struct kvm_vcpu *vcpu);
15 
16 #endif /* SELFTEST_KVM_SMM_H */
17