win-pvdrivers

view xenpci/hypercall_x86.h @ 1013:43e76afb2398

Fix compiler warnings under 2000
author James Harper <james.harper@bendigoit.com.au>
date Mon Feb 11 20:59:11 2013 +1100 (2013-02-11)
parents 95159ee58473
children 471c94d04d8a
line source
1 #ifndef HYPERCALL_X86_H
2 #define HYPERCALL_X86_H
3 /*
4 PV Drivers for Windows Xen HVM Domains
5 Copyright (C) 2007 James Harper
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 */
22 static __inline int
23 _HYPERVISOR_memory_op(PVOID hypercall_stubs, int cmd, void *arg)
24 {
25 long __res;
26 __asm {
27 mov ebx, cmd
28 mov ecx, arg
29 mov eax, hypercall_stubs
30 add eax, (__HYPERVISOR_memory_op * 32)
31 call eax
32 mov [__res], eax
33 }
34 return __res;
35 }
37 static __inline int
38 _HYPERVISOR_sched_op(PVOID hypercall_stubs, int cmd, void *arg)
39 {
40 long __res;
41 __asm {
42 mov ebx, cmd
43 mov ecx, arg
44 mov eax, hypercall_stubs
45 add eax, (__HYPERVISOR_sched_op * 32)
46 call eax
47 mov [__res], eax
48 }
49 return __res;
50 }
52 static __inline int
53 _HYPERVISOR_xen_version(PVOID hypercall_stubs, int cmd, void *arg)
54 {
55 long __res;
56 __asm {
57 mov ebx, cmd
58 mov ecx, arg
59 mov eax, hypercall_stubs
60 add eax, (__HYPERVISOR_xen_version * 32)
61 call eax
62 mov [__res], eax
63 }
64 return __res;
65 }
67 static __inline int
68 _HYPERVISOR_grant_table_op(PVOID hypercall_stubs, int cmd, void *uop, unsigned int count)
69 {
70 long __res;
71 __asm {
72 mov ebx, cmd
73 mov ecx, uop
74 mov edx, count
75 mov eax, hypercall_stubs
76 add eax, (__HYPERVISOR_grant_table_op * 32)
77 call eax
78 mov [__res], eax
79 }
80 return __res;
81 }
83 static __inline int
84 _HYPERVISOR_hvm_op(PVOID hypercall_stubs, int op, struct xen_hvm_param *arg)
85 {
86 long __res;
87 __asm {
88 mov ebx, op
89 mov ecx, arg
90 mov eax, hypercall_stubs
91 add eax, (__HYPERVISOR_hvm_op * 32)
92 call eax
93 mov [__res], eax
94 }
95 return __res;
96 }
98 static __inline int
99 _HYPERVISOR_event_channel_op(PVOID hypercall_stubs, int cmd, void *op)
100 {
101 long __res;
102 __asm {
103 mov ebx, cmd
104 mov ecx, op
105 mov eax, hypercall_stubs
106 add eax, (__HYPERVISOR_event_channel_op * 32)
107 call eax
108 mov [__res], eax
109 }
110 return __res;
111 }
113 #endif