Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Common Hyper-V on KVM and KVM on Hyper-V definitions (SVM).
0004  */
0005 
0006 #ifndef __ARCH_X86_KVM_SVM_HYPERV_H__
0007 #define __ARCH_X86_KVM_SVM_HYPERV_H__
0008 
0009 #include <asm/mshyperv.h>
0010 
0011 #include "../hyperv.h"
0012 
0013 /*
0014  * Hyper-V uses the software reserved 32 bytes in VMCB
0015  * control area to expose SVM enlightenments to guests.
0016  */
0017 struct hv_enlightenments {
0018     struct __packed hv_enlightenments_control {
0019         u32 nested_flush_hypercall:1;
0020         u32 msr_bitmap:1;
0021         u32 enlightened_npt_tlb: 1;
0022         u32 reserved:29;
0023     } __packed hv_enlightenments_control;
0024     u32 hv_vp_id;
0025     u64 hv_vm_id;
0026     u64 partition_assist_page;
0027     u64 reserved;
0028 } __packed;
0029 
0030 /*
0031  * Hyper-V uses the software reserved clean bit in VMCB
0032  */
0033 #define VMCB_HV_NESTED_ENLIGHTENMENTS VMCB_SW
0034 
0035 #endif /* __ARCH_X86_KVM_SVM_HYPERV_H__ */