]> xenbits.xensource.com Git - xen.git/commit
xen/arm: disable the event optimization in the gic
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 17 Jul 2012 16:33:31 +0000 (17:33 +0100)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 17 Jul 2012 16:33:31 +0000 (17:33 +0100)
commit4df76b3e3c638d15e2d920d646c5ba738fb3142b
tree54744330c01cafe5bbca924d221d412548c7c7a4
parent56239ba4f3130317b311eebce3ec46d903e0fba5
xen/arm: disable the event optimization in the gic

Currently we have an optimization in the GIC driver that allows us not
to request maintenance interrupts for Xen events. The basic idea is that
every time we are about to inject a new interrupt or event into a guest,
we check whether we can remove some old event irqs from one or more LRs.
We can do this because we know when a guest finishes processing event
notifications: it sets the evtchn_upcall_pending bit to 0.

However it is unsafe: the guest resets evtchn_upcall_pending before
EOI'ing the event irq, therefore a small window of time exists when Xen
could jump in and remove the event irq from the LR register before the
guest has EOI'ed it.

This is not a good practice according to the GIC manual.
Remove the optimization for now.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/gic.c