On Mon, Jun 1, 2015 at 1:11 AM, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 31/05/2015 08:11, Peter Crosthwaite wrote: >> } >> - ret = cpu_exec(cpu); >> + ret = cpu->cpu_exec(cpu); > > Perhaps a > > #ifdef TARGET_MULTI > #define MULTI_CPU_HOOK(cpu, fn) (cpu->fn) > #else > #define MULTI_CPU_HOOK(cpu, fn) (fn) > #endif > > to devirtualize the functions in the common case? >
Yes. Can we make it briefer though as CPU_HOOK? I don't think we need to references to MULTI through the core code. Regards, Peter > Paolo > >> #ifdef CONFIG_PROFILER >> tcg_time += profile_getclock() - ti; >> #endif >> @@ -1433,7 +1433,7 @@ void cpu_reload_memory_map(CPUState *cpu) >> /* The CPU and TLB are protected by the iothread lock. */ >> d = atomic_rcu_read(&cpu->as->dispatch); >> cpu->memory_dispatch = d; >> - tlb_flush(cpu, 1); >> + cpu->tlb_flush(cpu, 1); >> } >> #endif >