a11cb2a633
child process clone vm objects from svm->apertures if parent process doesn't free memory before fork. fmm_clear_all_mem suppose to clear the apertures in forked child process but this only works if gpu_vm is not NULL. parent process call hsaKmtCloseKFD reset gpu_vm to NULL and then fork, then child process will not clear svm->apertures. As a result, the child process will allocate vm object with same address and add to aperture, there are duplicate vm objects with same address in aperture. Then mapping to GPU will find the wrong vm object and create incorrect GPU mapping cause rocrtst IPC test VM fault. The issue happened with HSA_USERPTR_FOR_PAGED_MEM=1. The fix is to clear vm objects in all apertures in clear_after_fork. Change-Id: I92e42a967075a634a3f475b915c8242d82077ecb Signed-off-by: Philip Yang <Philip.Yang@amd.com>