WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 08 of 24] xenpaging: compare both token and path when

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 08 of 24] xenpaging: compare both token and path when checking for @releaseDomain event
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Mon, 03 Oct 2011 17:54:45 +0200
Delivery-date: Mon, 03 Oct 2011 09:19:49 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1317657296; l=1278; s=domk; d=aepfle.de; h=To:From:Date:References:In-Reply-To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:X-RZG-CLASS-ID: X-RZG-AUTH; bh=Yu/RKCxOsl96CF/6TC0D6P2YoQE=; b=RqrsTY20m7slh2845lbXUwvFEuGbeYdEqpUZA9F0t63qM6KlUt5DZn51PgGv3KGV0Et Uxvk3ZRRBZp0MSfFUmNRiWgsAICp0XIRqaL72Ile68GbMIpJ7X75HViCPiAIFl7h60dXm ne8uNDAUHLl0+WCGia4Dg7uk4y+QeyANEsI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1317657277@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1317657277@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.7.5
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1317653604 -7200
# Node ID 87cc0a717a5edc87411295ad0d5cf0b3366da0d3
# Parent  02453d6279baad46b1388267639892feaf6d56af
xenpaging: compare both token and path when checking for @releaseDomain event

Subsequent patches will use xenstored to store the numbers of pages
xenpaging is suppose to page-out. A domain_id value could be
misinterpreted as number of pages. Compare both path and token to
recognize the @releaseDomain event.

Also add debug output to show received watch event.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 02453d6279ba -r 87cc0a717a5e tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -101,7 +101,8 @@ static int xenpaging_wait_for_event_or_t
         vec = xs_read_watch(paging->xs_handle, &num);
         if ( vec )
         {
-            if ( strcmp(vec[XS_WATCH_TOKEN], watch_token) == 0 )
+            DPRINTF("path '%s' token '%s'\n", vec[XS_WATCH_PATH], 
vec[XS_WATCH_TOKEN]);
+            if ( strcmp(vec[XS_WATCH_PATH], "@releaseDomain") == 0 && 
strcmp(vec[XS_WATCH_TOKEN], watch_token) == 0 )
             {
                 /* If our guest disappeared, set interrupt flag and fall 
through */
                 if ( xs_is_domain_introduced(paging->xs_handle, 
paging->mem_event.domain_id) == false )

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>