Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e118cf9 authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu
Browse files

adsprpc: hyp assign only for valid VMIDs



During fastrpc process init, do hyp_assign_phys only if the VMID is
valid

Change-Id: Idf475916c869efd3c67cce1323d106236d460876
Acked-by: default avatarThyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent 4875db87
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -1808,17 +1808,20 @@ static int fastrpc_init_process(struct fastrpc_file *fl,
				goto bail;
			phys = mem->phys;
			size = mem->size;
			VERIFY(err, !hyp_assign_phys(phys, (uint64_t)size,
				hlosvm, 1, me->channel[fl->cid].rhvm.vmid,
			if (me->channel[fl->cid].rhvm.vmid) {
				VERIFY(err, !hyp_assign_phys(phys,
					(uint64_t)size, hlosvm, 1,
					me->channel[fl->cid].rhvm.vmid,
					me->channel[fl->cid].rhvm.vmperm,
					me->channel[fl->cid].rhvm.vmcount));
				if (err) {
					pr_err("ADSPRPC: hyp_assign_phys fail err %d",
								 err);
				pr_err("map->phys %llx, map->size %d\n",
					pr_err("map->phys 0x%llx, map->size %d\n",
							 phys, (int)size);
					goto bail;
				}
			}
			me->staticpd_flags = 1;
		}