From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B04CC43141 for ; Wed, 20 Jun 2018 16:28:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DD7B2083A for ; Wed, 20 Jun 2018 16:28:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DD7B2083A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754303AbeFTQ2L (ORCPT ); Wed, 20 Jun 2018 12:28:11 -0400 Received: from foss.arm.com ([217.140.101.70]:39850 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753960AbeFTQ2K (ORCPT ); Wed, 20 Jun 2018 12:28:10 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1689F80D; Wed, 20 Jun 2018 09:28:10 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D80A93F589; Wed, 20 Jun 2018 09:28:09 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id C70B01AE3916; Wed, 20 Jun 2018 17:28:45 +0100 (BST) Date: Wed, 20 Jun 2018 17:28:45 +0100 From: Will Deacon To: Wei Xu Cc: James Morse , catalin.marinas@arm.com, suzuki.poulose@arm.com, dave.martin@arm.com, mark.rutland@arm.com, marc.zyngier@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linuxarm , Hanjun Guo , xiexiuqi@huawei.com, huangdaode , "Chenxin (Charles)" , "Xiongfanggou (James)" , "Liguozhu (Kenneth)" , Zhangyi ac , jonathan.cameron@huawei.com, Shameerali Kolothum Thodi , John Garry , Salil Mehta , Shiju Jose , "Zhuangyuzeng (Yisen)" , "Wangzhou (B)" , "kongxinwei (A)" , "Liyuan (Larry, Turing Solution)" , libeijian@hisilicon.com Subject: Re: KVM guest sometimes failed to boot because of kernel stack overflow if KPTI is enabled on a hisilicon ARM64 platform. Message-ID: <20180620162845.GD27776@arm.com> References: <5B2A6218.3030201@hisilicon.com> <20180620144257.GB27776@arm.com> <5B2A7832.4010502@hisilicon.com> <5B2A7FE1.5040607@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5B2A7FE1.5040607@hisilicon.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 21, 2018 at 12:25:05AM +0800, Wei Xu wrote: > Hi James, > > On 2018/6/20 23:54, James Morse wrote: > >Hi Wei, > > > >On 20/06/18 16:52, Wei Xu wrote: > >>On 2018/6/20 22:42, Will Deacon wrote: > >>>Hmm, I wonder if this is at all related to RAS, since we've just enabled > >>>that and if we take a fault whilst rewriting swapper then we're going to > >>>get stuck. What happens if you set CONFIG_ARM64_RAS_EXTN=n in the guest? > >>I will try it now. > >It's not just the Kconfig symbol, could you also revert: > > > >f751daa4f9d3 ("arm64: Unconditionally enable IESB on exception entry/return for > >firmware-first") > > > > > >(reverts and build cleanly on 4.17) > > Thanks to point out this! > I have disabled CONFIG_ARM64_RAS_EXTN and reverted that commit. > But I still got the stack overflow issue sometimes. > Do you have more hint? [...] > [ 0.076797] pstate: 604003c5 (nZCv DAIF +PAN -UAO) > [ 0.081727] pc : el1_sync+0x0/0xb0 > [ 0.085217] lr : kpti_install_ng_mappings+0x120/0x214 Please run: $ ./scripts/faddr2line vmlinux kpti_install_ng_mappings+0x120/0x214 as the GDB output wasn't helpful (it only showed local variable declarations?!). Will