|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 02/10] compiler.h: add QEMU_CACHELINE + QEMU_ALIGN() + QEMU_CACHELINE_ALIGNED |
Date: | Tue, 5 Apr 2016 17:29:05 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |