Add VIRQ support and handle the basic ops to support event
channels: bind, unmask, close, status.
For now we only implement the 2 level ABI, which is limited
to 4k event channels on 64-bit or 1k on 32-bit. The basic
mechanism works by setting the shared_info bit array and
setting the port bit to 1 in evtchn_pending. Additionally
we have another word which depicts which groups have pending
ports.
Current implementations of test_and_set/clear_bit() are
non-atomic and because Xen HVM guests (on KVM), a word can be
accessed simultaneously by qemu and the hypervisor (and possibly
guest itself). And thus we need bitops atomic ops. The new header
is ported from what's used on Xen.
Co-developed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>