[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/3] target-arm: support setend instruction
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 0/3] target-arm: support setend instruction |
Date: |
Mon, 21 Apr 2014 22:42:14 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
Il 21/04/2014 18:08, Peter Maydell ha scritto:
Thinking more about this, we'd be wrong already for bigendian
if these were wrong. The bit about the linux-user/main.c strex/ldrex
still stands, though, because those use get_user*/put_user* which
use the TARGET_BIGENDIAN specified endianness.
Ok.
The commpage
code may also need updating to correctly handle the effects of being
called with the wrong endianness (though we can probably get away
with declaring that to be lunacy and not well defined...)
Yeah, I think this is lunacy. :)
If we take an exception while the E bit is set we'll now incorrectly
start executing the exception handler in big-endian mode.
Minimally, we need to force "always little endian". Ideally, we
would implement SCTLR.EE correctly.
I'll look into SCTLR.
Also worth checking: in linux-user mode, if the guest executes
SETEND and then takes a signal, what does the Linux ABI say
should be the value of CPSR.E on entry to the signal handler,
and do we get it right?
No, my patch does not even try. Thanks for pointing out. The kernel
sets CPSR.E for armeb and clears it otherwise.
Paolo
[Tangentially: we really need a vdso for aarch64, at which point we
might as well do the aarch32 commpage with one too. IIRC RTH had
some patches for x86-64 vdso which I should fish out of the archives...]
thanks
-- PMM