]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and event channel delivery
authorDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 28 Oct 2021 22:10:31 +0000 (23:10 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Sat, 20 Nov 2021 10:23:24 +0000 (10:23 +0000)
commit4272bcbca5025f08871c3b6823b6ad15e7990f98
treeefa186a92eeaed849c453a3674e90390bc2bed16
parentc5f21e17ec51a51a0bca256a6ed454a6e367e9d0
KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and event channel delivery

This adds basic support for delivering 2 level event channels to a guest.

Initially, it only supports delivery via the IRQ routing table, triggered
by an eventfd. In order to do so, it has a kvm_xen_set_evtchn_fast()
function which will use the pre-mapped shared_info page if it already
exists and is still valid, while the slow path through the irqfd_inject
workqueue will remap the shared_info page if necessary.

It sets the bits in the shared_info page but not the vcpu_info; that is
deferred to __kvm_xen_has_interrupt() which raises the vector to the
appropriate vCPU.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Documentation/virt/kvm/api.rst
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/irq_comm.c
arch/x86/kvm/x86.c
arch/x86/kvm/xen.c
arch/x86/kvm/xen.h
include/linux/kvm_host.h
include/uapi/linux/kvm.h
tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c