[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v2 21/34] core: virtualise CPU interfaces complete
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [RFC v2 21/34] core: virtualise CPU interfaces completely |
Date: |
Tue, 2 Jun 2015 02:52:01 -0700 |
On Mon, Jun 1, 2015 at 1:11 AM, Paolo Bonzini <address@hidden> 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
>