[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [RFC PATCH v1 4/4] target-arm: Compute page size based on
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type |
Date: |
Mon, 13 Jun 2016 11:10:59 +0100 |
On 13 June 2016 at 10:43, Peter Maydell <address@hidden> wrote:
> On 13 June 2016 at 10:08, <address@hidden> wrote:
>> +/*
>> + * Holds TARGET_AARCH_64_PAGE_BITS or TARGET_ARM_PAGE_BITS
>> + * based on the the cpu type emulated at runtime.
>> + */
>> +static uint32_t target_page_bits;
>
> The CPU page size is not specific to the 'virt' board, so this
> is the wrong place to do this. You should identify the
> page size in arm_cpu_realizefn() based on the set of feature
> bits the CPU has: anything with ARM_FEATURE_V7 has a 4K page
> table (this includes a lot of 32-bit CPUs).
Actually that should be "with ARM_FEATURE_V7 and not
ARM_FEATURE_MPU", or we'll break the PMSA code.
Note that you'll also need to handle systems where the
different CPUs in it disagree about the preferred target
page size -- the xlnx-ep108 board can have both
Cortex-A53 (prefers 4K) and Cortex-R5 (prefers 1K) CPUs in it.
"Use the smallest value required by any CPU on the board"
is probably the best approach.
thanks
-- PMM
- [Qemu-arm] [RFC PATCH v1 0/4] ARM/AARCH64: Runtime page size computation, vijayak, 2016/06/13
- [Qemu-arm] [RFC PATCH v1 1/4] migration: Remove static allocation of xzblre cache buffer, vijayak, 2016/06/13
- [Qemu-arm] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type, vijayak, 2016/06/13
- Re: [Qemu-arm] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type, Paolo Bonzini, 2016/06/13
- Re: [Qemu-arm] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type, Peter Maydell, 2016/06/13
- Re: [Qemu-arm] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type,
Peter Maydell <=
- Re: [Qemu-arm] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type, Vijay Kilari, 2016/06/14
- Re: [Qemu-arm] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type, Peter Maydell, 2016/06/14
- Re: [Qemu-arm] [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type, Richard Henderson, 2016/06/16
- Re: [Qemu-arm] [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type, Vijay Kilari, 2016/06/17
- Re: [Qemu-arm] [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type, Peter Maydell, 2016/06/17
- Re: [Qemu-arm] [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type, Vijay Kilari, 2016/06/17
- Re: [Qemu-arm] [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type, Peter Maydell, 2016/06/17
- Re: [Qemu-arm] [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type, Peter Maydell, 2016/06/21
[Qemu-arm] [RFC PATCH v1 3/4] translate-all.c: Compute L1 page table properties at runtime, vijayak, 2016/06/13