On 05/04/2016 14:58, Peter Maydell wrote:
>> >
>> > You should make this a value taken from configure. In linux you could use
>> > something like:
>> >
>> > getconf LEVEL1_DCACHE_LINESIZE
>> >
>> > Or an equivalent program using sysconf(3) if getconf is not present.
> The cache line size at compile time is not necessarily the cache
> line size at runtime...
But the size of data structures cannot change at run-time. A bigger
worry is cross-compilation.
Linux has these defaults:
Alpha 32 or 64
ARM configurable, 64 for ARMv7
AArch64 128
PPC 128
s390 256
x86 configurable, default 64
which should be easy to copy in QEMU too.
Paolo