aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/nmi.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-12-01 14:02:00 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-12-01 14:02:00 +0000
commit95b697252f765f9433c45f7115ed9ce0abcbf170 (patch)
tree20d54c39a5b0fe47b65e9c5f94382faa3f7bfc37 /xen/arch/x86/nmi.c
parent22b984ae9a41041ecbab3eb487de75e3f1ffb592 (diff)
downloadxen-95b697252f765f9433c45f7115ed9ce0abcbf170.tar.gz
xen-95b697252f765f9433c45f7115ed9ce0abcbf170.tar.bz2
xen-95b697252f765f9433c45f7115ed9ce0abcbf170.zip
x86: fix MCE/NMI injection
This attempts to address all the concerns raised in http://lists.xensource.com/archives/html/xen-devel/2009-11/msg01195.html, but I'm nevertheless still not convinced that all aspects of the injection handling really work reliably. In particular, while the patch here on top of the fixes for the problems menioned in the referenced mail also adds code to keep send_guest_trap() from injecting multiple events at a time, I don't think the is the right mechanism - it should be possible to handle NMI/MCE nested within each other. Another fix on top of the ones for the earlier described problems is that the vCPU affinity restore logic didn't account for software injected NMIs - these never set cpu_affinity_tmp, but due to it most likely being different from cpu_affinity it would have got restored (to a potentially random value) nevertheless. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/nmi.c')
-rw-r--r--xen/arch/x86/nmi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c
index 7400442433..759c0f6c77 100644
--- a/xen/arch/x86/nmi.c
+++ b/xen/arch/x86/nmi.c
@@ -475,10 +475,11 @@ static void do_nmi_stats(unsigned char key)
((v = d->vcpu[0]) == NULL) )
return;
- if ( v->nmi_pending || (v->trap_priority >= VCPU_TRAP_NMI) )
+ i = v->async_exception_mask & (1 << VCPU_TRAP_NMI);
+ if ( v->nmi_pending || i )
printk("dom0 vpu0: NMI %s%s\n",
v->nmi_pending ? "pending " : "",
- (v->trap_priority >= VCPU_TRAP_NMI) ? "masked " : "");
+ i ? "masked " : "");
else
printk("dom0 vcpu0: NMI neither pending nor masked\n");
}