Re: [PARAVIRT/x86] BUGFIX: Put a missing paravirt_release_pmd in pgd_dtor

Jeremy Fitzhardinge
2009-02-06T17:01:23Z

Ingo Molnar wrote:
> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>
>
>> Alok Kataria wrote:
>>
>>> As it affects only VMI, instead of adding another callback, i have
>>> 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.
>>>
>>>
>> I'd forgotten that I'd already added pgd_alloc/pgd_free. So, yes, just
>> use pgd_free.
>>
>
> Can i take that as an Acked-by?
>

Yeah. Though:
> /*
> + * We hack the pgd_free hook for releasing the pgd page.
>
Its hardly a hack to use a hook for exactly its intended purpose...
> + */
> +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);
> +}
> +

Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

J