~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/include/asm/kvm_para.h

Version: ~ [ linux-5.2 ] ~ [ linux-5.1.16 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.57 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.132 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.184 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.184 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.69 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _ASM_MIPS_KVM_PARA_H
  2 #define _ASM_MIPS_KVM_PARA_H
  3 
  4 #include <uapi/asm/kvm_para.h>
  5 
  6 #define KVM_HYPERCALL ".word 0x42000028"
  7 
  8 /*
  9  * Hypercalls for KVM.
 10  *
 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.
 14  */
 15 static inline unsigned long kvm_hypercall0(unsigned long num)
 16 {
 17         register unsigned long n asm("v0");
 18         register unsigned long r asm("v0");
 19 
 20         n = num;
 21         __asm__ __volatile__(
 22                 KVM_HYPERCALL
 23                 : "=r" (r) : "r" (n) : "memory"
 24                 );
 25 
 26         return r;
 27 }
 28 
 29 static inline unsigned long kvm_hypercall1(unsigned long num,
 30                                         unsigned long arg0)
 31 {
 32         register unsigned long n asm("v0");
 33         register unsigned long r asm("v0");
 34         register unsigned long a0 asm("a0");
 35 
 36         n = num;
 37         a0 = arg0;
 38         __asm__ __volatile__(
 39                 KVM_HYPERCALL
 40                 : "=r" (r) : "r" (n), "r" (a0) : "memory"
 41                 );
 42 
 43         return r;
 44 }
 45 
 46 static inline unsigned long kvm_hypercall2(unsigned long num,
 47                                         unsigned long arg0, unsigned long arg1)
 48 {
 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");
 53 
 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"
 60                 );
 61 
 62         return r;
 63 }
 64 
 65 static inline unsigned long kvm_hypercall3(unsigned long num,
 66         unsigned long arg0, unsigned long arg1, unsigned long arg2)
 67 {
 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");
 73 
 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"
 81                 );
 82 
 83         return r;
 84 }
 85 
 86 static inline bool kvm_check_and_clear_guest_paused(void)
 87 {
 88         return false;
 89 }
 90 
 91 static inline unsigned int kvm_arch_para_features(void)
 92 {
 93         return 0;
 94 }
 95 
 96 #ifdef CONFIG_MIPS_PARAVIRT
 97 static inline bool kvm_para_available(void)
 98 {
 99         return true;
100 }
101 #else
102 static inline bool kvm_para_available(void)
103 {
104         return false;
105 }
106 #endif
107 
108 
109 #endif /* _ASM_MIPS_KVM_PARA_H */
110 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp