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] Implement domctl_sendtrigger_nmi for x86

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Implement domctl_sendtrigger_nmi for x86 hvm.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Jul 2007 03:02:44 -0700
Delivery-date: Fri, 27 Jul 2007 03:00:46 -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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1184330948 -3600
# Node ID 8b4518a6f81547ccb70cc05665ae086a4638a29c
# Parent  0aa2a954a6d13578627ec4d0558786b77a8c8afc
Implement domctl_sendtrigger_nmi for x86 hvm.

This patch implements DOMCTL_SENDTRIGGER_NMI hypercall for x86 hvm
domains. We can manually inject NMI into a domain by using
'xm trigger [domain] nmi [vcpu]'.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
---
 xen/arch/x86/domctl.c |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+)

diff -r 0aa2a954a6d1 -r 8b4518a6f815 xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Fri Jul 13 13:46:49 2007 +0100
+++ b/xen/arch/x86/domctl.c     Fri Jul 13 13:49:08 2007 +0100
@@ -427,6 +427,46 @@ long arch_do_domctl(
     }
     break;
 
+    case XEN_DOMCTL_sendtrigger:
+    {
+        struct domain *d;
+        struct vcpu *v;
+
+        ret = -ESRCH;
+        if ( (d = rcu_lock_domain_by_id(domctl->domain)) == NULL )
+            break;
+
+        ret = -EINVAL;
+        if ( domctl->u.sendtrigger.vcpu >= MAX_VIRT_CPUS )
+            goto sendtrigger_out;
+
+        ret = -ESRCH;
+        if ( (v = d->vcpu[domctl->u.sendtrigger.vcpu]) == NULL )
+            goto sendtrigger_out;
+
+        switch ( domctl->u.sendtrigger.trigger )
+        {
+        case XEN_DOMCTL_SENDTRIGGER_NMI:
+        {
+            ret = -ENOSYS;
+            if ( !is_hvm_domain(d) )
+                break;
+
+            ret = 0;
+            if ( !test_and_set_bool(v->arch.hvm_vcpu.nmi_pending) )
+                vcpu_kick(v);
+        }
+        break;
+
+        default:
+            ret = -ENOSYS;
+        }
+
+    sendtrigger_out:
+        rcu_unlock_domain(d);
+    }
+    break;
+
     default:
         ret = -ENOSYS;
         break;

_______________________________________________
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] Implement domctl_sendtrigger_nmi for x86 hvm., Xen patchbot-unstable <=