msm: secure_buffer: Update the hyp_assign_phys() api

The hyp_assign_phys() api can be called by different
usecases where it is not guaranteed that the source vm is
always VMID_HLOS.

Pass the responsibility of setting the source_vm to
caller of the function.

Change-Id: I3851a6681f49d4bb6fa5b7a889a16a158497e9e6
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
diff --git a/drivers/soc/qcom/secure_buffer.c b/drivers/soc/qcom/secure_buffer.c
index 9543d13..474d9eb 100644
--- a/drivers/soc/qcom/secure_buffer.c
+++ b/drivers/soc/qcom/secure_buffer.c
@@ -319,12 +319,11 @@
 	return ret;
 }
 
-int hyp_assign_phys(phys_addr_t addr, u64 size,
-			int *dest_vmids, int *dest_perms,
-			int dest_nelems)
+int hyp_assign_phys(phys_addr_t addr, u64 size, u32 *source_vm_list,
+			int source_nelems, int *dest_vmids,
+			int *dest_perms, int dest_nelems)
 {
 	struct sg_table *table;
-	u32 source_vm;
 	int ret;
 
 	table = kzalloc(sizeof(struct sg_table), GFP_KERNEL);
@@ -336,9 +335,7 @@
 
 	sg_set_page(table->sgl, phys_to_page(addr), size, 0);
 
-	source_vm = VMID_HLOS;
-
-	ret = hyp_assign_table(table, &source_vm, 1, dest_vmids,
+	ret = hyp_assign_table(table, source_vm_list, source_nelems, dest_vmids,
 						dest_perms, dest_nelems);
 	if (ret)
 		goto err2;