OpenCloudOS-Kernel/arch/x86/xen
Jeremy Fitzhardinge 04c44a080d xen: fix RMW when unmasking events
xen_irq_enable_direct and xen_sysexit were using "andw $0x00ff,
XEN_vcpu_info_pending(vcpu)" to unmask events and test for pending ones
in one instuction.

Unfortunately, the pending flag must be modified with a locked operation
since it can be set by another CPU, and the unlocked form of this
operation was causing the pending flag to get lost, allowing the processor
to return to usermode with pending events and ultimately deadlock.

The simple fix would be to make it a locked operation, but that's rather
costly and unnecessary.  The fix here is to split the mask-clearing and
pending-testing into two instructions; the interrupt window between
them is of no concern because either way pending or new events will
be processed.

This should fix lingering bugs in using direct vcpu structure access too.

[ Stable: needed in 2.6.24.x ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Stable <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-03-27 16:08:45 +01:00
..
Kconfig x86: remove depends on X86_32 from PARAVIRT & PARAVIRT_GUEST 2008-01-30 13:33:32 +01:00
Makefile i386: move xen 2007-10-11 11:16:51 +02:00
enlighten.c xen: fix RMW when unmasking events 2008-03-27 16:08:45 +01:00
events.c x86: remove all definitions with fastcall 2008-01-30 13:31:17 +01:00
features.c i386: move xen 2007-10-11 11:16:51 +02:00
manage.c i386: move xen 2007-10-11 11:16:51 +02:00
mmu.c x86: sparse warnings in pageattr.c 2008-02-09 23:24:08 +01:00
mmu.h i386: move xen 2007-10-11 11:16:51 +02:00
multicalls.c xen: add some debug output for failed multicalls 2007-10-16 11:51:31 -07:00
multicalls.h xen: add batch completion callbacks 2007-10-16 11:51:30 -07:00
setup.c x86/xen: fix DomU boot problem 2008-03-04 17:10:12 +01:00
smp.c x86: use generic register name in the thread and tss structures 2008-01-30 13:31:02 +01:00
time.c x86: fix sparse warning in xen/time.c 2008-02-09 23:24:08 +01:00
vdso.h i386: move xen 2007-10-11 11:16:51 +02:00
xen-asm.S xen: fix RMW when unmasking events 2008-03-27 16:08:45 +01:00
xen-head.S xen: fix section usage in xen-head.S and setup.c 2008-01-30 13:33:25 +01:00
xen-ops.h xen: deal with stale cr3 values when unpinning pagetables 2007-10-16 11:51:30 -07:00