blk: rq_data_dir() should not return a boolean
[cris-mirror.git] / arch / mips / include / asm / kvm_para.h
blob5a9aa918abe6a6837a167d1d70eb97d319b4207e
1 #ifndef _ASM_MIPS_KVM_PARA_H
2 #define _ASM_MIPS_KVM_PARA_H
4 #include <uapi/asm/kvm_para.h>
6 #define KVM_HYPERCALL ".word 0x42000028"
8 /*
9 * Hypercalls for KVM.
11 * Hypercall number is passed in v0.
12 * Return value will be placed in v0.
13 * Up to 3 arguments are passed in a0, a1, and a2.
15 static inline unsigned long kvm_hypercall0(unsigned long num)
17 register unsigned long n asm("v0");
18 register unsigned long r asm("v0");
20 n = num;
21 __asm__ __volatile__(
22 KVM_HYPERCALL
23 : "=r" (r) : "r" (n) : "memory"
26 return r;
29 static inline unsigned long kvm_hypercall1(unsigned long num,
30 unsigned long arg0)
32 register unsigned long n asm("v0");
33 register unsigned long r asm("v0");
34 register unsigned long a0 asm("a0");
36 n = num;
37 a0 = arg0;
38 __asm__ __volatile__(
39 KVM_HYPERCALL
40 : "=r" (r) : "r" (n), "r" (a0) : "memory"
43 return r;
46 static inline unsigned long kvm_hypercall2(unsigned long num,
47 unsigned long arg0, unsigned long arg1)
49 register unsigned long n asm("v0");
50 register unsigned long r asm("v0");
51 register unsigned long a0 asm("a0");
52 register unsigned long a1 asm("a1");
54 n = num;
55 a0 = arg0;
56 a1 = arg1;
57 __asm__ __volatile__(
58 KVM_HYPERCALL
59 : "=r" (r) : "r" (n), "r" (a0), "r" (a1) : "memory"
62 return r;
65 static inline unsigned long kvm_hypercall3(unsigned long num,
66 unsigned long arg0, unsigned long arg1, unsigned long arg2)
68 register unsigned long n asm("v0");
69 register unsigned long r asm("v0");
70 register unsigned long a0 asm("a0");
71 register unsigned long a1 asm("a1");
72 register unsigned long a2 asm("a2");
74 n = num;
75 a0 = arg0;
76 a1 = arg1;
77 a2 = arg2;
78 __asm__ __volatile__(
79 KVM_HYPERCALL
80 : "=r" (r) : "r" (n), "r" (a0), "r" (a1), "r" (a2) : "memory"
83 return r;
86 static inline bool kvm_check_and_clear_guest_paused(void)
88 return false;
91 static inline unsigned int kvm_arch_para_features(void)
93 return 0;
96 #ifdef CONFIG_MIPS_PARAVIRT
97 static inline bool kvm_para_available(void)
99 return true;
101 #else
102 static inline bool kvm_para_available(void)
104 return false;
106 #endif
109 #endif /* _ASM_MIPS_KVM_PARA_H */