Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2973291rwi; Fri, 28 Oct 2022 13:57:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4eCwIgiKvLTGX7R8IJZaQu1McWwhg5AXze3oDk5WWEixqJ2tbiWOgPZJ19tbNmWX/zACPx X-Received: by 2002:a17:902:d2c5:b0:186:afd7:56d3 with SMTP id n5-20020a170902d2c500b00186afd756d3mr890713plc.142.1666990661825; Fri, 28 Oct 2022 13:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666990661; cv=none; d=google.com; s=arc-20160816; b=QAyOOCsKZLXt4I+XOfMQsCsqS8/2Du5SHJZKJ6ToAbuXwRhfeKXOePRS/JsO+Rpakp hmlFejYUeL7J2w6eCMB7rrsVIe1vEJiw1ZL8U9Jk14YoqukONjRLdcqTnhD9X6MOsrw3 JeVUXnHtqQYLAst4IzgCQZDUW2aAL8enbts4apaf3zjBdYduD09Cw3oxSEvOVMCalQtv ku+vIB0xlx34T805NBT/snDd8VEuf/ncISn8Xpphp0HVE5SlXiCtxpKyYEDsNXPq2kC5 JNQCcl2dkJTgDQUWjnzE2hy9yk3LiCXX46hSZWZyAxtTI9FsAwGtRDsgZQ/MvnjKO1AC TXvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=uuERq3GsiwikLiWu/NwBHZbmExdTVWjIt5INDzjk0mQ=; b=lQS7rRkaR5BpxK/ata8xC5WEaU1mPIK7GFajQcwPcyf8zZ2DdKMRuFAXxarr7gstsc yx975DycM2Q6r7JsJi8HLfUFc3IqDv7nLZYzhT3Tky0ZHFbfszagxt/0FnCQwKvwgeeP 3W7A1rBYq6OtU3trCCmQNRnhWSF1nQRiiAhNyKAVJ/BuMNeiwGteXpIrwfpZPPBYkw6K 7DNDndGMSoUDLcA35QzkXwi8XByFahwu7DbpXMnL63EmzJ7otaRcVxZhPx+HyQPD8Uhg 7y7/PU9SxO93U+CfyQrsmmrCdE8sMfHsFewRNnDirjM78+gYcG9WJQ1n+PzE/F14PIvA p90A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a170902e48300b00186e3781ae2si5414387ple.316.2022.10.28.13.57.30; Fri, 28 Oct 2022 13:57:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229887AbiJ1Uf6 (ORCPT + 99 others); Fri, 28 Oct 2022 16:35:58 -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> X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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