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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CDA10FA3745 for ; Fri, 28 Oct 2022 02:20:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+wz0w4Aod+RIhlqcxHIoS1Whc1uhKboV/EXsrGDxvOk=; b=j8qrxxFCIRB/A+KROg2afiaM6Z 1tRAVwexKAyBNM2qXB0t+dztCWvIov/imrlpxelz5I7FABRCyqgj48nm7cDHxreiKN2g3hQpYQUkD ojheXdFGyT1MgpNvLj3TnP+onNNzWcnE495O9zKaK90oHXEFTdwYzLt9lH2oJhbdHYGFBVmaXHgm9 69Qxcd67PlIXuxsmlWImW9MZt3VCp5s+sb0O4CMj0QgcGvxB0+1K3Jp04skwmLZMumA5UZWqIwCti BSoL6pzYI+HGNKsrlLAlATQe2igpVK8GhKEozkcKMe/mXtdQhYI73thKqwa7c/YMb9Uv95BpUxpQh 78/klgQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooExg-00FVzS-Nl; Fri, 28 Oct 2022 02:19:08 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooExb-00FVui-Vf for linux-arm-kernel@lists.infradead.org; Fri, 28 Oct 2022 02:19:06 +0000 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Mz5jq1J5qzpWFv; Fri, 28 Oct 2022 10:15:27 +0800 (CST) Received: from kwepemm600007.china.huawei.com (7.193.23.208) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 28 Oct 2022 10:18:54 +0800 Received: from [10.174.185.179] (10.174.185.179) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 28 Oct 2022 10:18:53 +0800 Subject: Re: [PATCH V2] arm64/mm: Fix __enable_mmu() for new TGRAN range values To: Anders Roxell CC: Anshuman Khandual , , James Morse , Catalin Marinas , Will Deacon , Marc Zyngier , Suzuki K Poulose , "Ard Biesheuvel" , Mark Rutland , , , , , References: <1615355590-21102-1-git-send-email-anshuman.khandual@arm.com> <20220826120020.GB520@mutt> From: Zenghui Yu Message-ID: <84e674ab-3eee-3f2b-28c1-a08ff99d6d3b@huawei.com> Date: Fri, 28 Oct 2022 10:18:41 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20220826120020.GB520@mutt> Content-Language: en-US X-Originating-IP: [10.174.185.179] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600007.china.huawei.com (7.193.23.208) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221027_191904_404961_A37CE8A2 X-CRM114-Status: GOOD ( 17.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022/8/26 20:00, Anders Roxell wrote: > On 2021-03-10 11:23, Anshuman Khandual wrote: >> From: James Morse >> >> As per ARM ARM DDI 0487G.a, when FEAT_LPA2 is implemented, ID_AA64MMFR0_EL1 >> might contain a range of values to describe supported translation granules >> (4K and 16K pages sizes in particular) instead of just enabled or disabled >> values. This changes __enable_mmu() function to handle complete acceptable >> range of values (depending on whether the field is signed or unsigned) now >> represented with ID_AA64MMFR0_TGRAN_SUPPORTED_[MIN..MAX] pair. While here, >> also fix similar situations in EFI stub and KVM as well. >> >> Cc: Catalin Marinas >> Cc: Will Deacon >> Cc: Marc Zyngier >> Cc: James Morse >> Cc: Suzuki K Poulose >> Cc: Ard Biesheuvel >> Cc: Mark Rutland >> Cc: linux-arm-kernel@lists.infradead.org >> Cc: kvmarm@lists.cs.columbia.edu >> Cc: linux-efi@vger.kernel.org >> Cc: linux-kernel@vger.kernel.org >> Acked-by: Marc Zyngier >> Signed-off-by: James Morse >> Signed-off-by: Anshuman Khandual > > Hi, > > When building an arm64 defconfig kernel from stable/linux-5.10.y and > booting that in QEMU (version: 1:7.0+dfsg-2~bpo11+2) with '-cpu max' the > kernel doesn't boot. I don't get any output. The kernel boots fine if I > change to '-cpu cortex-a72'. > > If I cherry-pick this patch to stable/linux-5.10.y I'm able too boot the > kernel with '-cpu max'. You can workaround the kernel boot failure by specifying '-cpu max,lpa2=off' [*] in the QEMU command line. > However, I'm not comfortable to backport this patch to older kernels > since there are a lot of conflicts. > Can someone help out to do the packport? Upstream commit 26f55386f964 ("arm64/mm: Fix __enable_mmu() for new TGRAN range values") can still be applied cleanly on top of linux-5.10.y. I can send it to if maintainers are okay with the stable-5.10 backport. [*] https://gitlab.com/qemu-project/qemu/-/commit/69b2265d5fe8 Zenghui _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel