Hi,

At 13:36 +0100 on 05 Aug (1438781760), Andrew Cooper wrote:
> From: Anshul Makkar <anshul.mak...@citrix.com>
> 
> A domain with sufficient shadow allocation can cause a watchdog timeout
> during domain destruction.  Expand the existing -ERESTART logic in
> paging_teardown() to allow {hap/sh}_set_allocation() to become
> restartable during the DOMCTL_destroydomain hypercall.
> 
> Signed-off-by: Anshul Makkar <anshul.mak...@citrix.com>
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

Good catch, thanks.

> @@ -3139,7 +3139,9 @@ void shadow_teardown(struct domain *d)
>                         d->arch.paging.shadow.free_pages,
>                         d->arch.paging.shadow.p2m_pages);
>          /* Destroy all the shadows and release memory to domheap */
> -        sh_set_allocation(d, 0, NULL);
> +        sh_set_allocation(d, 0, preempted);
> +        if ( preempted && *preempted )
> +            goto out;
>          /* Release the hash table back to xenheap */
>          if (d->arch.paging.shadow.hash_table)
>              shadow_hash_teardown(d);

If the debug printout just above this is ever enabled, it will get
very loud since the printout will make preemption likely.  Please just
delete the SHADOW_PRINTK above; you can also delete the one below if
you like.  The HAP side looks like it needs the same adjustment.

With that done, Reviewed-by: Tim Deegan <t...@xen.org>

Cheers,

Tim.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to