linux/Documentation/virt/kvm/devices
Ulrich Weigand f65470661f KVM: s390/interrupt: do not pin adapter interrupt pages
The adapter interrupt page containing the indicator bits is currently
pinned. That means that a guest with many devices can pin a lot of
memory pages in the host. This also complicates the reference tracking
which is needed for memory management handling of protected virtual
machines. It might also have some strange side effects for madvise
MADV_DONTNEED and other things.

We can simply try to get the userspace page set the bits and free the
page. By storing the userspace address in the irq routing entry instead
of the guest address we can actually avoid many lookups and list walks
so that this variant is very likely not slower.

If userspace messes around with the memory slots the worst thing that
can happen is that we write to some other memory within that process.
As we get the the page with FOLL_WRITE this can also not be used to
write to shared read-only pages.

Signed-off-by: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
[borntraeger@de.ibm.com: patch simplification]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2020-02-27 19:47:10 +01:00
..
README
arm-vgic-its.rst docs: kvm: devices/arm-vgic-its.txt to ReST format 2020-02-12 20:09:51 +01:00
arm-vgic-v3.rst docs: kvm: devices/arm-vgit-v3.txt to ReST 2020-02-12 20:09:52 +01:00
arm-vgic.rst docs: kvm: convert devices/arm-vgit.txt to ReST 2020-02-12 20:09:53 +01:00
index.rst docs: kvm: convert devices/xive.txt to ReST 2020-02-12 20:09:58 +01:00
mpic.rst docs: kvm: convert devices/mpic.txt to ReST 2020-02-12 20:09:54 +01:00
s390_flic.rst KVM: s390/interrupt: do not pin adapter interrupt pages 2020-02-27 19:47:10 +01:00
vcpu.rst docs: kvm: convert devices/vcpu.txt to ReST 2020-02-12 20:09:55 +01:00
vfio.rst docs: kvm: convert devices/vfio.txt to ReST 2020-02-12 20:09:56 +01:00
vm.rst docs: kvm: convert devices/vm.txt to ReST 2020-02-12 20:09:57 +01:00
xics.rst docs: kvm: convert devices/xics.txt to ReST 2020-02-12 20:09:58 +01:00
xive.rst docs: kvm: convert devices/xive.txt to ReST 2020-02-12 20:09:58 +01:00

README

This directory contains specific device bindings for KVM_CAP_DEVICE_CTRL.