]> www.infradead.org Git - users/dwmw2/qemu.git/commit
i386/xen: evtchn VIRQ support
authorJoao Martins <joao.m.martins@oracle.com>
Tue, 21 Aug 2018 16:14:20 +0000 (12:14 -0400)
committerJoao Martins <joao.m.martins@oracle.com>
Tue, 19 Feb 2019 14:00:57 +0000 (09:00 -0500)
commitec9cfbba5dd531c9afeb473f99fafbe5cb5e9570
tree8b42fe182b839bb7baa1753582200f37d205e98c
parent48be5632de138720fa16436b60ea86a9f404cd4a
i386/xen: evtchn VIRQ support

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>
include/standard-headers/asm-x86/atomic_bitops.h [new file with mode: 0644]
target/i386/Makefile.objs
target/i386/xen-proto.h
target/i386/xen.c
target/i386/xen.h
target/i386/xen_evtchn.c [new file with mode: 0644]
target/i386/xen_evtchn.h [new file with mode: 0644]