gpu: nvgpu: Add IOCTL flag + plumbing for unified VAs

Add a flag that let's userspace enable the unified VM functionality
on a selective bassis. This feature is working for all cases except
a single MODS trace. This will allow test coverage to be selectively
added in certain userspace tests as well to help prevent this feature
from bit rotting (as it has historically done).

Also update the unit test for the page table management in the GMMU
to reflect this new flag. It's been set to false since the target
platform for safety is currently not using unified address spaces.

Bug 200438879

Change-Id: Ibe005472910d1668e8372754be8dd792773f9d8c
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1951864
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Alex Waterman
2018-11-15 13:32:46 -08:00
committed by mobile promotions
parent b361c38bca
commit fc939e5fb6
10 changed files with 29 additions and 14 deletions

View File

@@ -99,7 +99,7 @@ u32 nvgpu_vm_get_pte_size(struct vm_gk20a *vm, u64 base, u64 size)
return GMMU_PAGE_SIZE_SMALL;
}
if (!nvgpu_is_enabled(g, NVGPU_MM_UNIFY_ADDRESS_SPACES)) {
if (!vm->unified_va) {
return nvgpu_vm_get_pte_size_split_addr(vm, base, size);
}
@@ -237,6 +237,7 @@ static int nvgpu_init_system_vm(struct mm_gk20a *mm)
aperture_size,
true,
false,
false,
"system");
if (mm->pmu.vm == NULL) {
return -ENOMEM;
@@ -279,7 +280,7 @@ static int nvgpu_init_cde_vm(struct mm_gk20a *mm)
U64(big_page_size) << U64(10),
NV_MM_DEFAULT_KERNEL_SIZE,
NV_MM_DEFAULT_KERNEL_SIZE + NV_MM_DEFAULT_USER_SIZE,
false, false, "cde");
false, false, false, "cde");
if (mm->cde.vm == NULL) {
return -ENOMEM;
}
@@ -295,7 +296,7 @@ static int nvgpu_init_ce_vm(struct mm_gk20a *mm)
U64(big_page_size) << U64(10),
NV_MM_DEFAULT_KERNEL_SIZE,
NV_MM_DEFAULT_KERNEL_SIZE + NV_MM_DEFAULT_USER_SIZE,
false, false, "ce");
false, false, false, "ce");
if (mm->ce.vm == NULL) {
return -ENOMEM;
}
@@ -389,7 +390,7 @@ static int nvgpu_init_bar1_vm(struct mm_gk20a *mm)
SZ_64K,
mm->bar1.aperture_size - SZ_64K,
mm->bar1.aperture_size,
true, false,
true, false, false,
"bar1");
if (mm->bar1.vm == NULL) {
return -ENOMEM;