Skip to content
Commit add6a0cd authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

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: default avatarNeo Jia <cjia@nvidia.com>
Reported-by: default avatarKirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 92176a8e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment