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> Message-Id: <20211210163625.2886-5-dwmw2@infradead.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
- Documentation/virt/kvm/api.rst 21 additions, 0 deletionsDocumentation/virt/kvm/api.rst
- arch/x86/include/asm/kvm_host.h 1 addition, 0 deletionsarch/x86/include/asm/kvm_host.h
- arch/x86/kvm/irq_comm.c 12 additions, 0 deletionsarch/x86/kvm/irq_comm.c
- arch/x86/kvm/x86.c 2 additions, 1 deletionarch/x86/kvm/x86.c
- arch/x86/kvm/xen.c 257 additions, 5 deletionsarch/x86/kvm/xen.c
- arch/x86/kvm/xen.h 9 additions, 0 deletionsarch/x86/kvm/xen.h
- include/linux/kvm_host.h 7 additions, 0 deletionsinclude/linux/kvm_host.h
- include/uapi/linux/kvm.h 11 additions, 0 deletionsinclude/uapi/linux/kvm.h
- tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c 183 additions, 1 deletiontools/testing/selftests/kvm/x86_64/xen_shinfo_test.c
Loading
Please register or sign in to comment