]> 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>
Sun, 21 Nov 2021 12:40:03 +0000 (12:40 +0000)
commit5ad923ae3b973fe83d39117f6b8edf9eef77ee6c
treed6cd64c113fa782ecdeb719abf0326d83c801ce6
parentf391e4a8ae02de4173b64abab7fe34e1d3cee367
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.

Add a 'verbose' mode to xen_shinfo_test while adding test cases for this.

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