direct-io.hg

view linux-2.6-xen-sparse/include/xen/hvm.h @ 14737:602d061ff51f

linux: simplify and perform checking of multicall status
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Thu Apr 05 10:43:50 2007 +0100 (2007-04-05)
parents 00a70786e550
children
line source
1 /* Simple wrappers around HVM functions */
2 #ifndef XEN_HVM_H__
3 #define XEN_HVM_H__
5 #include <xen/interface/hvm/params.h>
7 static inline unsigned long hvm_get_parameter(int idx)
8 {
9 struct xen_hvm_param xhv;
10 int r;
12 xhv.domid = DOMID_SELF;
13 xhv.index = idx;
14 r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv);
15 if (r < 0) {
16 printk(KERN_ERR "cannot get hvm parameter %d: %d.\n",
17 idx, r);
18 return 0;
19 }
20 return xhv.value;
21 }
23 #endif /* XEN_HVM_H__ */