linux/Documentation/virt/kvm/devices
Jaehoon Kim 9972befc3e KVM: s390: Fall back to short-term pinning in MAP ioctl
FOLL_LONGTERM pinning fails for some memory types, such as file-backed
guest memory. As a result, kvm_s390_adapter_map() returns -EINVAL and
irqfd adapter registration fails even though interrupt delivery could
still work via the existing non-atomic path.

When FOLL_LONGTERM pinning fails, verify that the page is accessible
using a short-term pin instead. If the short-term pin succeeds, unpin
the page and add a map entry with pinned=false to preserve MAP/UNMAP
symmetry. The non-atomic irqfd path already performs short-term pinning
for interrupt delivery, so this restores the previous behavior for
memory that cannot be pinned long-term.

get_map_info() is updated to return NULL for unpinned entries so that
the atomic irqfd fast path falls back to the non-atomic path.
kvm_s390_adapter_unmap() and kvm_s390_unmap_all_adapters() skip dirty
marking and unpin for unpinned entries.

Update Documentation/virt/kvm/devices/s390_flic.rst to reflect the
new MAP/UNMAP behavior.

Fixes: c9a5688380 ("KVM: s390: Add map/unmap ioctl and clean mappings post-guest")
Signed-off-by: Jaehoon Kim <jhkim@linux.ibm.com>
Reviewed-by: Douglas Freimuth <freimuth@linux.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
2026-07-27 09:23:53 +02:00
..
arm-vgic-its.rst KVM: arm64: Document ordering requirements for irqbypass 2025-02-26 13:22:49 -08:00
arm-vgic-v3.rst Documentation: KVM: Update GICv3 docs for GICv5 hosts 2025-10-13 14:40:58 +01:00
arm-vgic-v5.rst Documentation: KVM: Fix typos in VGICv5 documentation 2026-05-23 15:07:41 +01:00
arm-vgic.rst KVM: Documentation: Correct the VGIC V2 CPU interface addr space size 2024-06-28 22:00:24 +00:00
index.rst Documentation: KVM: Introduce documentation for VGICv5 2026-03-19 18:21:29 +00:00
mpic.rst docs: kvm: convert devices/mpic.txt to ReST 2020-02-12 20:09:54 +01:00
README
s390_flic.rst KVM: s390: Fall back to short-term pinning in MAP ioctl 2026-07-27 09:23:53 +02:00
vcpu.rst Documentation: KVM: Clarify that PMU_V3_IRQ IntID requirements for GICv5 2026-05-23 15:07:41 +01:00
vfio.rst kvm/vfio: Accept vfio device file from userspace 2023-07-25 10:18:42 -06:00
vm.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
xics.rst kvm: rename KVM_MAX_VCPU_ID to KVM_MAX_VCPU_IDS 2021-09-30 04:27:05 -04:00
xive.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00

This directory contains specific device bindings for KVM_CAP_DEVICE_CTRL.