cpu: Introduce a wrapper for tlb_flush() that can be used in common code
commit2cd53943115be5118b5b2d4b80ee0a39c94c4f73
authorThomas Huth <thuth@redhat.com>
Mon, 26 Jun 2017 05:22:55 +0000 (26 07:22 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 4 Jul 2017 12:30:03 +0000 (4 14:30 +0200)
tree74859d5c6385eb2d67abe38346d3a842c2fd879c
parentcbca3722a33ca6f6a8d9ceba89c5b3e7c28007ee
cpu: Introduce a wrapper for tlb_flush() that can be used in common code

Commit 1f5c00cfdb8114c ("qom/cpu: move tlb_flush to cpu_common_reset")
moved the call to tlb_flush() from the target-specific reset handlers
into the common code qom/cpu.c file, and protected the call with
"#ifdef CONFIG_SOFTMMU" to avoid that it is called for linux-user
only targets. But since qom/cpu.c is common code, CONFIG_SOFTMMU is
*never* defined here, so the tlb_flush() was simply never executed
anymore. Fix it by introducing a wrapper for tlb_flush() in a file
that is re-compiled for each target, i.e. in translate-all.c.

Fixes: 1f5c00cfdb8114c1e3a13426588ceb64f82c9ddb
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1498454578-18709-5-git-send-email-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
accel/tcg/translate-all.c
include/exec/cpu-common.h
qom/cpu.c