kvm_para.h 651 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef __LINUX_KVM_PARA_H
  2. #define __LINUX_KVM_PARA_H
  3. /*
  4. * This header file provides a method for making a hypercall to the host
  5. * Architectures should define:
  6. * - kvm_hypercall0, kvm_hypercall1...
  7. * - kvm_arch_para_features
  8. * - kvm_para_available
  9. */
  10. /* Return values for hypercalls */
  11. #define KVM_ENOSYS 1000
  12. #define KVM_HC_VAPIC_POLL_IRQ 1
  13. #ifdef __KERNEL__
  14. /*
  15. * hypercalls use architecture specific
  16. */
  17. #include <asm/kvm_para.h>
  18. static inline int kvm_para_has_feature(unsigned int feature)
  19. {
  20. if (kvm_arch_para_features() & (1UL << feature))
  21. return 1;
  22. return 0;
  23. }
  24. #endif /* __KERNEL__ */
  25. #endif /* __LINUX_KVM_PARA_H */