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 4D569CF6493 for ; Sat, 28 Sep 2024 10:13:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type: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=x96UI/uWz+my45ZEZtkxlS30WQZl3d6DkHpatPxBMQQ=; b=TqVlJdYQ6yMjxjRnly6hX7gfqG 30Dqd6QRWkqFf2ZXVskAiFuY9iHPBQYZJCzjWRQ8Ul3vLQqhAbR1GVPW0pROyjwRd/N9fqC1XSBsm LVEZX/MM2EuN+Vlz0xDVBDozSoGQl35eIwPNyYxI23Buv980z5cqemJFe1IrchcHfV54z/Rr+NNCt ePMtSOuKBxWpgfhMpN9xsvyzsKeWigmCWena1k3y0ZR1c6Gqnb7CEiVRCD6q7UkCpswT56bXzmDsb 0TsamfVgymEGRbZw1lZ1SlnrPtstM+WzOZQgeSo3GLUdwAl4WcXwkqimmLBqStxFg4rvHK/JO8Tar JKlnlXpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1suUSF-0000000Cv7q-01jG; Sat, 28 Sep 2024 10:13:35 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1suUR1-0000000Cv4r-2zYI for linux-arm-kernel@lists.infradead.org; Sat, 28 Sep 2024 10:12:22 +0000 Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4XG31t34twz1HK5p; Sat, 28 Sep 2024 18:08:18 +0800 (CST) Received: from kwepemm600007.china.huawei.com (unknown [7.193.23.208]) by mail.maildlp.com (Postfix) with ESMTPS id 2A5CC140120; Sat, 28 Sep 2024 18:12:12 +0800 (CST) Received: from [10.174.178.219] (10.174.178.219) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Sat, 28 Sep 2024 18:12:11 +0800 Subject: Re: [QUESTION] How to run 16K page kernel with qemu To: Wenchao Hao CC: "Russell King (Oracle)" , Catalin Marinas , Will Deacon , , References: <4812cbbb-8eb2-4b3b-97c1-71f0126641f3@gmail.com> From: Zenghui Yu Message-ID: <29808ddd-d90e-1856-5277-cd9e6c5c09fe@huawei.com> Date: Sat, 28 Sep 2024 18:12:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <4812cbbb-8eb2-4b3b-97c1-71f0126641f3@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.219] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemm600007.china.huawei.com (7.193.23.208) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240928_031220_060603_455B8966 X-CRM114-Status: GOOD ( 14.96 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2024/9/21 18:55, Wenchao Hao wrote: > On 2024/9/21 18:48, Russell King (Oracle) wrote: > > On Sat, Sep 21, 2024 at 06:31:49PM +0800, Wenchao Hao wrote: > > > Is anyone help to point out how to run ARM64 16K pages kernel? Or is there > > > any doc about it? Did I miss any critical changes? > > > > Your command lines indicate you want a Cortex A72. Cortex A72 supports > > 4K, 64K and 1M page sizes. It doesn't support 16K page sizes. > > > > Therefore, a 16K page sized kernel will not boot on Cortex A72. > > > > Thanks a lot for your reply, which ARM core support 16K page size? > Where can I find these support info? Per ARM DDI 0487K.a, ID_AA64MMFR0_EL1.TGran16 (bits [23:20]) indicates support for 16KB memory translation granule size. You can find the specific value of TGran16 filed in Cortex A72's TRM [*]. Since you are using QEMU's tcg accelerator, you can have a look at the aarch64_cpus[] array in target/arm/tcg/cpu64.c to understand how QEMU exposes these feature ID registers to guests. And if your HW supports 16KB granule size, you can *alternatively* expose it for guests by putting '-cpu host -accel kvm' parameter in your QEMU command line (if you're running things on a KVM host). [*] https://developer.arm.com/documentation/100095/latest/ Thanks, Zenghui