source: trunk/packages/xen-3.1/xen-3.1/linux-2.6-xen-sparse/include/xen/hvm.h @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 456 bytes
Line 
1/* Simple wrappers around HVM functions */
2#ifndef XEN_HVM_H__
3#define XEN_HVM_H__
4
5#include <xen/interface/hvm/params.h>
6
7static inline unsigned long hvm_get_parameter(int idx)
8{
9        struct xen_hvm_param xhv;
10        int r;
11
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}
22
23#endif /* XEN_HVM_H__ */
Note: See TracBrowser for help on using the repository browser.