WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxc: Export do_mca hypercall to user sp

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: Export do_mca hypercall to user space tools.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 03 Feb 2010 01:55:22 -0800
Delivery-date: Wed, 03 Feb 2010 01:56:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxc: Export do_mca hypercall to user space tools., Xen patchbot-unstable <=