hypervisor.h 738 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_ARM64_HYPERVISOR_H
  3. #define _ASM_ARM64_HYPERVISOR_H
  4. #include <linux/memory.h>
  5. #include <linux/mm.h>
  6. #include <asm/xen/hypervisor.h>
  7. void kvm_init_hyp_services(void);
  8. bool kvm_arm_hyp_service_available(u32 func_id);
  9. void kvm_arm_init_hyp_services(void);
  10. void kvm_init_memshare_services(void);
  11. void kvm_init_ioremap_services(void);
  12. struct hypervisor_ops {
  13. #ifdef CONFIG_MEMORY_RELINQUISH
  14. void (*page_relinquish)(struct page *page);
  15. void (*post_page_relinquish_tlb_inv)(void);
  16. #endif
  17. };
  18. extern struct hypervisor_ops hyp_ops;
  19. #ifdef CONFIG_MEMORY_RELINQUISH
  20. void kvm_init_memrelinquish_services(void);
  21. #else
  22. static inline void kvm_init_memrelinquish_services(void) {}
  23. #endif
  24. #endif