From: Ian Campbell Subject: Re: [PATCH v8 10/14] xen/common: move the memory_mapping DOMCTL hypercall to common code Date: Thu, 5 Jun 2014 15:21:28 +0100 Message-ID: <1401978088.15729.110.camel@hastur.hellion.org.uk> References: <1401015115-7610-1-git-send-email-avanzini.arianna@gmail.com> <1401015115-7610-11-git-send-email-avanzini.arianna@gmail.com> <53821D7F.4040701@linaro.org> <53832E940200007800015AED@mail.emea.novell.com> <53831F8A.8060604@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53831F8A.8060604@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Ian.Campbell@eu.citrix.com, paolo.valente@unimore.it, keir@xen.org, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, dario.faggioli@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, julien.grall@citrix.com, etrudeau@broadcom.com, Jan Beulich , Arianna Avanzini , viktor.kleinik@globallogic.com List-Id: xen-devel@lists.xenproject.org On Mon, 2014-05-26 at 12:03 +0100, Julien Grall wrote: > In any case, I don't think we should expose mfn_t and _mfn to ARM. All > the P2M interface used in common code, take an unsigned long in parameter. I don't object in principal to the idea that common code should be moving towards more semantic types (i.e. mfn_t rather than unsigned long) in general. Or even to going as far as x86 has done in the common code and having mfn_t be more than a typedef (it's a wrapping struct for type safety), which results in the _mfn() and mfn_x() conversion things. But I don't think we should be making that transition as part of this series. I think the right answer here and now is for map_mmio_regions to take the mfn as an unsigned long and for the wrapping into a mfn_t to happen in the x86-specific implementation of map_mmio_regions etc. That would also get rid of this sort of thing from the previous patch: _mfn(mfn_x(mfn) + i)) If someone wants to come along later and "type-safe-up" the common code too, well, lets think about that then... Ian.