On 6 November 2013 14:21, Peter Maydell peter.maydell@linaro.org wrote:
On 6 November 2013 13:05, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
[...]
Thanks, I was wondering about that. Should there be another check? Not all v8 cores will implement these extensions, so we might also want to emulate one that doesn't, I suppose?
Yes, that would probably be better, actually: add a new ARM_FEATURE_ bit and then make ARM_FEATURE_V8 imply that new bit in arm_cpu_realizefn().
On the v8 kernel side, there will be different hwcaps for AES, mull.p64, SHA2, SHA3 and CRC, according to
http://marc.info/?l=linux-arm-kernel&m=138308148814679&w=2
and Steve Capper is currently extending the patch to include setting Aarch32 compat flags for each of those. For now, I will just add a flag called ARM_FEATURE_V8_AES, which gets set when V8 is enabled, and leave everything else (including emulating a v8 CPU in Aarch32 mode without AES extensions) to someone else.
Cheers, Ard.