Re: [Qemu-devel] [RFC v2 21/34] core: virtualise CPU interfaces completely

2015-06-02 Thread Paolo Bonzini
On 02/06/2015 11:52, Peter Crosthwaite wrote: > > 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. Goes without saying. :) Paolo

Re: [Qemu-devel] [RFC v2 21/34] core: virtualise CPU interfaces completely

2015-06-02 Thread Peter Crosthwaite
On Mon, Jun 1, 2015 at 12:53 PM, Richard Henderson wrote: > On 05/30/2015 11:11 PM, Peter Crosthwaite wrote: >> The tcg_ctx global is tricky. It needs to become part of the cpu state. >> This is done via a pointer. > > Why does it need to be virtualized? We already have one for each arch-obj-y. >

Re: [Qemu-devel] [RFC v2 21/34] core: virtualise CPU interfaces completely

2015-06-02 Thread Peter Crosthwaite
On Mon, Jun 1, 2015 at 1:11 AM, Paolo Bonzini 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,

Re: [Qemu-devel] [RFC v2 21/34] core: virtualise CPU interfaces completely

2015-06-01 Thread Richard Henderson
On 05/30/2015 11:11 PM, Peter Crosthwaite wrote: > The tcg_ctx global is tricky. It needs to become part of the cpu state. > This is done via a pointer. Why does it need to be virtualized? We already have one for each arch-obj-y. Is it really accessed from outside arch-obj-y? r~

Re: [Qemu-devel] [RFC v2 21/34] core: virtualise CPU interfaces completely

2015-06-01 Thread Paolo Bonzini
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? Paolo