From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 1/3] libxc/xc_domain_resume: Update comment. Date: Tue, 26 Jan 2016 14:37:36 -0500 Message-ID: <20160126193736.GB25403@char.us.oracle.com> References: <1453756017-8747-1-git-send-email-konrad.wilk@oracle.com> <1453756017-8747-2-git-send-email-konrad.wilk@oracle.com> <1453825194.25257.31.camel@citrix.com> <22183.40252.314004.359086@mariner.uk.xensource.com> <1453826168.25257.40.camel@citrix.com> <22183.42038.212120.387010@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aO9Qw-0003w6-Nm for xen-devel@lists.xenproject.org; Tue, 26 Jan 2016 19:37:46 +0000 Content-Disposition: inline In-Reply-To: <22183.42038.212120.387010@mariner.uk.xensource.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 Jackson Cc: xen-devel@lists.xenproject.org, wei.liu2@citrix.com, Ian Campbell List-Id: xen-devel@lists.xenproject.org On Tue, Jan 26, 2016 at 04:52:06PM +0000, Ian Jackson wrote: > Ian Campbell writes ("Re: [PATCH 1/3] libxc/xc_domain_resume: Update comm= ent."): > > On Tue, 2016-01-26 at 16:22 +0000, Ian Jackson wrote: > > > I'm not sure that `will return 1' is correct.=A0=A0IIRC there is some > > > ... unpleasantness here, with something effectively corrupting the > > > guest state in a way that the guest is supposed to expect and > > > cooperate with. > > = > > The tools arrange for the hypercall to return 1, which the guest is ind= eed > > expected to expect and cooperate, as with any PV interface call it make= s. > > = > > They do this by intimate knowledge of the hypercall ABI (i.e. which > > register is the return value) and one could certainly argue it ought to= be > > arranged in a less horrific way, but I think to characterise it as > > "corrupting" is probably going to far. > = > Ian C had a conversation about this in person. We think (ie, I am now > convinced) that provided that this xc resume call is only made when > the guest is suspended, that the worst outcome will indeed be that the > guest experiences the hypercall returning 1, and then finding itself > in a state it's not expecting. The guest will hopefully crash due > to the unexpected return value but is in any case likely to implode > soon due to event channel misconfiguration etc. > = > Only if the `resume' is attempted with the guest running, would the > guest's %eax actually be `corrupted' in this sense. Right. That code doing the set_vcpu manipulations is quite .. ahhh interesting! I will update the comment to be more clear. > = > Ian.