* Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
Alok Kataria wrote:
As it affects only VMI, instead of adding another callback, i haveI'd forgotten that I'd already added pgd_alloc/pgd_free. So, yes, just use pgd_free.
hooked on the paravirt_pgd_free call for vmi to release the pgd page.
Below is the patch. I will run some overnight tests with this patch and
get back if there are any errors.
Can i take that as an Acked-by?
/*Its hardly a hack to use a hook for exactly its intended purpose...
+ * We hack the pgd_free hook for releasing the pgd page.
+ */
+static void vmi_pgd_free(struct mm_struct *mm, pgd_t *pgd)
+{
+ unsigned long pfn = __pa(pgd) >> PAGE_SHIFT;
+
+ vmi_ops.release_page(pfn, VMI_PAGE_L2);
+}
+