diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-05-14 12:38:24 +0100 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-07-22 16:45:31 -0700 |
commit | 18f19aa62a267f2f759e278018f1032adf4c3774 (patch) | |
tree | e6de00c645453ee48361e4cc0026e72d283c28a6 /include/xen/hvm.h | |
parent | 1c5474a65bf15a4cb162dfff86d6d0b5a08a740c (diff) | |
download | linux-18f19aa62a267f2f759e278018f1032adf4c3774.tar.bz2 |
xen: Add support for HVM hypercalls.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'include/xen/hvm.h')
-rw-r--r-- | include/xen/hvm.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/xen/hvm.h b/include/xen/hvm.h new file mode 100644 index 000000000000..5dfe8fb86e67 --- /dev/null +++ b/include/xen/hvm.h @@ -0,0 +1,24 @@ +/* Simple wrappers around HVM functions */ +#ifndef XEN_HVM_H__ +#define XEN_HVM_H__ + +#include <xen/interface/hvm/params.h> + +static inline int hvm_get_parameter(int idx, uint64_t *value) +{ + struct xen_hvm_param xhv; + int r; + + xhv.domid = DOMID_SELF; + xhv.index = idx; + r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv); + if (r < 0) { + printk(KERN_ERR "Cannot get hvm parameter %d: %d!\n", + idx, r); + return r; + } + *value = xhv.value; + return r; +} + +#endif /* XEN_HVM_H__ */ |