[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target/arm: Fix 32-bit address truncation
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] target/arm: Fix 32-bit address truncation |
Date: |
Mon, 22 Jan 2018 11:12:36 +0000 |
On 19 January 2018 at 19:46, Ard Biesheuvel <address@hidden> wrote:
> Commit ("3b39d734141a target/arm: Handle page table walk load failures
> correctly") modified both versions of the page table walking code (i.e.,
> arm_ldl_ptw and arm_ldq_ptw) to record the result of the translation in
> a temporary 'data' variable so that it can be inspected before being
> returned. However, arm_ldq_ptw() returns an uint64_t, and using a
> temporary uint32_t variable truncates the upper bits, corrupting the
> result. This causes problems when using more than 4 GB of memory in
> a TCG guest. So use a uint64_t instead.
>
> Signed-off-by: Ard Biesheuvel <address@hidden>
Oops. As you probably guessed, I wrote the 32-bit load function
first and then failed to update it correctly when writing the 64-bit
version...
Applied to target-arm.next, thanks.
-- PMM