From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0D3E3838A; Mon, 19 Feb 2024 15:27:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708356476; cv=none; b=Ez3xhdlXjINA6IFAeeq18+73lXW5LDnaHffncatMafhvd2bvXjfr0A4st+obC4C7SUh+YxPtiP5Mff45ATQpzfufLxb0AOoM5sr07inZt38PPfHu/FNI2mCEah0w4R+f17cG2Tm5OQzZdGFn0HxZ4L+y2HvCAoVEI/KBuBVOUPA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708356476; c=relaxed/simple; bh=Lxrx7KnYWtzyd1bieirrEJcadfTMhn4CO0AKpath6Eo=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=Bl/qw5M3IxbzIHHYH0z61qbFLkd35sn5a7xFoW1juQBr20XNjuj4HVQDXhXLj9w953s1G9OLayxLpAR0UZlDQfHvnij84i/K431f+0DZSazVB5aLjSrVqbEpWHqEvUjMmggYU4bK2FkPbGxg0WC6oDpNjSzf0gYJjcaqupFiSk0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=flOSz57c; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="flOSz57c" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 888E1C433C7; Mon, 19 Feb 2024 15:27:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708356475; bh=Lxrx7KnYWtzyd1bieirrEJcadfTMhn4CO0AKpath6Eo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=flOSz57cS3R9PW1sOsoKGfH77MCb2QIcSy/dT9mPqMK8Ul8s+XRakYQjW1Y1q+EPI Bs2TOqOPByWT29SZOHwvW4fxUw1cjcCHskLX3kAc4Zu/YvpipcQceZVguTRDY8/UKT 0tyqzPzaKTAVVRyr8FQ+OeIbE7I2xN1fFgLxi9LCXgSRhh88X1bt4b5HMmi94STXy4 PznuSZd69pRQ5t2xTkdSQuHPYebkvrtVbJtvYRzOy6JuyRWde8EkSOQ6CwChItpZqi qPoszWmiBtDFsAfK/Fs66EHOENLCVoMY+k6NIWWmkescjLjYdntxCKiL97xaXhYLUh 67ZmujvZA1ivg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rc5Yf-004cP7-9e; Mon, 19 Feb 2024 15:27:53 +0000 Date: Mon, 19 Feb 2024 15:27:52 +0000 Message-ID: <86a5nw4gp3.wl-maz@kernel.org> From: Marc Zyngier To: Zenghui Yu Cc: Naresh Kamboju , open list , Linux ARM , , Linux Regressions , Catalin Marinas , Arnd Bergmann , Dan Carpenter , Anders Roxell Subject: Re: next-20240219: arm64: boot failed - gic_of_init In-Reply-To: References: <86edd84wer.wl-maz@kernel.org> <86cyss4rl7.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, naresh.kamboju@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, lkft-triage@lists.linaro.org, regressions@lists.linux.dev, catalin.marinas@arm.com, arnd@arndb.de, dan.carpenter@linaro.org, anders.roxell@linaro.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Mon, 19 Feb 2024 14:46:46 +0000, Zenghui Yu wrote: > > On 2024/2/19 19:32, Marc Zyngier wrote: > > For what it is worth, I've just tested both defconfig and my own > > configuration with both 4k (kvmtool, QEMU+KVM and on SynQuacer) and > > 16k (kvmtool), without any obvious problem. > > I had a quick test on top of next-20240219 with defconfig. I can > reproduce it with QEMU parameter '-cpu max -accel tcg', but things are > fine with '-cpu max,lpa2=off -accel tcg'. > > Bisection shows that the problem happens when we start putting the > latest arm64 and kvmarm changes together. The following hack fixes the > problem for me (but I **only** write it for kernel built with defconfig > with ARM64_4K_PAGES=y atm). > > I can investigate it further tomorrow (as it's too late now ;-) ). Or > maybe Marc or Catalin can help fix it with a proper approach. > > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > index 4f7662008ede..babdc3f4721b 100644 > --- a/arch/arm64/kernel/cpufeature.c > +++ b/arch/arm64/kernel/cpufeature.c > @@ -2798,6 +2798,7 @@ static const struct arm64_cpu_capabilities > arm64_features[] = { > | .sign = FTR_SIGNED, > | .field_pos = ID_AA64MMFR0_EL1_TGRAN4_SHIFT, > | .min_field_value = ID_AA64MMFR0_EL1_TGRAN4_52_BIT, > |+ .max_field_value = BIT(ID_AA64MMFR0_EL1_TGRAN4_WIDTH - 1) - 1, > | #else > | .sign = FTR_UNSIGNED, > | .field_pos = ID_AA64MMFR0_EL1_TGRAN16_SHIFT, I've posted my take on this at [1], which hopefully matches what you were aiming at. Thanks, M. [1] https://lore.kernel.org/all/86bk8c4gyh.wl-maz@kernel.org/ -- Without deviation from the norm, progress is not possible.