xref: /linux/tools/testing/selftests/kvm/include/x86/smm.h (revision 11e8c7e9471cf8e6ae6ec7324a3174191cd965e3)
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,
12 		 uint64_t smram_gpa,
13 		 const void *smi_handler, size_t handler_size);
14 
15 void inject_smi(struct kvm_vcpu *vcpu);
16 
17 #endif /* SELFTEST_KVM_SMM_H */
18