xen: ensure that all event channels start off bound to VCPU 0
authorIan Campbell <ian.campbell@citrix.com>
Fri, 8 Oct 2010 15:59:12 +0000 (16:59 +0100)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 22 Oct 2010 19:57:33 +0000 (12:57 -0700)
commitb0097adeec27e30223c989561ab0f7aa60d1fe93
tree279f410614c0b5a7dd7adbc54a8c7c45af81505d
parent403a85ff001710bb92689790b9a5c1c80e4b37a6
xen: ensure that all event channels start off bound to VCPU 0

All event channels startbound to VCPU 0 so ensure that cpu_evtchn_mask
is initialised to reflect this. Otherwise there is a race after registering an
event channel but before the affinity is explicitly set where the event channel
can be delivered. If this happens then the event channel remains pending in the
L1 (evtchn_pending) array but is cleared in L2 (evtchn_pending_sel), this means
the event channel cannot be reraised until another event channel happens to
trigger the same L2 entry on that VCPU.

sizeof(cpu_evtchn_mask(0))==sizeof(unsigned long*) which is not correct, and
causes only the first 32 or 64 event channels (depending on architecture) to be
initially bound to VCPU0. Use sizeof(struct cpu_evtchn_s) instead.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: stable@kernel.org
drivers/xen/events.c
This page took 0.028881 seconds and 5 git commands to generate.