From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [RFC PATCH COLO v5 07/29] support to resume uncooperative HVM guests Date: Wed, 22 Apr 2015 15:54:49 +0100 Message-ID: <1429714489.30934.34.camel@citrix.com> References: <1427870525-18686-1-git-send-email-yanghy@cn.fujitsu.com> <1427870525-18686-8-git-send-email-yanghy@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1427870525-18686-8-git-send-email-yanghy@cn.fujitsu.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: Yang Hongyang Cc: wei.liu2@citrix.com, wency@cn.fujitsu.com, eddie.dong@intel.com, yunhong.jiang@intel.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, rshriram@cs.ubc.ca List-Id: xen-devel@lists.xenproject.org On Wed, 2015-04-01 at 14:41 +0800, Yang Hongyang wrote: > From: Wen Congyang > > For PVHVM, the hypercall return code is 0, and it can be resumed > in a new domain context. > > For HVM, do nothing. > > Signed-off-by: Wen Congyang > --- > tools/libxc/xc_resume.c | 20 ++++++++++++++++---- > 1 file changed, 16 insertions(+), 4 deletions(-) > > diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c > index e67bebd..b862ce3 100644 > --- a/tools/libxc/xc_resume.c > +++ b/tools/libxc/xc_resume.c > @@ -109,6 +109,21 @@ static int xc_domain_resume_cooperative(xc_interface *xch, uint32_t domid) > return do_domctl(xch, &domctl); > } > > +static int xc_domain_resume_hvm(xc_interface *xch, uint32_t domid) > +{ > + DECLARE_DOMCTL; > + > + /* > + * If it is PVHVM, the hypercall return code is 0, and resume > + * it in a new domain context. What is a "new domain context"? > + * > + * If it is a HVM, do nothing. If it is an HVM guest they you do something, you call a hypercall. If that hypercall is somehow a NOP for an HVM domain then I think that needs to be explained somewhere here.