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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF4A2ECAAA1 for ; Fri, 28 Oct 2022 20:35:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 376984B830; Fri, 28 Oct 2022 16:35:56 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ssm9NnCT2f-7; Fri, 28 Oct 2022 16:35:54 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id ED8CD4B7FE; Fri, 28 Oct 2022 16:35:54 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 5CD614B7FC for ; Fri, 28 Oct 2022 16:35:54 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MVxIpNn7G9Ag for ; Fri, 28 Oct 2022 16:35:52 -0400 (EDT) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 14EFD4B7FB for ; Fri, 28 Oct 2022 16:35:52 -0400 (EDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 97CF0B82BE2; Fri, 28 Oct 2022 20:35:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F01FC433D6; Fri, 28 Oct 2022 20:35:46 +0000 (UTC) Date: Fri, 28 Oct 2022 21:35:42 +0100 From: Catalin Marinas To: Zenghui Yu Subject: Re: [PATCH V2] arm64/mm: Fix __enable_mmu() for new TGRAN range values Message-ID: References: <1615355590-21102-1-git-send-email-anshuman.khandual@arm.com> <20220826120020.GB520@mutt> <84e674ab-3eee-3f2b-28c1-a08ff99d6d3b@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <84e674ab-3eee-3f2b-28c1-a08ff99d6d3b@huawei.com> Cc: linux-efi@vger.kernel.org, Anders Roxell , arnd@arndb.de, Anshuman Khandual , Marc Zyngier , linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Will Deacon , linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Fri, Oct 28, 2022 at 10:18:41AM +0800, Zenghui Yu wrote: > 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 > > > > 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. If you have a backport, please send it (and cc the original author/reviewers just to double-check that the backport is correct). Thanks. -- Catalin _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 398FFC38A02 for ; Fri, 28 Oct 2022 20:35:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229950AbiJ1Uf5 (ORCPT ); Fri, 28 Oct 2022 16:35:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbiJ1Ufz (ORCPT ); Fri, 28 Oct 2022 16:35:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 508FFEA9EF; Fri, 28 Oct 2022 13:35:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DC58E62A51; Fri, 28 Oct 2022 20:35:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F01FC433D6; Fri, 28 Oct 2022 20:35:46 +0000 (UTC) Date: Fri, 28 Oct 2022 21:35:42 +0100 From: Catalin Marinas To: Zenghui Yu Cc: Anders Roxell , Anshuman Khandual , linux-arm-kernel@lists.infradead.org, James Morse , Will Deacon , Marc Zyngier , Suzuki K Poulose , Ard Biesheuvel , Mark Rutland , kvmarm@lists.cs.columbia.edu, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, alex.bennee@linaro.org, arnd@arndb.de Subject: Re: [PATCH V2] arm64/mm: Fix __enable_mmu() for new TGRAN range values Message-ID: References: <1615355590-21102-1-git-send-email-anshuman.khandual@arm.com> <20220826120020.GB520@mutt> <84e674ab-3eee-3f2b-28c1-a08ff99d6d3b@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84e674ab-3eee-3f2b-28c1-a08ff99d6d3b@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On Fri, Oct 28, 2022 at 10:18:41AM +0800, Zenghui Yu wrote: > 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 > > > > 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. If you have a backport, please send it (and cc the original author/reviewers just to double-check that the backport is correct). Thanks. -- Catalin 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 1A990C38A02 for ; Fri, 28 Oct 2022 20:36:49 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eZ+DRHK/ABX9c0BVwZwO1yXi7U3DebrG5/CJSxI8YFc=; b=vyn8Vl15Vl5nUC OcLFsnADqMdBZiEKaH2vwFt3scDtHGNfkVx95xLHQccOMZqzbcB59t5X82UJJkobyQug+gIKiDXnf ZjzfKmf8Zl/cM5TGyNkWYtNUn23TrGQUCC4oxc+vrdtvSJqUBoVV9M8sabdXOh88P2miVeypOcYI0 N6XICBJfxzjvrMT8+E1p1zceSQWTlAIhlsR1ts/uTtd/J3ZiTrzYTkCkLImIPxJA4TYNb34Hm1EPn KB/HVQvxXJNemRXCI/BMpslA9DOi2L0UkNBUS4khdnERDFe/Yl+5dd/LRuOXsTSrF9KdfNKhrFTRW bPg7TD0eo/cR5ZTJ+tQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooW56-002CZG-9V; Fri, 28 Oct 2022 20:35:56 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooW52-002CY1-1p for linux-arm-kernel@lists.infradead.org; Fri, 28 Oct 2022 20:35:54 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 97CF0B82BE2; Fri, 28 Oct 2022 20:35:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F01FC433D6; Fri, 28 Oct 2022 20:35:46 +0000 (UTC) Date: Fri, 28 Oct 2022 21:35:42 +0100 From: Catalin Marinas To: Zenghui Yu Cc: Anders Roxell , Anshuman Khandual , linux-arm-kernel@lists.infradead.org, James Morse , Will Deacon , Marc Zyngier , Suzuki K Poulose , Ard Biesheuvel , Mark Rutland , kvmarm@lists.cs.columbia.edu, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, alex.bennee@linaro.org, arnd@arndb.de Subject: Re: [PATCH V2] arm64/mm: Fix __enable_mmu() for new TGRAN range values Message-ID: References: <1615355590-21102-1-git-send-email-anshuman.khandual@arm.com> <20220826120020.GB520@mutt> <84e674ab-3eee-3f2b-28c1-a08ff99d6d3b@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <84e674ab-3eee-3f2b-28c1-a08ff99d6d3b@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221028_133552_259582_8EDEAA32 X-CRM114-Status: GOOD ( 26.99 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 28, 2022 at 10:18:41AM +0800, Zenghui Yu wrote: > 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 > > > > 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. If you have a backport, please send it (and cc the original author/reviewers just to double-check that the backport is correct). Thanks. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel