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

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

To: Jan Beulich <JBeulich@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] xenheap pages mapped by dom0
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 18 Dec 2009 16:12:47 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 18 Dec 2009 08:13:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B2BB16C0200007800026AB5@xxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acp/+NznZqW4hauBT2quUEqsHAdu0AABBMtz
Thread-topic: [Xen-devel] xenheap pages mapped by dom0
User-agent: Microsoft-Entourage/12.23.0.091001
On 18/12/2009 15:44, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

>> On deallocation:
>> if (test_and_clear(PGC_allocated)) put_page();
>> if (page->count_info & PGC_count_mask) return -EBUSY;
> 
> Hmm, and how would you recover from that? I don't think George wants
> his enclosing operation to fail because of a page still being mapped. On
> x86-64, at least, it might be possible to play with PGC_xen_heap, to
> convert a Xen heap page to a domain heap one, but that wouldn't
> cover anyone else (and would seem rather hackish, if it works at all).

I assume he would wrap it all up in a retryable hypercall. E.g., I don't
know the scenario we're thinking about, but perhaps xentrace tools go bad
and leak mappings, so the hypercall fails. So you restart xentrace tools,
and now the hypercall would work on next attempt. You wouldn't have to be
stuck forever, but yes you are stuck, or at least have to keep tracking that
page in Xen, until dom0 stops mapping the page, obviously!

 -- Keir



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