kvm_onhyperv.h 623 B

12345678910111213141516171819202122232425
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * KVM L1 hypervisor optimizations on Hyper-V.
  4. */
  5. #ifndef __ARCH_X86_KVM_KVM_ONHYPERV_H__
  6. #define __ARCH_X86_KVM_KVM_ONHYPERV_H__
  7. #if IS_ENABLED(CONFIG_HYPERV)
  8. int hv_remote_flush_tlb_with_range(struct kvm *kvm,
  9. struct kvm_tlb_range *range);
  10. int hv_remote_flush_tlb(struct kvm *kvm);
  11. void hv_track_root_tdp(struct kvm_vcpu *vcpu, hpa_t root_tdp);
  12. #else /* !CONFIG_HYPERV */
  13. static inline int hv_remote_flush_tlb(struct kvm *kvm)
  14. {
  15. return -EOPNOTSUPP;
  16. }
  17. static inline void hv_track_root_tdp(struct kvm_vcpu *vcpu, hpa_t root_tdp)
  18. {
  19. }
  20. #endif /* !CONFIG_HYPERV */
  21. #endif