[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/13] target/arm: Add ARM_FEATURE_SWP
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 01/13] target/arm: Add ARM_FEATURE_SWP |
Date: |
Sun, 16 Sep 2018 17:54:02 +0100 |
On 16 September 2018 at 16:53, Richard Henderson
<address@hidden> wrote:
> On 9/15/18 6:32 PM, Peter Maydell wrote:
>> We want to arrange to have SWP work anyway on linux-user,
>> I think, since the kernel will typically trap-and-emulate
>> it assuming it was built with CONFIG_SWP_EMULATE. (I don't
>> know if those kernels will advertise swp in the hwcaps,
>> but I guess not.)
>
> Ah, I did not know about SWP_EMULATE. It appears to be
> specific to armv7+ (though we don't support the pre-v4
> cpus for which it might otherwise be relevant).
Yes, it's intended to allow older userspace binaries to continue
to work on newer CPUs without SWP, not to try to run new binaries
on older CPUs. (Anything compiled for a CPU new enough for SWP
probably uses other newer insns that some pre-v4 CPU doesn't have
anyway.)
> It does appear that HWCAP_SWP is advertised anyway:
>
> mm/proc-v7.S: .long HWCAP_SWP | HWCAP_HALF | HWCAP_THUMB | HWCAP_FAST_MULT
Interesting. I might ask some random kernel person what the semantics
of hwcap are -- is it "will work even if a terrible plan" or "it makes
sense to use this"?
thanks
-- PMM
- [Qemu-devel] [RFC PATCH 00/13] target/arm: Derive cpu id regs from features, Richard Henderson, 2018/09/15
- [Qemu-devel] [PATCH 02/13] target/arm: Derive id_isar0 from features, Richard Henderson, 2018/09/15
- [Qemu-devel] [PATCH 03/13] target/arm: Derive id_isar1 from features, Richard Henderson, 2018/09/15
- [Qemu-devel] [PATCH 05/13] target/arm: Derive id_isar3 from features, Richard Henderson, 2018/09/15
- [Qemu-devel] [PATCH 06/13] target/arm: Derive id_isar4 from features, Richard Henderson, 2018/09/15
- [Qemu-devel] [PATCH 04/13] target/arm: Derive id_isar2 from features, Richard Henderson, 2018/09/15
- [Qemu-devel] [PATCH 08/13] target/arm: Derive id_pfr0 from features, Richard Henderson, 2018/09/15
- [Qemu-devel] [PATCH 07/13] target/arm: Derive id_isar5 and id_isar6 from features, Richard Henderson, 2018/09/15
- [Qemu-devel] [PATCH 09/13] target/arm: Derive id_pfr1 from features, Richard Henderson, 2018/09/15
- [Qemu-devel] [PATCH 10/13] target/arm: Derive id_aa64isar0 from features, Richard Henderson, 2018/09/15