From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932724AbbIYQ6L (ORCPT ); Fri, 25 Sep 2015 12:58:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57911 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932234AbbIYQ6K (ORCPT ); Fri, 25 Sep 2015 12:58:10 -0400 From: Vitaly Kuznetsov To: Boris Ostrovsky Cc: Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, x86@kernel.org, David Vrabel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] xen/pvhvm: add soft reset on kexec/kdump support References: <1443175192-4828-1-git-send-email-vkuznets@redhat.com> <20150925135937.GJ20966@l.oracle.com> <56056E1D.80307@oracle.com> Date: Fri, 25 Sep 2015 18:07:34 +0200 In-Reply-To: <56056E1D.80307@oracle.com> (Boris Ostrovsky's message of "Fri, 25 Sep 2015 11:54:05 -0400") Message-ID: <87si62pjnd.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Boris Ostrovsky writes: > On 09/25/2015 09:59 AM, Konrad Rzeszutek Wilk wrote: >> On Fri, Sep 25, 2015 at 11:59:52AM +0200, Vitaly Kuznetsov wrote: >>> Currently there is a number of issues preventing PVHVM Xen guests from >>> doing successful kexec/kdump: >>> - Bound event channels. >>> - Registered vcpu_info. >>> - PIRQ/emuirq mappings. >>> - shared_info frame after XENMAPSPACE_shared_info operation. >>> - Active grant mappings. >>> Basically, newly booted kernel stumbles upon already set up Xen interfaces >>> and there is no way to reestablish them. In Xen-4.7 a new feature called >>> 'soft reset' is coming. A guest performing kexec/kdump operation is >>> supposed to call SCHEDOP_shutdown hypercall with SHUTDOWN_soft_reset reason >>> before jumping to new kernel. Hypervisor (with some help from toolstack) >>> will do full domain cleanup (but keeping its memory and vCPU contexts >>> intact) returning the guest to the state it had when it was first booted >>> and thus allowing it to start over. >>> >>> Doing SHUTDOWN_soft_reset on Xen hypervisors which don't support it is >>> probably OK as by default all unknown shutdown reasons cause domain destroy >>> with a message in toolstack log: >>> 'Unknown shutdown reason code 5. Destroying domain.' >>> which gives a clue to what the problem is and eliminates false >>> expectations. >>> >>> Signed-off-by: Vitaly Kuznetsov >> Reviewed-by: Konrad Rzeszutek Wilk >> >> with s/pvhvm/hvm/ >> >> to match with the rest of the file. >> >> Thanks. >>> +#ifdef CONFIG_KEXEC_CORE >>> +static void xen_pvhvm_kexec_shutdown(void) >>> +{ >>> + native_machine_shutdown(); >>> + if (kexec_in_progress) >>> + xen_reboot(SHUTDOWN_soft_reset); >>> +} > > This routine is not kexec-specific so "kexec_" should be dropped from > the name. Ok, > > Also, I am not sure I see how this new op will be used in the > hypervisor --- currently AFAICS it is only processed under > is_hardware_domain(). Are there other patches that will support HVM > guests? Please see my Xen series: http://lists.xenproject.org/archives/html/xen-devel/2015-09/msg00547.html (last 'full' submission). All patches from my 'toolstack-assisted approach to PVHVM guest kexec' are already merged to xen.git (first 10 are already in 'master' and the last one is in 'staging'). -- Vitaly