xen/21926-x86-pv-NMI-inject.patch

44 lines
1.4 KiB
Diff
Raw Normal View History

# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1281015674 -3600
# Node ID 6f07d9ac1e7cd145fb2770bb11655ac1161b58da
# Parent 8992134dcfd0b9e1e86f4111e68a8aa48bd33c3c
x86: Fix NMI injection to PV guests
References: bnc#625520
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
--- a/xen/arch/x86/x86_32/entry.S
+++ b/xen/arch/x86/x86_32/entry.S
@@ -275,7 +275,7 @@ process_mce:
ALIGN
/* %ebx: struct vcpu */
process_nmi:
- cmpw $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%ebx)
+ testb $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%ebx)
jnz test_guest_events
sti
movb $0,VCPU_nmi_pending(%ebx)
--- a/xen/arch/x86/x86_64/compat/entry.S
+++ b/xen/arch/x86/x86_64/compat/entry.S
@@ -148,7 +148,7 @@ compat_process_mce:
ALIGN
/* %rbx: struct vcpu */
compat_process_nmi:
- cmpw $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx)
+ testb $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx)
jnz compat_test_guest_events
sti
movb $0,VCPU_nmi_pending(%rbx)
--- a/xen/arch/x86/x86_64/entry.S
+++ b/xen/arch/x86/x86_64/entry.S
@@ -250,7 +250,7 @@ process_mce:
ALIGN
/* %rbx: struct vcpu */
process_nmi:
- cmpw $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx)
+ testb $1 << VCPU_TRAP_NMI,VCPU_async_exception_mask(%rbx)
jnz test_guest_events
sti
movb $0,VCPU_nmi_pending(%rbx)