[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.4] tcg/i386: ignore high bits for user mod
From: |
Leon Alrae |
Subject: |
Re: [Qemu-devel] [PATCH for-2.4] tcg/i386: ignore high bits for user mode 32-bit qemu_ld/st |
Date: |
Wed, 15 Jul 2015 16:06:00 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 15/07/2015 14:55, Aurelien Jarno wrote:
> For a 64-bit host not implementing the trunc_shr_i32 op, the high bits
> of a register should be ignored for 32-bit ops. This is currently not
> the case of qemu_ld/st ops in user mode.
>
> Fix that by either using the ADDR32 prefix (in case GUEST_BASE == 0 or
> a segment register is in use), or by doing an explicit zero-extension.
> The zero-extension can be done in place as we know the registers holds
> a 32-bit value.
>
> Reported-by: Leon Alrae <address@hidden>
> Cc: Leon Alrae <address@hidden>
> Cc: Paolo Bonzini <address@hidden>
> Cc: Richard Henderson <address@hidden>
> Signed-off-by: Aurelien Jarno <address@hidden>
> ---
> tcg/i386/tcg-target.c | 44 ++++++++++++++++++++++++++++++++------------
> 1 file changed, 32 insertions(+), 12 deletions(-)
Tested-by: Leon Alrae <address@hidden>
Thanks for looking into this!
Leon