On 17 March 2016 at 13:46, <sergey.fedo...@linaro.org> wrote: > From: Paolo Bonzini <pbonz...@redhat.com> > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > Signed-off-by: Sergey Fedorov <sergey.fedo...@linaro.org> > --- > translate-all.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/translate-all.c b/translate-all.c > index e9f409b762ab..f17ace1ae899 100644 > --- a/translate-all.c > +++ b/translate-all.c > @@ -784,6 +784,9 @@ void tb_free(TranslationBlock *tb) > > static inline void invalidate_page_bitmap(PageDesc *p) > { > +#ifndef CONFIG_SOFTMMU > + assert(p->code_bitmap == NULL); > +#endif > g_free(p->code_bitmap); > p->code_bitmap = NULL; > p->code_write_count = 0; > @@ -1018,6 +1021,7 @@ void tb_phys_invalidate(TranslationBlock *tb, > tb_page_addr_t page_addr) > tcg_ctx.tb_ctx.tb_phys_invalidate_count++; > }
You could pretty much take this another step and actually make the field in the struct be only present ifdef CONFIG_SOFTMMU... thanks -- PMM