From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033324AbbKFNZr (ORCPT ); Fri, 6 Nov 2015 08:25:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48516 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033190AbbKFNZq (ORCPT ); Fri, 6 Nov 2015 08:25:46 -0500 From: Vitaly Kuznetsov To: Mark Rutland Cc: David Vrabel , Stefano Stabellini , xen-devel@lists.xensource.com, linux@arm.linux.org.uk, Ian Campbell , arnd@arndb.de, marc.zyngier@arm.com, catalin.marinas@arm.com, konrad.wilk@oracle.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, olof@lixom.net, linux-arm-kernel@lists.infradead.org, geoff@infradead.org, takahiro.akashi@linaro.org Subject: Re: [PATCH v11 5/5] xen/arm: account for stolen ticks References: <1446737696-9749-5-git-send-email-stefano.stabellini@eu.citrix.com> <20151105165743.GG32247@leverpostej> <563C91FD.7060703@citrix.com> <20151106115916.GA23038@leverpostej> Date: Fri, 06 Nov 2015 14:25:40 +0100 In-Reply-To: <20151106115916.GA23038@leverpostej> (Mark Rutland's message of "Fri, 6 Nov 2015 11:59:16 +0000") Message-ID: <87egg3p8dn.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 Mark Rutland writes: > On Fri, Nov 06, 2015 at 11:41:49AM +0000, David Vrabel wrote: >> On 06/11/15 11:39, Stefano Stabellini wrote: >> > On Thu, 5 Nov 2015, Mark Rutland wrote: >> >>> static void xen_percpu_init(void) >> >>> { >> >>> struct vcpu_register_vcpu_info info; >> >>> @@ -104,6 +120,8 @@ static void xen_percpu_init(void) >> >>> BUG_ON(err); >> >>> per_cpu(xen_vcpu, cpu) = vcpup; >> >>> >> >>> + xen_setup_runstate_info(cpu); >> >> >> >> Does the runstate memory area get unregsitered when a kernel tears >> >> things down, or is kexec somehow inhibited for xen guests? >> >> >> >> i couldn't spot either happening, but I may have missed it. >> > >> > I don't think that the runstate memory area needs to be unregistered for >> > kexec, but I am not very knowledgeble on kexec and Xen, CC'ing Vitaly >> > and David. >> >> There's a whole pile of other state needing to be reset for kexec (event >> channels and grant tables for example). The guest needs to soft reset >> itself (available in Xen 4.6) before kexec'ing another kernel. >> >> This soft reset would also including cleaning up this shared memory region. > > Ok. So we don't currently have the code kernel-side, but it looks like > it would be relatively simple to add (having just spotted [1]) already merged in 4.3 and several stable trees. > , and everything should be ready on the Xen side.` > Yes, but for x86 only. arch_domain_soft_reset() is -ENOSYS for ARM now. It should be relatively easy to implement, one should unmap shared_info page and do some GIC cleanup (if it's needed at all). I'd be happy to help if someone's interested but unfortunately I don't have ARM hardware to test at this moment... > Thanks, > Mark. > > [1] https://lkml.org/lkml/2015/9/25/152 -- Vitaly