Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

2015-05-12 Thread Richard Henderson
On 05/12/2015 12:23 AM, Peter Crosthwaite wrote: > In my multi-compile approach helper_*[ld|st]* needs to be renamed > per-arch for the multiple compiled cputlb.o. Hence I have no symbol > with the unqualified name. But even if I do solve my namespacing > problem, I still have an ambiguity of which

Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

2015-05-12 Thread Peter Crosthwaite
On Mon, May 11, 2015 at 3:39 AM, Paolo Bonzini wrote: > > > On 11/05/2015 12:36, Andreas Färber wrote: >> > Right. My point was that these functions are not polymorphic. Each >> > call to these should know exactly which function to call. >> > >> > cputlb.c, cpu-exec.c and parts of translate-all.

Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

2015-05-12 Thread Peter Crosthwaite
On Mon, May 11, 2015 at 1:18 PM, Richard Henderson wrote: > On 05/11/2015 03:24 AM, Paolo Bonzini wrote: >> >> >> On 11/05/2015 12:18, Andreas Färber wrote: > +int (*cpu_mmu_index)(CPUState *cpu); > +void (*cpu_get_tb_cpu_state)(CPUState *cpu, > +

Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

2015-05-11 Thread Richard Henderson
On 05/11/2015 03:24 AM, Paolo Bonzini wrote: > > > On 11/05/2015 12:18, Andreas Färber wrote: +int (*cpu_mmu_index)(CPUState *cpu); +void (*cpu_get_tb_cpu_state)(CPUState *cpu, + void *pc, /* target_long * */ +

Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

2015-05-11 Thread Peter Maydell
On 11 May 2015 at 07:29, Peter Crosthwaite wrote: > These definitions are defined per-target and globall linked/defined > between core code and target-foo. QOMify them. Provide weakly linked > conditional default implementations for the non-qomified global fns. > This means converted architectures

Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

2015-05-11 Thread Paolo Bonzini
On 11/05/2015 12:36, Andreas Färber wrote: > > Right. My point was that these functions are not polymorphic. Each > > call to these should know exactly which function to call. > > > > cputlb.c, cpu-exec.c and parts of translate-all.c should be the moral > > equivalent of C++ templates. I woul

Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

2015-05-11 Thread Andreas Färber
Am 11.05.2015 um 12:24 schrieb Paolo Bonzini: > On 11/05/2015 12:18, Andreas Färber wrote: +int (*cpu_mmu_index)(CPUState *cpu); +void (*cpu_get_tb_cpu_state)(CPUState *cpu, + void *pc, /* target_long * */ +

Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

2015-05-11 Thread Paolo Bonzini
On 11/05/2015 12:18, Andreas Färber wrote: >> > +int (*cpu_mmu_index)(CPUState *cpu); >> > +void (*cpu_get_tb_cpu_state)(CPUState *cpu, >> > + void *pc, /* target_long * */ >> > + void *cs_base, /* target_long */ >> > +

Re: [Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

2015-05-11 Thread Andreas Färber
Am 11.05.2015 um 08:29 schrieb Peter Crosthwaite: > These definitions are defined per-target and globall linked/defined > between core code and target-foo. QOMify them. Provide weakly linked > conditional default implementations for the non-qomified global fns. > This means converted architectures

[Qemu-devel] [RFC PATCH 02/34] tcg+qom: QOMify core CPU defintions

2015-05-10 Thread Peter Crosthwaite
These definitions are defined per-target and globall linked/defined between core code and target-foo. QOMify them. Provide weakly linked conditional default implementations for the non-qomified global fns. This means converted architectures which install a QOM hook do not need to define a function