From: Ian Campbell Subject: Re: [PATCH 0/4] fix preemption handling for XENMEM_add_to_physmap_range{, _range} Date: Wed, 18 Dec 2013 14:43:57 +0000 Message-ID: <1387377837.28680.40.camel@kazak.uk.xensource.com> References: <52B1BF76020000780010EC02@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VtILy-00042Z-Ki for xen-devel@lists.xenproject.org; Wed, 18 Dec 2013 14:44:03 +0000 In-Reply-To: <52B1BF76020000780010EC02@nat28.tlf.novell.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: Jan Beulich Cc: xen-devel , Tim Deegan , Keir Fraser , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Wed, 2013-12-18 at 14:29 +0000, Jan Beulich wrote: > The hypervisor isn't supposed to use the input structures for > storing continuation information - only fields explicitly used as > hypercall outputs should ever be updated. > > Obviously this implies an ABI change, but since the previous > behavior was not intended to be that way I don't think we should > stick to the old behavior. FWIW I don't think adding const to a function parameter (which is kinda-sorta what we are doing here) constitutes a change to the ABI as such (or not a meaningful one), since a non-const can always be const'ed on call. > There's one caveat though - with the previous model, the caller > could - upon failure - use the updated structure to find out how > by progress was made. However, that wasn't intended afaict, > largely supported by this information depending on hypervisor > internals (i.e. the caller would have to know the order of request > processing and the meaning of the respective size fields, which > aren't simply saying "this much was processed"). IIRC the long standing user of the original physmap range functionality was hvmloader (something to do with batching IOMMU TLB flushes?). If hvmloader isn't introspecting hypervisor internals in this way I doubt anyone else is. I suppose this series is proposed for 4.5 rather than 4.4 since you didn't say otherwise? > > Consequently, as a follow-up we may want to consider making > explicit (and straight forward) this progress indication on error. > > 1: move XENMEM_add_to_physmap handling framework to common code > 2: fix XENMEM_add_to_physmap preemption handling > 3: move XENMEM_add_to_physmap_range handling framework to common code > 4: fix XENMEM_add_to_physmap_range preemption handling > > Signed-off-by: Jan Beulich >