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] Reassert nmi pending when a nmi handler is registered

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Reassert nmi pending when a nmi handler is registered
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Jan 2006 21:36:11 +0000
Delivery-date: Wed, 11 Jan 2006 21:43:38 +0000
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/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 6ccee759e34f639cf865411b52013cfc18907c39
# Parent  57c50578414ddabd8064b12826fc13c2a2ed1706
Reassert nmi pending when a nmi handler is registered
if we lost a previous nmi.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 57c50578414d -r 6ccee759e34f xen/common/kernel.c
--- a/xen/common/kernel.c       Wed Jan 11 18:18:21 2006
+++ b/xen/common/kernel.c       Wed Jan 11 18:24:43 2006
@@ -151,19 +151,32 @@
 
 long do_nmi_op(unsigned int cmd, void *arg)
 {
+    struct vcpu *v = current;
+    struct domain *d = current->domain;
     long rc = 0;
 
     switch ( cmd )
     {
     case XENNMI_register_callback:
-        if ( (current->domain->domain_id != 0) || (current->vcpu_id != 0) )
-            rc = -EINVAL;
+        if ( (d->domain_id != 0) || (v->vcpu_id != 0) )
+        { 
+           rc = -EINVAL;
+        }
         else
-            current->nmi_addr = (unsigned long)arg;
-        printk("***** NMI handler at 0x%lx\n", current->nmi_addr);
+        {
+            v->nmi_addr = (unsigned long)arg;
+#ifdef CONFIG_X86
+            /*
+             * If no handler was registered we can 'lose the NMI edge'.
+             * Re-assert it now.
+             */
+            if ( d->shared_info->arch.nmi_reason != 0 )
+                set_bit(_VCPUF_nmi_pending, &v->vcpu_flags);
+#endif
+        }
         break;
     case XENNMI_unregister_callback:
-        current->nmi_addr = 0;
+        v->nmi_addr = 0;
         break;
     default:
         rc = -ENOSYS;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Reassert nmi pending when a nmi handler is registered, Xen patchbot -unstable <=