#ifndef __KVM_X86_VMX_HYPERV_H
#define __KVM_X86_VMX_HYPERV_H
#include <linux/kvm_host.h>
#include "vmcs12.h"
#include "vmx.h"
#define EVMPTR_INVALID …
#define EVMPTR_MAP_PENDING …
enum nested_evmptrld_status { … };
#ifdef CONFIG_KVM_HYPERV
static inline bool evmptr_is_valid(u64 evmptr)
{ … }
static inline bool nested_vmx_is_evmptr12_valid(struct vcpu_vmx *vmx)
{ … }
static inline bool evmptr_is_set(u64 evmptr)
{ … }
static inline bool nested_vmx_is_evmptr12_set(struct vcpu_vmx *vmx)
{ … }
static inline struct hv_enlightened_vmcs *nested_vmx_evmcs(struct vcpu_vmx *vmx)
{ … }
static inline bool guest_cpuid_has_evmcs(struct kvm_vcpu *vcpu)
{ … }
u64 nested_get_evmptr(struct kvm_vcpu *vcpu);
uint16_t nested_get_evmcs_version(struct kvm_vcpu *vcpu);
int nested_enable_evmcs(struct kvm_vcpu *vcpu,
uint16_t *vmcs_version);
void nested_evmcs_filter_control_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata);
int nested_evmcs_check_controls(struct vmcs12 *vmcs12);
bool nested_evmcs_l2_tlb_flush_enabled(struct kvm_vcpu *vcpu);
void vmx_hv_inject_synthetic_vmexit_post_tlb_flush(struct kvm_vcpu *vcpu);
#else
static inline bool evmptr_is_valid(u64 evmptr)
{
return false;
}
static inline bool nested_vmx_is_evmptr12_valid(struct vcpu_vmx *vmx)
{
return false;
}
static inline bool evmptr_is_set(u64 evmptr)
{
return false;
}
static inline bool nested_vmx_is_evmptr12_set(struct vcpu_vmx *vmx)
{
return false;
}
static inline struct hv_enlightened_vmcs *nested_vmx_evmcs(struct vcpu_vmx *vmx)
{
return NULL;
}
#endif
#endif