[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode |
Date: |
Wed, 24 Jun 2015 12:34:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
On 24/06/2015 12:21, Peter Maydell wrote:
> > I think signal_cpsr_e is exactly what you want for AArch32. It sets
> > CPSR.E in main and setup_return for AArch32.
> >
> > For AArch64 you don't need anything because, even though the kernel does
> > trap setend and tweak SCTLR.E0E in response to it, setup_return doesn't
> > try to restore the native endianness.
>
> I didn't think SETEND existed at all in AArch64?
No, but the kernel traps it and flips SCTLR.E0E. We don't have to
emulate that, and anyway you're right that userspace code will always be
the same endianness as the signal handler: the kernel expects it that way.
Paolo
> It's a 32-bit only
> instruction. So the AArch64 setup is anyway much simpler because
> you don't have to worry about the userspace code being a different
> endianness to what you want to run the signal handler as.
- Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode, Peter Crosthwaite, 2015/06/22
- Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode, Peter Maydell, 2015/06/23
- Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode, Peter Crosthwaite, 2015/06/23
- Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode, Peter Maydell, 2015/06/23
- Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode, Peter Crosthwaite, 2015/06/23
- Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode, Peter Maydell, 2015/06/23
- Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode, Paolo Bonzini, 2015/06/24
- Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode, Peter Maydell, 2015/06/24
- Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode, Peter Maydell, 2015/06/24
- Re: [Qemu-devel] [PATCH v3 04/11] linux-user: arm: set CPSR.E correctly for BE8 mode, Paolo Bonzini, 2015/06/24