direct-io.hg

annotate linux-2.6-xen-sparse/include/xen/hvm.h @ 11509:2e6c10dc7c0b

[POWERPC][XEN] make sure put_domain() is called in case of allocate_rma() failuer

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Tue Sep 12 10:53:46 2006 -0400 (2006-09-12)
parents 00a70786e550
children 602d061ff51f
rev   line source
kfraser@11080 1 /* Simple wrappers around HVM functions */
kfraser@11080 2 #ifndef XEN_HVM_H__
kfraser@11080 3 #define XEN_HVM_H__
kfraser@11080 4
kfraser@11080 5 #include <xen/interface/hvm/params.h>
kfraser@11080 6 #include <asm/hypercall.h>
kfraser@11080 7
kfraser@11080 8 static inline unsigned long hvm_get_parameter(int idx)
kfraser@11080 9 {
kfraser@11080 10 struct xen_hvm_param xhv;
kfraser@11149 11 int r;
kfraser@11080 12
kfraser@11080 13 xhv.domid = DOMID_SELF;
kfraser@11080 14 xhv.index = idx;
kfraser@11149 15 r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv);
kfraser@11149 16 if (r < 0) {
kfraser@11149 17 printk(KERN_ERR "cannot get hvm parameter %d: %d.\n",
kfraser@11149 18 idx, r);
kfraser@11149 19 return 0;
kfraser@11149 20 }
kfraser@11149 21 return xhv.value;
kfraser@11080 22 }
kfraser@11080 23
kfraser@11080 24 #endif /* XEN_HVM_H__ */