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/
Home Products Support Community News


Re: [Xen-devel] Sharing Memory between userspace of dom0 and userspace o

To: "Daniel Stodden" <stodden@xxxxxxxxxx>
Subject: Re: [Xen-devel] Sharing Memory between userspace of dom0 and userspace of domU
From: "Mike Sun" <msun@xxxxxxxxxx>
Date: Tue, 19 Feb 2008 22:05:45 -0500
Cc: Derek.Murray@xxxxxxxxxxxx, Kareem Dana <kareem.dana@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 19 Feb 2008 19:06:11 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=Hgvwgyyjach6FDr8tLR1wEgNp/Lp/4pmn0Zc7lRvHPM=; b=TjDdzfuuaH8kLHTF8cMakIVS4P7qfvR5pUTqjeFCjuNKTtAQZtVyC5xSpwXet+d54ubs0Fyaw8YfzbbH83Puhw38RzxX3sb/Tf/WaEo7tTXOhQYvECXkt3qIIhHHEluT+Sn0LYYFIvqYH5VKEZr7s6RtfwAkGF83iI4ngG52A3c=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=MoTteb6vDFZs3DUS/LWCQMaMg///XOoNsDKHYcb12gNNij1jl65lpIZjxd1g1zIE+6Tlhe53XKDH1fWSf9/dQEdZqkXhYbrwDA8HiXZlGnRiUhWmWyy2tyHb7EX9kB6xlnMdC5DjXhKx7iQWOlHeBJBtBHTgBkXhJLWRD2TgK6E=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1203457713.5870.14.camel@xxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <3bb76bfe0802171554y34d668c9n48adb00a57cd799b@xxxxxxxxxxxxxx> <617dbaa80802180158g7207a21eg5688bbf927434cbb@xxxxxxxxxxxxxx> <e4e579070802190816l6fb073b2hf5408fe3ea10bbfb@xxxxxxxxxxxxxx> <1203440566.12035.31.camel@xxxxxxxxxxxxxxxxxxxx> <e4e579070802191034n6277dd4na53c4cf128525fc8@xxxxxxxxxxxxxx> <1203457713.5870.14.camel@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks Daniel,

> The page type refcount drops to zero when the page isn't linked into the
> page table structure anymore (see the page_info struct definition in the
> Xen source tree for types and refcounts). So the guest just unlinks the
> PT frame (via a hypercall). From there on, the guest may reuse the frame
> under a writable mapping. Note that this is consistent with overall OS
> behavior: First the PT usage is cleared, then the frame reused,
> independent of whether the contents are swapped to disk, the process
> died, etc.

So it is possible for the guest OS to swap out a page table page from
what you're saying?  It seems like that would be a problem for the
domain save/migration mechanism since in that process PT pages are
canonicalized from virtual-to-machine mappings to
virtual-to-pseudophysical mappings...  if any PT pages are swapped to
disk and not canonicalized, they would have incorrect mappings.
Someone has suggested that Xen is aware of any swaps made by the guest
OS (by way of hypercalls to update the PTEs) and canonicalizes the
page table pages then.  Are you aware if that's the case?  I still
have to go through that code to find out.


Xen-devel mailing list