From: "Jan Beulich" Subject: Re: [PATCH 3/4] move XENMEM_add_to_physmap_range handling framework to common code Date: Fri, 20 Dec 2013 07:58:40 +0000 Message-ID: <52B406C0020000780010F5DA@nat28.tlf.novell.com> References: <52B1BF76020000780010EC02@nat28.tlf.novell.com> <52B1C0C9020000780010EC27@nat28.tlf.novell.com> <1387450122.9925.47.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vtuyq-0001KA-Do for xen-devel@lists.xenproject.org; Fri, 20 Dec 2013 07:58:44 +0000 In-Reply-To: <1387450122.9925.47.camel@kazak.uk.xensource.com> 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: Ian Campbell Cc: xen-devel , Tim Deegan , KeirFraser , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org >>> On 19.12.13 at 11:48, Ian Campbell wrote: > On Wed, 2013-12-18 at 14:35 +0000, Jan Beulich wrote: >> There's really nothing really architecture specific here; the >> architecture specific handling is limited to >> xenmem_add_to_physmap_one(). >> >> Note the restriction of XENMAPSPACE_gmfn_range only being supported >> through XENMEM_add_to_physmap is being dropped as being pointless. > > Note that this will still not work on ARM where add_to_physmap_one() > does not support the gmfn_range and will still return ENOSYS. > > If you are dropping this restriction then xen/include/public/memory.h > will need updating (likewise the first patch). I don't think so - we can very well say certain combination are unsupported even if they happen to work. That leaves us with the option of dropping back to the earlier state should there be a need. > Personally I think that having two redundant ways of doing the same > thing is the more pointless of the two. Especially given the need to > think a bit carefully about what XENMEM_add_to_physmap_range > XENMAPSPACE_gmfn_range might mean... Yes, that combination is bogus whichever perspective you take. To some degree also because "range" in the former name is really wrong - the operation doesn't deal with a range, but with a group (batch) of individual pages. However, I meanwhile realized that from an interface perspective (I'm not proposing to implement this right now!) the combination could actually be made work - the errs array (being an output only at present) could be re-used to serve as input to pass the sizes. The main issue of implementing this would be how to deal with the two necessary layers of preemption. So I'm going to re-add the check. Jan