diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-06-07 17:51:18 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-07-05 14:41:26 +0200 |
commit | add6a0cd1c5ba51b201e1361b05a5df817083618 (patch) | |
tree | deda6470d77bbc8b478f4d508927754e8ff38e42 /mm | |
parent | KVM: MMU: prepare to support mapping of VM_IO and VM_PFNMAP frames (diff) | |
download | linux-add6a0cd1c5ba51b201e1361b05a5df817083618.tar.xz linux-add6a0cd1c5ba51b201e1361b05a5df817083618.zip |
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/gup.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -720,6 +720,7 @@ retry: } return 0; } +EXPORT_SYMBOL_GPL(fixup_user_fault); static __always_inline long __get_user_pages_locked(struct task_struct *tsk, struct mm_struct *mm, |