qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 05/10] cpu-exec: elide more icount code if CONFI


From: Frederic Konrad
Subject: Re: [Qemu-devel] [PATCH 05/10] cpu-exec: elide more icount code if CONFIG_USER_ONLY
Date: Thu, 13 Aug 2015 15:14:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 12/08/2015 18:40, Paolo Bonzini wrote:
Signed-off-by: Paolo Bonzini <address@hidden>
---
  cpu-exec.c | 6 ++++++
  1 file changed, 6 insertions(+)
What about the icount part in CPUState and the tb_start/end ?
Can't this be removed as well?

Fred

diff --git a/cpu-exec.c b/cpu-exec.c
index 599e64d..bde5fd1 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -228,6 +228,7 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, 
uint8_t *tb_ptr)
      return next_tb;
  }
+#if defined(CONFIG_SOFTMMU)
  /* Execute the code without caching the generated code. An interpreter
     could be used if available. */
  static void cpu_exec_nocache(CPUState *cpu, int max_cycles,
@@ -251,6 +252,7 @@ static void cpu_exec_nocache(CPUState *cpu, int max_cycles,
      tb_phys_invalidate(tb, -1);
      tb_free(tb);
  }
+#endif
static TranslationBlock *tb_find_slow(CPUState *cpu,
                                        target_ulong pc,
@@ -523,6 +525,9 @@ int cpu_exec(CPUState *cpu)
                      case TB_EXIT_ICOUNT_EXPIRED:
                      {
                          /* Instruction counter expired.  */
+#ifdef CONFIG_USER_ONLY
+                        abort();
+#else
                          int insns_left = cpu->icount_decr.u32;
                          if (cpu->icount_extra && insns_left >= 0) {
                              /* Refill decrementer and continue execution.  */
@@ -542,6 +547,7 @@ int cpu_exec(CPUState *cpu)
                              cpu_loop_exit(cpu);
                          }
                          break;
+#endif
                      }
                      default:
                          break;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]