Re: [PATCH 1/1] drm/amdgpu: workaround failed COW checks for Thunk VMAs

2021-07-16 Thread Christian König
Am 15.07.21 um 21:05 schrieb Felix Kuehling: KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings, which causes mmap to fail in ttm_bo_mmap_obj. As a workaround, clear VM_MAYWRITE for PROT_NONE-COW mappings. This should prevent the mapping

[PATCH 1/1] drm/amdgpu: workaround failed COW checks for Thunk VMAs

2021-07-15 Thread Felix Kuehling
KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings, which causes mmap to fail in ttm_bo_mmap_obj. As a workaround, clear VM_MAYWRITE for PROT_NONE-COW mappings. This should prevent the mapping from ever becoming writable and makes is_cow_m