|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Reassert nmi pending when a nmi handler is registered
# 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 <=
|
|
|
|
|