mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-02-22 07:53:58 +00:00
515.86.01
This commit is contained in:
@@ -133,10 +133,10 @@ nvidia_vma_access(
|
||||
pageOffset = (addr & ~PAGE_MASK);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (length < 0)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
if (!mmap_context->valid)
|
||||
@@ -217,8 +217,19 @@ static vm_fault_t nvidia_fault(
|
||||
|
||||
NvU64 page;
|
||||
NvU64 num_pages = NV_VMA_SIZE(vma) >> PAGE_SHIFT;
|
||||
NvU64 pfn_start =
|
||||
(nvlfp->mmap_context.mmap_start >> PAGE_SHIFT) + vma->vm_pgoff;
|
||||
|
||||
NvU64 pfn_start = (nvlfp->mmap_context.mmap_start >> PAGE_SHIFT);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (vma->vm_pgoff != 0)
|
||||
{
|
||||
return VM_FAULT_SIGBUS;
|
||||
}
|
||||
|
||||
|
||||
// Mapping revocation is only supported for GPU mappings.
|
||||
if (NV_IS_CTL_DEVICE(nv))
|
||||
@@ -490,6 +501,13 @@ int nvidia_mmap_helper(
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
if (vma->vm_pgoff != 0)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
NV_PRINT_VMA(NV_DBG_MEMINFO, vma);
|
||||
|
||||
status = nv_check_gpu_state(nv);
|
||||
@@ -517,11 +535,11 @@ int nvidia_mmap_helper(
|
||||
NvU64 access_len = mmap_context->access_size;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// validate the size
|
||||
if (NV_VMA_SIZE(vma) != mmap_length)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
if (IS_REG_OFFSET(nv, access_start, access_len))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user