xref: /openbmc/linux/arch/x86/kvm/kvm_onhyperv.h (revision 726ccdba)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * KVM L1 hypervisor optimizations on Hyper-V.
4  */
5 
6 #ifndef __ARCH_X86_KVM_KVM_ONHYPERV_H__
7 #define __ARCH_X86_KVM_KVM_ONHYPERV_H__
8 
9 #if IS_ENABLED(CONFIG_HYPERV)
10 int hv_flush_remote_tlbs_range(struct kvm *kvm, gfn_t gfn, gfn_t nr_pages);
11 int hv_flush_remote_tlbs(struct kvm *kvm);
12 void hv_track_root_tdp(struct kvm_vcpu *vcpu, hpa_t root_tdp);
13 #else /* !CONFIG_HYPERV */
14 static inline int hv_flush_remote_tlbs(struct kvm *kvm)
15 {
16 	return -EOPNOTSUPP;
17 }
18 
19 static inline void hv_track_root_tdp(struct kvm_vcpu *vcpu, hpa_t root_tdp)
20 {
21 }
22 #endif /* !CONFIG_HYPERV */
23 
24 #endif
25