2021-06-03 23:14:36 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
/*
|
|
|
|
* KVM L1 hypervisor optimizations on Hyper-V.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ARCH_X86_KVM_KVM_ONHYPERV_H__
|
|
|
|
#define __ARCH_X86_KVM_KVM_ONHYPERV_H__
|
|
|
|
|
|
|
|
#if IS_ENABLED(CONFIG_HYPERV)
|
|
|
|
int hv_remote_flush_tlb_with_range(struct kvm *kvm,
|
|
|
|
struct kvm_tlb_range *range);
|
|
|
|
int hv_remote_flush_tlb(struct kvm *kvm);
|
2022-01-28 08:51:55 +08:00
|
|
|
void hv_track_root_tdp(struct kvm_vcpu *vcpu, hpa_t root_tdp);
|
2021-06-03 23:14:36 +08:00
|
|
|
#else /* !CONFIG_HYPERV */
|
2023-03-24 22:52:33 +08:00
|
|
|
static inline int hv_remote_flush_tlb(struct kvm *kvm)
|
|
|
|
{
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
}
|
|
|
|
|
2021-06-03 23:14:36 +08:00
|
|
|
static inline void hv_track_root_tdp(struct kvm_vcpu *vcpu, hpa_t root_tdp)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
#endif /* !CONFIG_HYPERV */
|
|
|
|
|
|
|
|
#endif
|