[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] x86/mm/paging: Prevent the guest from faulting on the same gfn when dying


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
  • Date: Mon, 12 Mar 2012 11:39:41 -0400
  • Cc: andres@xxxxxxxxxxxxxx, tim@xxxxxxx, olaf@xxxxxxxxx, adin@xxxxxxxxxxxxxx
  • Delivery-date: Mon, 12 Mar 2012 15:37:43 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=lagarcavilla.org; h=content-type :mime-version:content-transfer-encoding:subject:message-id:date :from:to:cc; q=dns; s=lagarcavilla.org; b=t6LJAC55YnubRODkymhn83 WUge2FcdSjGNQtmRhyRBpzhbVHW4ys1EsY1VhVE5/V8VRymO54j7qFjtQjVDVaoG VqGKoYjWqBHmXbM23UkGsGjDyY1YSQzekQMV0Ve8vmmRpFnIMIYcocv1sfAuYSx9 k7rcAR1zrDxt9IVZyTLUo=
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

 xen/arch/x86/mm/p2m.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


A crashing guest due to paging may hit an "endless" loop faulting repeatedly on
the current paged-out gfn, until the toolstack comes around to killing the
domain.

Unfortunately domain_crash at this point may not pause the vcpu due to the
shutting_down flag, so we pause it explicitly when detecting the condition.

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>

diff -r dfbcb092aa66 -r 0fe4b3326167 xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -988,6 +988,8 @@ void p2m_mem_paging_populate(struct doma
     {
         gdprintk(XENLOG_ERR, "Domain %hu paging gfn %lx yet no ring "
                              "in place\n", d->domain_id, gfn);
+        /* Prevent the vcpu from faulting repeatedly on the same gfn */
+        vcpu_pause_nosync(v);
         domain_crash(d);
         return;
     }

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.