[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH 2/3] linux-user: Tidy and enforce res
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH 2/3] linux-user: Tidy and enforce reserved_va initialization |
Date: |
Tue, 3 Oct 2017 17:24:44 +0100 |
On 8 July 2017 at 03:50, Richard Henderson <address@hidden> wrote:
> We had a check using TARGET_VIRT_ADDR_SPACE_BITS to make sure
> that the allocation coming in from the command-line option was
> not too large, but that didn't include target-specific knowledge
> about other restrictions on user-space.
>
> Remove several target-specific hacks in linux-user/main.c.
>
> For MIPS and Nios, we can replace them with proper adjustments
> to the respective target's TARGET_VIRT_ADDR_SPACE_BITS definition.
>
> For ARM, we had no existing ifdef but I suspect that the current
> default value of 0xf7000000 was chosen with this in mind. Define
> a workable value in linux-user/arm/, and also document why the
> special case is required.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> linux-user/arm/target_cpu.h | 4 ++++
> target/mips/mips-defs.h | 6 +++++-
> target/nios2/cpu.h | 6 +++++-
> linux-user/main.c | 38 +++++++++++++++++++++++++-------------
> 4 files changed, 39 insertions(+), 15 deletions(-)
>
> diff --git a/linux-user/arm/target_cpu.h b/linux-user/arm/target_cpu.h
> index d888219..c4f79eb 100644
> --- a/linux-user/arm/target_cpu.h
> +++ b/linux-user/arm/target_cpu.h
> @@ -19,6 +19,10 @@
> #ifndef ARM_TARGET_CPU_H
> #define ARM_TARGET_CPU_H
>
> +/* We need to be able to map the commpage.
> + See validate_guest_space in linux-user/elfload.c. */
> +#define MAX_RESERVED_VA 0xfff00000ul
> +
This should be 0xffff0000, but you'll need the bugfix patch I just sent
out first.
(Why "UL" ? That's usually a wrong choice compared to either U or ULL.)
Otherwise
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
- Re: [Qemu-arm] [Qemu-devel] [PATCH 2/3] linux-user: Tidy and enforce reserved_va initialization,
Peter Maydell <=