On 11/22/2017 09:41 AM, Juan Quintela wrote: > This commit started use tb_unlock() and tlb_set_dirty() on non TCG > code. Add the function as stubs. > > commit 27266271977c5a30f2f7d493e042be1897827bdd > Author: Peter Maydell <peter.mayd...@linaro.org> > Date: Mon Nov 20 18:08:27 2017 +0000 > > exec.c: Factor out before/after actions for notdirty memory writes > .... > > Signed-off-by: Juan Quintela <quint...@redhat.com> > --- > accel/stubs/tcg-stub.c | 8 ++++++++ > 1 file changed, 8 insertions(+)
Hmm. An alternate solution is diff --git a/exec.c b/exec.c index 03238a3449..ac902da89d 100644 --- a/exec.c +++ b/exec.c @@ -2378,6 +2378,7 @@ void memory_notdirty_write_prepare(NotDirtyInfo *ndi, /* Called within RCU critical section. */ void memory_notdirty_write_complete(NotDirtyInfo *ndi) { + assert(tcg_enabled()); if (ndi->locked) { tb_unlock(); } so that the rest of the function is compiled away. Thus my confusion about how Peter was adding any references to these functions -- he split half the function such that half is now not protected by an assert. Either solution works for me. So to streamline the process, Acked-by: Richard Henderson <richard.hender...@linaro.org> in case we wind up going with Juan's patch. r~