kvm_para.h 607 B

1234567891011121314151617181920212223242526272829
  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. #ifdef __KERNEL__
  13. /*
  14. * hypercalls use architecture specific
  15. */
  16. #include <asm/kvm_para.h>
  17. static inline int kvm_para_has_feature(unsigned int feature)
  18. {
  19. if (kvm_arch_para_features() & (1UL << feature))
  20. return 1;
  21. return 0;
  22. }
  23. #endif /* __KERNEL__ */
  24. #endif /* __LINUX_KVM_PARA_H */