xref: /openbmc/linux/arch/x86/kvm/svm/hyperv.h (revision c059ee9d)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Common Hyper-V on KVM and KVM on Hyper-V definitions (SVM).
4  */
5 
6 #ifndef __ARCH_X86_KVM_SVM_HYPERV_H__
7 #define __ARCH_X86_KVM_SVM_HYPERV_H__
8 
9 #include <asm/mshyperv.h>
10 
11 #include "../hyperv.h"
12 
13 /*
14  * Hyper-V uses the software reserved 32 bytes in VMCB
15  * control area to expose SVM enlightenments to guests.
16  */
17 struct hv_enlightenments {
18 	struct __packed hv_enlightenments_control {
19 		u32 nested_flush_hypercall:1;
20 		u32 msr_bitmap:1;
21 		u32 enlightened_npt_tlb: 1;
22 		u32 reserved:29;
23 	} __packed hv_enlightenments_control;
24 	u32 hv_vp_id;
25 	u64 hv_vm_id;
26 	u64 partition_assist_page;
27 	u64 reserved;
28 } __packed;
29 
30 /*
31  * Hyper-V uses the software reserved clean bit in VMCB
32  */
33 #define VMCB_HV_NESTED_ENLIGHTENMENTS VMCB_SW
34 
35 #endif /* __ARCH_X86_KVM_SVM_HYPERV_H__ */
36