From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: Re: [PATCH]Add a flag for shadow pages Date: Wed, 04 Mar 2009 14:30:10 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Jiang, Yunhong" , Tim Deegan Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 04/03/2009 11:57, "Keir Fraser" wrote: > On 04/03/2009 09:56, "Keir Fraser" wrote: > >> Another would be to create a new function page_get_reference_and_owner() >> which obtains a reference on a guest page and *returns* the (now known >> valid) domain pointer. Probably this is nicer actually. Then all existing >> users of page_get_owner() need checking to ensure they don't need to use the >> new more expensive function -- I think some are probably actually unsafe now >> that shadow pages clobber the domain field. > > I'm working on this by the way. I'll clean up everything except shadow uses > of page_get_owner(). Changeset 19268. See get_page_from_l1e() for an example safe usage of new page_get_owner_and_reference() function. -- Keir