Pranith Kumar <bobby.pr...@gmail.com> writes: > Hi Alex, > > Alex Bennée writes: > >> These flushes allow a per-mmuidx granularity to the TLB flushing and are >> currently only used by the ARM model. As it is possible to hammer the >> other vCPU threads with flushes (and build up long queues of identical >> flushes) we extend mechanism used for the global tlb_flush and set a >> bitmap describing all the pending flushes. The updates are done >> atomically to avoid corruption of the bitmap but repeating a flush is >> certainly not a problem. >> >> Signed-off-by: Alex Bennée <alex.ben...@linaro.org> > > <snip> > >> >> static inline void tlb_flush_entry(CPUTLBEntry *tlb_entry, target_ulong >> addr) >> @@ -233,16 +288,50 @@ void tlb_flush_page(CPUState *cpu, target_ulong addr) >> } >> } >> >> -void tlb_flush_page_by_mmuidx(CPUState *cpu, target_ulong addr, ...) >> +/* As we are going to hijack the bottom bits of the page address for a >> + * mmuidx bit mask we need to fail to build if we can't do that >> + */ >> +QEMU_BUILD_BUG_ON(NB_MMU_MODES > TARGET_PAGE_BITS); >> + > > FYI, this is causing a build error on my system with gcc 6.2. > > CC aarch64-softmmu/cputlb.o > In file included from > /home/pranith/devops/code/qemu/include/qemu/osdep.h:36:0, > from /home/pranith/devops/code/qemu/cputlb.c:20: > /home/pranith/devops/code/qemu/include/exec/cpu-all.h:196:26: error: > braced-group within expression allowed only inside a function > #define TARGET_PAGE_BITS ({ assert(target_page_bits_decided); \ > ^ > /home/pranith/devops/code/qemu/include/qemu/compiler.h:89:54: note: in > definition of macro ‘QEMU_BUILD_BUG_ON’ > typedef char glue(qemu_build_bug_on__,__LINE__)[(x)?-1:1] > __attribute__((unused)); > ^ > /home/pranith/devops/code/qemu/cputlb.c:293:34: note: in expansion of macro > ‘TARGET_PAGE_BITS’ > QEMU_BUILD_BUG_ON(NB_MMU_MODES > TARGET_PAGE_BITS); > ^~~~~~~~~~~~~~~~ > /home/pranith/devops/code/qemu/rules.mak:60: recipe for target 'cputlb.o' > failed > make[1]: *** [cputlb.o] Error 1 > Makefile:202: recipe for target 'subdir-aarch64-softmmu' failed > make: *** [subdir-aarch64-softmmu] Error 2
Odd. I'll look into it. What was you configure string and host architecture? > > Thanks, -- Alex Bennée