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

Re: [Xen-devel] xenheap pages mapped by dom0


  • To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
  • From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
  • Date: Fri, 18 Dec 2009 21:59:21 +0000
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
  • Delivery-date: Fri, 18 Dec 2009 13:59:48 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=umO6VfEcAH8NHZ+LAwYTP1Wg0fPa+p+LWnsiQ/lNAw6iE7qkHKj7mohWx8ZKlw8gOC 0goH3rybak2MDHK78T8omo6fzlxJanVpK/C3gvN2Y5U9RJ3tVJgtDEgwkk3QV4/lOmC7 wA8cyUlzM4yt8veGdEepVodCCy3yXUpSnfzCo=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On Fri, Dec 18, 2009 at 4:40 PM, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote:
> Once you have called share_xen_page_with_guest(), dom0 can map that page at
> any time and it is not safe to free_xenheap_page() without first checking
> for guest mappings.
>
> Perhaps you can lazily adjust tarce buffers downwards in size? I.e. Have a
> go, remember if you fail, and try again on future buffer-adjustment
> hypercalls?

I don't expect buffer-adjustment to be a common thing, so the "lazy"
option might end up being incredibly lazy. :-)  My plan now is to do
alloc-once only (i.e., keeping the same semantics), and make all the
allocations before sharing the page with dom0.  In the future, I may
add the tear-down and check for reference count, with an "undo" if
there are still outstanding reference counts.  I think the most likely
reason to run into this scenario is if someone accidentally starts
xentrace or xenmon when there's already an instance of one of them
running, in which case the right thing to do is fail the new one and
let the user decide whether to kill the old process or not.

 -George

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


 


Rackspace

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