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] Allow a guest to send NMIs to its VCPUs.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Allow a guest to send NMIs to its VCPUs.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Oct 2007 10:10:09 -0700
Delivery-date: Mon, 22 Oct 2007 10:10:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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@xxxxxxxxxxxxx>
# Date 1193047864 -3600
# Node ID 183a2d6eaadf5a24e231de4b473d0ff683ebd2c2
# Parent  c44d82f36665f0ac74e5591ffcdc548494c0ecb2
Allow a guest to send NMIs to its VCPUs.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/common/compat/domain.c |    1 +
 xen/common/domain.c        |   16 +++++++++++-----
 xen/include/public/vcpu.h  |    3 +++
 3 files changed, 15 insertions(+), 5 deletions(-)

diff -r c44d82f36665 -r 183a2d6eaadf xen/common/compat/domain.c
--- a/xen/common/compat/domain.c        Mon Oct 22 09:42:49 2007 +0100
+++ b/xen/common/compat/domain.c        Mon Oct 22 11:11:04 2007 +0100
@@ -59,6 +59,7 @@ int compat_vcpu_op(int cmd, int vcpuid, 
     case VCPUOP_stop_periodic_timer:
     case VCPUOP_set_singleshot_timer:
     case VCPUOP_stop_singleshot_timer:
+    case VCPUOP_send_nmi:
         rc = do_vcpu_op(cmd, vcpuid, arg);
         break;
 
diff -r c44d82f36665 -r 183a2d6eaadf xen/common/domain.c
--- a/xen/common/domain.c       Mon Oct 22 09:42:49 2007 +0100
+++ b/xen/common/domain.c       Mon Oct 22 11:11:04 2007 +0100
@@ -708,11 +708,9 @@ long do_vcpu_op(int cmd, int vcpuid, XEN
     }
 
     case VCPUOP_stop_periodic_timer:
-    {
         v->periodic_period = 0;
         vcpu_force_reschedule(v);
         break;
-    }
 
     case VCPUOP_set_singleshot_timer:
     {
@@ -740,13 +738,21 @@ long do_vcpu_op(int cmd, int vcpuid, XEN
     }
 
     case VCPUOP_stop_singleshot_timer:
-    {
         if ( v != current )
             return -EINVAL;
 
         stop_timer(&v->singleshot_timer);
-        break;
-    }
+
+        break;
+
+    case VCPUOP_send_nmi:
+        if ( !guest_handle_is_null(arg) )
+            return -EINVAL;
+
+        if ( !test_and_set_bool(v->nmi_pending) )
+            vcpu_kick(v);
+
+        break;
 
     default:
         rc = arch_do_vcpu_op(cmd, v, arg);
diff -r c44d82f36665 -r 183a2d6eaadf xen/include/public/vcpu.h
--- a/xen/include/public/vcpu.h Mon Oct 22 09:42:49 2007 +0100
+++ b/xen/include/public/vcpu.h Mon Oct 22 11:11:04 2007 +0100
@@ -179,6 +179,9 @@ typedef struct vcpu_register_vcpu_info v
 typedef struct vcpu_register_vcpu_info vcpu_register_vcpu_info_t;
 DEFINE_XEN_GUEST_HANDLE(vcpu_register_vcpu_info_t);
 
+/* Send an NMI to the specified VCPU. @extra_arg == NULL. */
+#define VCPUOP_send_nmi             11
+
 #endif /* __XEN_PUBLIC_VCPU_H__ */
 
 /*

_______________________________________________
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] Allow a guest to send NMIs to its VCPUs., Xen patchbot-unstable <=