From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934752AbbI2LkA (ORCPT ); Tue, 29 Sep 2015 07:40:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33095 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934243AbbI2Ljv (ORCPT ); Tue, 29 Sep 2015 07:39:51 -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> <87si62pjnd.fsf@vitty.brq.redhat.com> <560581B4.3070107@oracle.com> <20150925190154.GC21231@l.oracle.com> <56059E5D.4000604@oracle.com> <20150925193541.GG21231@l.oracle.com> <5605B5DA.2030402@oracle.com> Date: Tue, 29 Sep 2015 13:39:47 +0200 In-Reply-To: <5605B5DA.2030402@oracle.com> (Boris Ostrovsky's message of "Fri, 25 Sep 2015 17:00:10 -0400") Message-ID: <8737xx4fp8.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 03:35 PM, Konrad Rzeszutek Wilk wrote: >> On Fri, Sep 25, 2015 at 03:19:57PM -0400, Boris Ostrovsky wrote: >>> On 09/25/2015 03:01 PM, Konrad Rzeszutek Wilk wrote: >>>> On Fri, Sep 25, 2015 at 01:17:40PM -0400, Boris Ostrovsky wrote: >>>>> On 09/25/2015 12:07 PM, Vitaly Kuznetsov wrote: >>>>>>> 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'). >>>>>> >>>>> OK, so I was looking at the right tree. Then I don't understand how >>>>> SHUTDOWN_soft_reset would be reached for a non-privileged domain. The only >>>>> path that I see is >>>>> >>>>> domain_shutdown() >>>>> { >>>>> ... >>>>> if ( is_hardware_domain(d) ) >>>>> hwdom_shutdown(reason); >>>>> ... >>>>> } >>>>> >>>>> Is there another path to handle this op? >>>> Yes: >>>> e1bd9812966de9a16f30a58e7162b80bd6af361b libxc: support XEN_DOMCTL_soft_reset operation >>>> and >>>> c57e6ebd8c3e490e353e68d96abec1dad01e72f5 (lib)xl: soft reset support >>>> >>> >>> That's toolstack issuing hypercalls from dom0. >>> >>> I am asking about (non-privileged) guest itself calling SCHEDOP_shutdown. >> The hypervisor ends up calling: >> __domain_finalise_shutdown which sends an VIRQ_DOM_EXC to dom0 which >> makes the toolstack do all of those operations. > > OK. But the I don't see anyone checking that 'reason' (or > 'shutdown_code') is SHUTDOWN_soft_reset. In other words, the guest can > do 'xen_reboot(23)' or 'xen_reboot(154)'. Or, it seems, even > 'xen_reboot(SHUTDOWN_reboot)'? The only value it shouldn't be is > SHUTDOWN_suspend. Xen hypervisor doesn't analyzie the reason, it is being analyzed by the toolstack (XEN_DOMCTL_getdomaininfo returns this info encoded in flags with XEN_DOMINF_shutdownshift shift). -- Vitaly