[QUESTION] How to run 16K page kernel with qemu

Zenghui Yu yuzenghui at huawei.com
Sat Sep 28 03:12:10 PDT 2024


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



More information about the linux-arm-kernel mailing list