From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v1 2/4] xen-version: Add third parameter (len) to the do_version hypercall. Date: Fri, 9 Oct 2015 13:58:48 +0100 Message-ID: <5617BA08.7010703@citrix.com> References: <1444359390-14153-1-git-send-email-konrad.wilk@oracle.com> <1444359390-14153-3-git-send-email-konrad.wilk@oracle.com> <5617962602000078000A99DE@prv-mh.provo.novell.com> <5617B316.7040408@citrix.com> <1444394805.1410.376.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZkXG9-0007N9-MW for xen-devel@lists.xenproject.org; Fri, 09 Oct 2015 12:58:54 +0000 In-Reply-To: <1444394805.1410.376.camel@citrix.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: Ian Campbell , Jan Beulich , Konrad Rzeszutek Wilk Cc: mpohlack@amazon.de, ian.jackson@eu.citrix.com, dgdegra@tycho.nsa.gov, wei.liu2@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 09/10/15 13:46, Ian Campbell wrote: > On Fri, 2015-10-09 at 13:29 +0100, Andrew Cooper wrote: >> On 09/10/15 09:25, Jan Beulich wrote: >>>>>> On 09.10.15 at 04:56, wrote: >>>> All existing commands ignore the parameter so this does >>>> not break the ABI. >>> Does it not? What about the debug mode clobbering of hypercall >>> argument registers? >> That is an implementation detail of the hypervisor. It is irrelevant to >> guests whether Xen chooses to clobber the spare registers or not. > Or in other words the effect here is to clobber one _less_ register, and > the guest cannot have been relying on a register getting so clobbered (if > nothing else it doesn't happen in debug=n builds). Correct - that is definitely a better phrasing. > The flip side is that we are now no longer clobbering that register even > for existing sub-ops which do not use it (since the clobbering doesn't go > down to the subop level). So there is a risk that a guest may come to > depend on that register not being clobbered and then fail older debug=y > hypervisors. > > This second scenario doesn't seem especially likely to me. > > Do we not already have one or two hypercalls where subops consume different > numbers of parameters anyway? HYPERVISOR_sched_op I think has this property > and we've not been too concerned. SCHEDOP_shutdown(suspend) effectively has a third parameter for PV guests, but that is done entirely by the toolstack using the VMs register context. Xen isn't aware of it, and the duration of do_sched_op() does have the register clobbered. ~Andrew