[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxc: Export do_mca hypercall to user space tools.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1265189937 0 # Node ID a7546e45ca8352f9ea62416d53a44abeef365c85 # Parent 09dd83d09f49c108647b00d81669af4ffb03ae1c libxc: Export do_mca hypercall to user space tools. This is mainly for software trigger MCE operation, so that test suites can trigger software MCE. Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx> --- tools/libxc/xc_misc.c | 21 +++++++++++++++++++++ tools/libxc/xenctrl.h | 2 ++ 2 files changed, 23 insertions(+) diff -r 09dd83d09f49 -r a7546e45ca83 tools/libxc/xc_misc.c --- a/tools/libxc/xc_misc.c Wed Feb 03 09:38:00 2010 +0000 +++ b/tools/libxc/xc_misc.c Wed Feb 03 09:38:57 2010 +0000 @@ -95,6 +95,27 @@ int xc_sched_id(int xc_handle, return 0; } + +#if defined(__i386__) || defined(__x86_64__) +int xc_mca_op(int xc_handle, struct xen_mc *mc) +{ + int ret = 0; + DECLARE_HYPERCALL; + + mc->interface_version = XEN_MCA_INTERFACE_VERSION; + if ( lock_pages(mc, sizeof(mc)) ) + { + PERROR("Could not lock xen_mc memory\n"); + return -EINVAL; + } + + hypercall.op = __HYPERVISOR_mca; + hypercall.arg[0] = (unsigned long)mc; + ret = do_xen_hypercall(xc_handle, &hypercall); + unlock_pages(mc, sizeof(mc)); + return ret; +} +#endif int xc_perfc_control(int xc_handle, uint32_t opcode, diff -r 09dd83d09f49 -r a7546e45ca83 tools/libxc/xenctrl.h --- a/tools/libxc/xenctrl.h Wed Feb 03 09:38:00 2010 +0000 +++ b/tools/libxc/xenctrl.h Wed Feb 03 09:38:57 2010 +0000 @@ -37,6 +37,7 @@ #if defined(__i386__) || defined(__x86_64__) #include <xen/foreign/x86_32.h> #include <xen/foreign/x86_64.h> +#include <xen/arch-x86/xen-mca.h> #endif #ifdef __ia64__ @@ -1207,6 +1208,7 @@ int xc_cpuid_apply_policy(int xc, domid_t domid); void xc_cpuid_to_str(const unsigned int *regs, char **strs); +int xc_mca_op(int xc_handle, struct xen_mc *mc); #endif struct xc_px_val { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |