From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vitaly Kuznetsov Subject: Re: [PATCH v6 10/10] (lib)xl: soft reset support Date: Fri, 22 May 2015 16:55:20 +0200 Message-ID: <87zj4wu0fb.fsf@vitty.brq.redhat.com> References: <1431510585-12544-1-git-send-email-vkuznets@redhat.com> <1431510585-12544-11-git-send-email-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YvoMW-000239-7d for xen-devel@lists.xenproject.org; Fri, 22 May 2015 14:55:48 +0000 In-Reply-To: <1431510585-12544-11-git-send-email-vkuznets@redhat.com> (Vitaly Kuznetsov's message of "Wed, 13 May 2015 11:49:45 +0200") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Andrew Jones , Julien Grall , Keir Fraser , Ian Campbell , Stefano Stabellini , Andrew Cooper , Ian Jackson , Olaf Hering , Tim Deegan , David Vrabel , Jan Beulich , Wei Liu , Daniel De Graaf List-Id: xen-devel@lists.xenproject.org Vitaly Kuznetsov writes: > Perform soft reset when a domain did SHUTDOWN_soft_reset. Migrate the > content with xc_domain_soft_reset(), reload dm and toolstack. > ..skip.. > +void libxl__xc_domain_soft_reset(libxl__egc *egc, > + libxl__domain_create_state *dcs) > +{ > + STATE_AO_GC(dcs->ao); > + libxl_ctx *ctx = libxl__gc_owner(gc); > + const uint32_t domid_soft_reset = dcs->domid_soft_reset; > + const uint32_t domid = dcs->guest_domid; > + uint8_t *buf; > + uint32_t len; > + int rc; > + libxl__domain_suspend_state *dss; > + > + GCNEW(dss); > + dss->ao = ao; > + dss->domid = domid_soft_reset; > + > + rc = libxl__toolstack_save(domid_soft_reset, &buf, &len, dss); > + if (rc) goto out; It turned out being too late, QEMU process for the original domain is already dead at this point and xenstore in cleanen. Qemu-upstream will fail when it requires e.g. video ram info. I'll move this call earlier in the chain in v7. ..skip... -- Vitaly