android_kernel_google_msm/drivers/xen
David Vrabel b7d2a5e8cf xen/events: mask events when changing their VCPU binding
commit 5e72fdb8d827560893642e85a251d339109a00f4 upstream.

commit 4704fe4f03 upstream.

When a event is being bound to a VCPU there is a window between the
EVTCHNOP_bind_vpcu call and the adjustment of the local per-cpu masks
where an event may be lost.  The hypervisor upcalls the new VCPU but
the kernel thinks that event is still bound to the old VCPU and
ignores it.

There is even a problem when the event is being bound to the same VCPU
as there is a small window beween the clear_bit() and set_bit() calls
in bind_evtchn_to_cpu().  When scanning for pending events, the kernel
may read the bit when it is momentarily clear and ignore the event.

Avoid this by masking the event during the whole bind operation.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
[bwh: Backported to 3.2: remove the BM() cast]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-11 16:10:07 -07:00
..
xen-pciback xen-pciback: rate limit error messages from xen_pcibk_enable_msi{,x}() 2013-06-13 09:45:02 -07:00
xenbus xen/xenbus: Add quirk to deal with misconfigured backends. 2012-04-19 12:45:01 -04:00
xenfs xen: Add xenbus device driver 2011-12-16 13:29:39 -05:00
balloon.c xen/balloon: Avoid OOM when requesting highmem 2011-11-16 12:13:43 -05:00
biomerge.c xen: using EXPORT_SYMBOL requires including export.h 2012-01-18 15:37:49 -08:00
cpu_hotplug.c xen/bootup: During bootup suppress XENBUS: Unable to read cpu state 2012-02-03 16:05:30 -05:00
events.c xen/events: mask events when changing their VCPU binding 2014-03-11 16:10:07 -07:00
evtchn.c xen/evtchn: avoid a deadlock when unbinding an event channel 2013-08-04 16:26:00 +08:00
features.c
gntalloc.c xen-gntalloc: introduce missing kfree 2012-01-03 13:39:04 -05:00
gntdev.c xen/gntdev: don't leak memory from IOCTL_GNTDEV_MAP_GRANT_REF 2012-11-17 13:15:54 -08:00
grant-table.c xen-gnt: prevent adding duplicate gnt callbacks 2013-09-26 17:15:30 -07:00
Kconfig xen/Kconfig: fix Kconfig layout 2012-05-07 12:26:28 -04:00
Makefile xen/acpi-processor: C and P-state driver that uploads said data to hypervisor. 2012-03-14 12:35:42 -04:00
manage.c xen/resume: Fix compile warnings. 2012-04-19 15:12:49 -04:00
pci.c Merge branch 'stable/cleanups-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2011-11-06 20:13:34 -08:00
platform-pci.c xen: initialize platform-pci even if xen_emul_unplug=never 2012-03-22 11:37:11 -04:00
privcmd.c xen/privcmd: Remove unused support for arch specific privcmp mmap 2011-12-16 13:29:42 -05:00
privcmd.h xen: Add privcmd device driver 2011-12-16 13:29:31 -05:00
swiotlb-xen.c xen: Use correct masking in xen_swiotlb_alloc_coherent. 2012-09-14 10:00:33 -07:00
sys-hypervisor.c xen: constify all instances of "struct attribute_group" 2012-03-14 12:34:19 -04:00
tmem.c One tiny feature that accidentally got lost in the initial git pull: 2012-03-24 12:20:25 -07:00
xen-acpi-processor.c xen/acpi: Workaround broken BIOSes exporting non-existing C-states. 2012-04-26 22:07:28 -04:00
xen-balloon.c Features: 2012-03-22 20:16:14 -07:00
xen-selfballoon.c xen: constify all instances of "struct attribute_group" 2012-03-14 12:34:19 -04:00
xencomm.c