A series of three commits stemming from the interaction between how
indicies are best handled in C, versus the event channel API used by Xen.
One test line was wrong. The result would be an overflow under some
hard to produce conditions (not believed possible for attack), fix this.
I've concluded is_valid_evtchn() was serving to obscure, rather than
isolating anything useful. As such remove this macro.
There was some inconsistency when clearing xenisrc structures. Now
use ~0 which is guaranteed invalid, instead of 0 which is reserved //not//
invalid. Also clean up one spot not using the proper variable when
accessing xen_intr_port_to_isrc[].
evtchn_cpu_mask_port()/evtchn_cpu_unmask_port() were misnamed as
they're part of the interrupt code, not the event channel code.
This is actually 3 commits being submitted as one, since they're closely
related and were kind of small by themselves. There is room for
separate resubmission, or potentially they could be squashed on commit.