]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: try to fix up page faults before giving up
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Jun 2016 15:51:18 +0000 (17:51 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 5 Jul 2016 12:41:26 +0000 (14:41 +0200)
commitcf2aaeb94b9abadbc0120f54e2947068ae4fa7c1
treededa6470d77bbc8b478f4d508927754e8ff38e42
parent6896f9b284c91a88091d571ef3b2e0f4e24a483c
KVM: MMU: try to fix up page faults before giving up

The vGPU folks would like to trap the first access to a BAR by setting
vm_ops on the VMAs produced by mmap-ing a VFIO device.  The fault handler
then can use remap_pfn_range to place some non-reserved pages in the VMA.

This kind of VM_PFNMAP mapping is not handled by KVM, but follow_pfn
and fixup_user_fault together help supporting it.  The patch also supports
VM_MIXEDMAP vmas where the pfns are not reserved and thus subject to
reference counting.

Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Tested-by: Neo Jia <cjia@nvidia.com>
Reported-by: Kirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
mm/gup.c
virt/kvm/kvm_main.c