From: "Jan Beulich" Subject: Re: [PATCH] x86: rework hypercall argument translation area setup Date: Thu, 21 Feb 2013 12:26:01 +0000 Message-ID: <5126206902000078000BFE26@nat28.tlf.novell.com> References: <5126163702000078000BFDA4@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Keir Fraser Cc: xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 21.02.13 at 13:08, Keir Fraser wrote: > On 21/02/2013 11:42, "Jan Beulich" wrote: > >> Rather than using an order-1 Xen heap allocation, use (currently 2) >> individual domain heap pages to populate space in the per-domain >> mapping area. >> >> Also fix an off-by-one mistake in is_compat_arg_xlat_range(). >> >> Signed-off-by: Jan Beulich > > Well, fine in principle. This manual setup/teardown of l2/l1 pagetables in > the perdomain area is getting a bit tiresome though isn't it? Isn't there > some setup helper that could be abstracted out for all users, and perhaps > even some automated teardown-and-freeing on domain destroy? I just sighed > when I saw more skanky pagetable manipulation for what is a conceptually > simple change. I tried to spot pieces worth folding into helper functions, but didn't really find anything worthwhile (the purposes of the mappings are just too different). Perhaps we could have a map_pages_to_guest(), taking care of all intermediate page table levels? I can't see much else, and the main problem is that of tracking pages used for page tables here anyway. Are we concerned about the performance of guest GDT/LDT page (un)mappings? Jan