win-pvdrivers

view xenpci/hypercall_amd64.h @ 1056:b29ed182391f

fix cut&paste error in tmem hypercall for x64
author James Harper <james.harper@bendigoit.com.au>
date Tue Jun 04 12:15:51 2013 +1000 (2013-06-04)
parents 471c94d04d8a
children
line source
1 /*
2 PV Drivers for Windows Xen HVM Domains
3 Copyright (C) 2007 James Harper
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
20 extern int _hypercall1(VOID *address, xen_ulong_t a1);
21 extern int _hypercall2(VOID *address, xen_ulong_t a1, xen_ulong_t a2);
22 extern int _hypercall3(VOID *address, xen_ulong_t a1, xen_ulong_t a2, xen_ulong_t a3);
24 static __inline int
25 HYPERVISOR_memory_op(int cmd, void *arg)
26 {
27 PCHAR memory_op_func = hypercall_stubs;
28 memory_op_func += __HYPERVISOR_memory_op * 32;
29 return _hypercall2(memory_op_func, (xen_ulong_t)cmd, (xen_ulong_t)arg);
30 }
32 static __inline int
33 HYPERVISOR_xen_version(int cmd, void *arg)
34 {
35 PCHAR xen_version_func = hypercall_stubs;
36 xen_version_func += __HYPERVISOR_xen_version * 32;
37 return _hypercall2(xen_version_func, (xen_ulong_t)cmd, (xen_ulong_t)arg);
38 }
40 static __inline int
41 HYPERVISOR_grant_table_op(int cmd, void *uop, unsigned int count)
42 {
43 PCHAR grant_table_op_func = hypercall_stubs;
44 grant_table_op_func += __HYPERVISOR_grant_table_op * 32;
45 return _hypercall3(grant_table_op_func, (xen_ulong_t)cmd, (xen_ulong_t)uop, (xen_ulong_t)count);
46 }
48 static __inline int
49 HYPERVISOR_hvm_op(int op, struct xen_hvm_param *arg)
50 {
51 PCHAR hvm_op_func = hypercall_stubs;
52 hvm_op_func += __HYPERVISOR_hvm_op * 32;
53 return _hypercall2(hvm_op_func, (xen_ulong_t)op, (xen_ulong_t)arg);
54 }
56 static __inline int
57 HYPERVISOR_event_channel_op(int cmd, void *op)
58 {
59 PCHAR event_channel_op_func = hypercall_stubs;
60 event_channel_op_func += __HYPERVISOR_event_channel_op * 32;
61 return _hypercall2(event_channel_op_func, (xen_ulong_t)cmd, (xen_ulong_t)op);
62 }
64 static __inline int
65 HYPERVISOR_sched_op(int cmd, void *arg)
66 {
67 PCHAR sched_op_func = hypercall_stubs;
68 sched_op_func += __HYPERVISOR_sched_op * 32;
69 return _hypercall2(sched_op_func, (xen_ulong_t)cmd, (xen_ulong_t)arg);
70 }
72 static __inline int
73 HYPERVISOR_tmem_op(void *op)
74 {
75 PCHAR tmem_op_func = hypercall_stubs;
76 tmem_op_func += __HYPERVISOR_tmem_op * 32;
77 return _hypercall1(tmem_op_func, (xen_ulong_t)op);
78 }