From: Ian Campbell Subject: Re: [PATCH LINUX RFC] xen: privcmd: implement IOCTL_PRIVCMD_MMAPBATCH_V2_UNCACHED Date: Fri, 20 Dec 2013 14:44:38 +0000 Message-ID: <1387550678.17289.94.camel@kazak.uk.xensource.com> References: <1387387710.28680.88.camel@kazak.uk.xensource.com> <1387387837-9922-1-git-send-email-ian.campbell@citrix.com> <20131218211630.GB11717@phenom.dumpdata.com> <1387531153.1025.66.camel@dagon.hellion.org.uk> <20131220141332.GA28996@phenom.dumpdata.com> <1387549128.17289.87.camel@kazak.uk.xensource.com> <20131220143804.GA29778@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20131220143804.GA29778@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: stefano.stabellini@eu.citrix.com, julien.grall@linaro.org, tim@xen.org, xen-devel@lists.xen.org, David Vrabel , xen-devel@lists.xenproject.org, Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org On Fri, 2013-12-20 at 09:38 -0500, Konrad Rzeszutek Wilk wrote: > On Fri, Dec 20, 2013 at 02:18:48PM +0000, Ian Campbell wrote: > > On Fri, 2013-12-20 at 09:13 -0500, Konrad Rzeszutek Wilk wrote: > > > On Fri, Dec 20, 2013 at 09:19:13AM +0000, Ian Campbell wrote: > > > > On Wed, 2013-12-18 at 16:16 -0500, Konrad Rzeszutek Wilk wrote: > > > > > On Wed, Dec 18, 2013 at 05:30:37PM +0000, Ian Campbell wrote: > > > > > > On ARM we want to use uncached foreign mappings while building the domain > > > > > > because the guests start with MMU and caches disabled. > > > > > > > > > > > > > > > > Why introduce a new ioctl? Could we piggyback on the old one and on ARM > > > > > do the uncached. > > > > > > > > Because there are (going to be) other circumstances where we do want a > > > > cached foreign mapping, specifically migration. > > > > > > Why not then just expand the existing ioctl with a flag? ARM after all > > > is still experimental so you could do that. > > > > Well, ARM just uses the same ioctl as on x86, so we wouldn't be > > expanding, but duplicating, which didn't seem worth it. > > > > And secondly, unlike hypercalls, the ioctls are part of Linux's > > interface, so I'm not sure how changing them would go down. > > You wouldn't break - expanding the structure still preserves the ABI. The ioctl number includes sizeof(the struct) though, so changing the struct would mean adding compatiblity handling for the old struct, binding the old and new numbers, and all that jazz. > Only more recent toolstacks would know how to use it. > > > But I get your point - you are hesistant to modify it the existing one. > How about making this new more flexible - perhaps have a 'flag' and > 'version' or even 'size' to account for changes? And call it IOCTL_.._V3 > which would allows us to add more things in the future (depending on the > version size)? That way if something else likes this pops up we have > a nice escape vehicle ready. I think I remember Andy cooper saying he wanted to do a more thorough revamp of the API at some point (I can't recall why), so I wanted to keep this extension as small as possible rather than create a new thing in the mean time. Ian.