mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Radim Krčmář <[email protected]> Tested-by: Neo Jia <[email protected]> Reported-by: Kirti Wankhede <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
This commit is contained in:
parent
92176a8ede
commit
add6a0cd1c
2 changed files with 43 additions and 3 deletions
1
mm/gup.c
1
mm/gup.c
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue