Move kvm headers from kvm/kernel to kvm/include
[qemu-kvm/fedora.git] / kvm / include / linux / kvm_para.h
blob54ebbd544a89f5878774d004f634900408989362
1 #ifndef KVM_UNIFDEF_H
2 #define KVM_UNIFDEF_H
4 #ifdef __i386__
5 #ifndef CONFIG_X86_32
6 #define CONFIG_X86_32 1
7 #endif
8 #endif
10 #ifdef __x86_64__
11 #ifndef CONFIG_X86_64
12 #define CONFIG_X86_64 1
13 #endif
14 #endif
16 #if defined(__i386__) || defined (__x86_64__)
17 #ifndef CONFIG_X86
18 #define CONFIG_X86 1
19 #endif
20 #endif
22 #ifdef __ia64__
23 #ifndef CONFIG_IA64
24 #define CONFIG_IA64 1
25 #endif
26 #endif
28 #ifdef __PPC__
29 #ifndef CONFIG_PPC
30 #define CONFIG_PPC 1
31 #endif
32 #endif
34 #ifdef __s390__
35 #ifndef CONFIG_S390
36 #define CONFIG_S390 1
37 #endif
38 #endif
40 #endif
41 #ifndef __LINUX_KVM_PARA_H
42 #define __LINUX_KVM_PARA_H
45 * This header file provides a method for making a hypercall to the host
46 * Architectures should define:
47 * - kvm_hypercall0, kvm_hypercall1...
48 * - kvm_arch_para_features
49 * - kvm_para_available
52 /* Return values for hypercalls */
53 #define KVM_ENOSYS 1000
54 #define KVM_EFAULT EFAULT
55 #define KVM_E2BIG E2BIG
57 #define KVM_HC_VAPIC_POLL_IRQ 1
58 #define KVM_HC_MMU_OP 2
61 * hypercalls use architecture specific
63 #include <asm/kvm_para.h>
65 #ifdef __KERNEL__
66 #ifdef CONFIG_KVM_GUEST
67 void __init kvm_guest_init(void);
68 #else
69 #define kvm_guest_init() do { } while (0)
70 #endif
72 static inline int kvm_para_has_feature(unsigned int feature)
74 if (kvm_arch_para_features() & (1UL << feature))
75 return 1;
76 return 0;
78 #endif /* __KERNEL__ */
79 #endif /* __LINUX_KVM_PARA_H */