VHE: Fix mm defrag to account for el0 partition's.
This patch adds helper APIs to defrag a partition's page tables that
works on both EL0 partitions and for VMs. Also updated all code using
the mm_vm_defrag API directly to use the newly added vm_ptable_defrag so
that defrag works for EL0 partitions as well.
Change-Id: I93d0d9a2b93e791836561aa813f20a9a65017243
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
diff --git a/src/api.c b/src/api.c
index d08e3f8..a32fae0 100644
--- a/src/api.c
+++ b/src/api.c
@@ -1016,7 +1016,7 @@
local_page_pool, NULL)) {
/* TODO: partial defrag of failed range. */
/* Recover any memory consumed in failed mapping. */
- mm_vm_defrag(&vm_locked.vm->ptable, local_page_pool);
+ vm_ptable_defrag(vm_locked, local_page_pool);
goto fail_undo_send;
}