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-devel

[Xen-devel] [PATCH]Implement domctl_sendtrigger_nmi for x86 hvm

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH]Implement domctl_sendtrigger_nmi for x86 hvm
From: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
Date: Fri, 13 Jul 2007 11:09:16 +0900
Delivery-date: Thu, 12 Jul 2007 19:06:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.0 (Windows/20070326)
Hi there,

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]'.

Regards,
-------------------
Yosuke Iwamatsu
        NEC Corporation

# HG changeset patch
# User Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
# Date 1184291863 -32400
# Node ID aa538b0b8a496fee48a1c75ae0bec78ea7f31dfc
# Parent  1f348e70a5affdea9b44c1e39cd5ef094ad4a0bf
Implement DOMCTL_SENDTRIGGER_NMI for x86 hvm

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>

diff -r 1f348e70a5af -r aa538b0b8a49 xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Tue Jul 10 11:10:38 2007 +0100
+++ b/xen/arch/x86/domctl.c     Fri Jul 13 10:57:43 2007 +0900
@@ -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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH]Implement domctl_sendtrigger_nmi for x86 hvm, Yosuke Iwamatsu <=