diff --git a/qemu/accel/tcg/translate-all.c b/qemu/accel/tcg/translate-all.c index 217522d085..6a28f55530 100644 --- a/qemu/accel/tcg/translate-all.c +++ b/qemu/accel/tcg/translate-all.c @@ -1019,12 +1019,18 @@ void free_code_gen_buffer(struct uc_struct *uc) static inline void *alloc_code_gen_buffer(struct uc_struct *uc) { TCGContext *tcg_ctx = uc->tcg_ctx; +#if CONFIG_TCG_INTERPRETER + int prot = PROT_WRITE | PROT_READ; +#else int prot = PROT_WRITE | PROT_READ | PROT_EXEC; +#endif int flags = MAP_PRIVATE | MAP_ANONYMOUS; size_t size = tcg_ctx->code_gen_buffer_size; void *buf; +#if !CONFIG_TCG_INTERPRETER #ifdef USE_MAP_JIT flags |= MAP_JIT; +#endif #endif buf = mmap(NULL, size, prot, flags, -1, 0); if (buf == MAP_FAILED) { diff --git a/qemu/configure b/qemu/configure index 581dceee8f..f78684b28a 100755 --- a/qemu/configure +++ b/qemu/configure @@ -2570,7 +2570,7 @@ if test "$have_sprr" = "yes" ; then fi if test "$interpreter" = "yes" ; then - echo "HAVE_INTERPRETER=y" >> $config_host_mak + echo "CONFIG_TCG_INTERPRETER=y" >> $config_host_mak fi # Hold two types of flag: