From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 1/2] xen: Introduce PHYSDEVOP_pirq_eoi_gmfn_new Date: Thu, 26 Jan 2012 17:13:36 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini , Ian Campbell Cc: "xen-devel@lists.xensource.com" , "Keir (Xen.org)" , "JBeulich@suse.com" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On 26/01/2012 16:45, "Stefano Stabellini" wrote: >> If that's the case then there is precedent (e.g. sched_op, physdev_op, >> evtchn_op) for renaming the existing thing FOO_compat and taking over >> the name with the new semantics. >> >> That's certainly better than _new->_newer->really_new etc. If you must >> go down that route then adding a number seems preferable. > > In that case, I vote for taking over the existing name with the new > hypercall. Agreed, but you have to be careful because other codebases expect to be able to sync with our public headers without subtle side effects. The correct thing to do here is probably to rename the old command to PHYSDEVOP_pirq_eoi_gmfn_v1, and your new one ..._v2. Then you bump XEN_LATEST_INTERFACE_VERSION to 0x00040200 (somewhat arbitrarily!), and at the end of physdev.h you put something like: #if __XEN_INTERFACE_VERSION < 0x00040200 #define PHYSDEVOP_pirq_eoi_gmfn PHYSDEVOP_pirq_eoi_gmfn_v1 #else #define PHYSDEVOP_pirq_eoi_gmfn PHYSDEVOP_pirq_eoi_gmfn_v2 #endif Perfect, those who want the explicitly versioned command can use it. Old codebases can sync with new headers safely. Or codebases can be updated for latest XEN_INTERFACE_VERSION and default to the latest sanest command versions. -- Keir