From: Keir Fraser Subject: Re: Re: xen crash in tmem: checking a xen pfn for domain ownership Date: Mon, 20 Sep 2010 08:46:53 +0100 Message-ID: References: <4C9726890200007800017A42@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C9726890200007800017A42@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich , Dan Magenheimer Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org On 20/09/2010 08:16, "Jan Beulich" wrote: >>>> On 17.09.10 at 21:32, Keir Fraser wrote: >> Oh, depending on what you want to do with the page you may well want to >> get_page(current->domain, page). You don't hold a lock on the domain's p2m, >> so page ownerships can change under your feet, and hence getting a reference >> to the page, and checking the page's ownership at the same time, might be >> wise. And if you want to modify the page you should probably use >> get_page_and_type(..., PGT_writable_page). > > That's particularly important for the pv case, where gfn_to_mfn() is > a no-op. Yes, I actually forgot about the PV case, and I think that's the only case that matters for tmem. :-) -- Keir