KVM: s390: Introducing kvm_arch_set_irq_inatomic Fast Inject
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v10 Latest3 patches 1 replyIn review
- v93 patches 4 repliesSuperseded
- v83 patches 3 repliesSuperseded
Earlier versions · 7
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v7 | 3 patches | 3 replies | Superseded | |
| v6 | 4 patches | 2 replies | Superseded | |
| v5 | 4 patches | 8 replies | Superseded | |
| v4 | 3 patches | 7 replies | Superseded | |
| v3 | 3 patches | 6 replies | Superseded | |
| v2 | 3 patches | 7 replies | Superseded | |
| v1 | 3 patches | 10 replies | Superseded |
Patches in v10 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | KVM: s390: Add map/unmap ioctl and clean mappings post-guestarch/ arch/ arch/ +1 more | +194 | 0 replies | |
| 2/3 | KVM: s390: Enable adapter_indicators_set to use mapped pagesarch/ | +63 | 0 replies | |
| 3/3 | KVM: s390: Introducing kvm_arch_set_irq_inatomic fast injectarch/ arch/ arch/ +2 more | +241 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Matthew Rosato | Claudio Imbrenda |
|---|---|---|
| Series | A-b | |
| 1/3 | R-b | |
| 2/3 | R-b | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v10 0/3] KVM: s390: Introducing kvm_arch_set_irq_inatomic Fast Inject
s390 needs this series of three patches in order to enable a non-blocking path for irqfd injection on s390 via kvm_arch_set_irq_inatomic(). Before these changes, kvm_arch_set_irq_inatomic() would just return -EWOULDBLOCK and place all interrupts on the global work queue, which must subsequently be processed by a different thread. This series of patches implements an s390 version of inatomic and is relevant to virtio-blk and virtio-net and was tested against virtio-pci and virtio-ccw.
The inatomic fast path cannot lose control since it is running with interrupts disabled. This meant making the following changes that exist on the slow path today. First, the adapter_indicators page needs to be mapped since it is accessed with interrupts disabled, so we added map/unmap functions. Second, access to shared resources between the fast and slow paths needed to be changed from mutex and semaphores to spin_lock's. Finally, the memory allocation on the slow path utilizes GFP_KERNEL_ACCOUNT but we had to implement the fast path with GFP_ATOMIC allocation. Each of these enhancements were required to prevent blocking on the fast inject path.
s390 doesn't support a PREEMPT_RT kernel and this patch doesn't either. Given this fact, we are not using raw_spin_lock instead we are using regular spin_lock.
Statistical counters have been added to enable analysis of irq injection on the fast path and slow path including io_390_inatomic, io_flic_inject_airq, io_set_adapter_int and io_390_inatomic_no_inject. And
counters have been added to analyze map/unmap of the adapter_indicator pages in non-Secure Execution environments and to track fencing of Fast Inject in Secure Execution environments. In order to take advantage of this kernel series with virtio-pci, a QEMU that includes the 's390x/pci: set kvm_msi_via_irqfd_allowed' fix is needed. Additionally, the guest xml needs a thread pool and threads explicitly assigned per disk device using the common way of defining threads for disks.
Patch 1 enables map/unmap of adapter indicator pages but for Secure Execution environments it avoids the long term mapping.
v9->v10: Streamline logic in register_io_adapter()
Douglas Freimuth (3):
KVM: s390: Add map/unmap ioctl and clean mappings post-guest
KVM: s390: Enable adapter_indicators_set to use mapped pages
KVM: s390: Introducing kvm_arch_set_irq_inatomic fast inject
arch/s390/include/asm/kvm_host.h | 11 +- arch/s390/kvm/intercept.c | 5 +- arch/s390/kvm/interrupt.c | 559 ++++++++++++++++++++++++------- arch/s390/kvm/kvm-s390.c | 30 +- arch/s390/kvm/kvm-s390.h | 5 +- 5 files changed, 488 insertions(+), 122 deletions(-)
Signature · 1 line
2.54.0