Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-28 Thread Emilio G. Cota
On Wed, Nov 28, 2018 at 12:40:23 +, Alex Bennée wrote: > I was envisioning something more like the following so all the plugin > gubins could be kept in the core code: (snip) > static inline uint32_t arm_ldl_code(CPUARMState *env, target_ulong addr, > bool

Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-28 Thread Alex Bennée
Emilio G. Cota writes: > On Mon, Nov 26, 2018 at 20:38:25 -0500, Emilio G. Cota wrote: >> On Mon, Nov 26, 2018 at 11:30:25 -0800, Richard Henderson wrote: >> > On 11/26/18 11:07 AM, Emilio G. Cota wrote: >> > > The main reason why I added the qemu_plugin_insn_append calls >> > > was to avoid

Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-27 Thread Emilio G. Cota
On Tue, Nov 27, 2018 at 19:54:02 -0500, Emilio G. Cota wrote: > To avoid altering the signature of .translate_insn, I've modified > arm_ldl_code directly, as follows: > > uint32_t insn = cpu_ldl_code(env, addr); > + > if (bswap_code(sctlr_b)) { > -return bswap32(insn); > +

Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-27 Thread Emilio G. Cota
On Mon, Nov 26, 2018 at 20:38:25 -0500, Emilio G. Cota wrote: > On Mon, Nov 26, 2018 at 11:30:25 -0800, Richard Henderson wrote: > > On 11/26/18 11:07 AM, Emilio G. Cota wrote: > > > The main reason why I added the qemu_plugin_insn_append calls > > > was to avoid reading the instructions twice

Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-27 Thread Pavel Dovgalyuk
> From: Emilio G. Cota [mailto:c...@braap.org] > On Mon, Nov 26, 2018 at 10:27:12 -0800, Richard Henderson wrote: > > On 11/26/18 6:52 AM, Alex Bennée wrote: > > > I'm not convinced this is the best way to go about it. We end up having > > > to sprinkle the plugin calls into each decoder rather

Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-26 Thread Emilio G. Cota
On Mon, Nov 26, 2018 at 11:30:25 -0800, Richard Henderson wrote: > On 11/26/18 11:07 AM, Emilio G. Cota wrote: > > The main reason why I added the qemu_plugin_insn_append calls > > was to avoid reading the instructions twice from guest memory, > > because I was worried that doing so might somehow

Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-26 Thread Richard Henderson
On 11/26/18 11:07 AM, Emilio G. Cota wrote: > The main reason why I added the qemu_plugin_insn_append calls > was to avoid reading the instructions twice from guest memory, > because I was worried that doing so might somehow alter the > guest's execution, e.g. what if we read a cross-page

Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-26 Thread Richard Henderson
On 11/26/18 10:56 AM, Alex Bennée wrote: > > > On Mon, 26 Nov 2018, 18:27 Richard Henderson wrote: > > On 11/26/18 6:52 AM, Alex Bennée wrote: > > I'm not convinced this is the best way to go about it. We end up having > > to sprinkle the

Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-26 Thread Emilio G. Cota
On Mon, Nov 26, 2018 at 10:27:12 -0800, Richard Henderson wrote: > On 11/26/18 6:52 AM, Alex Bennée wrote: > > I'm not convinced this is the best way to go about it. We end up having > > to sprinkle the plugin calls into each decoder rather than keeping all > > the infrastructure in the common

Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-26 Thread Alex Bennée
On Mon, 26 Nov 2018, 18:27 Richard Henderson On 11/26/18 6:52 AM, Alex Bennée wrote: > > I'm not convinced this is the best way to go about it. We end up having > > to sprinkle the plugin calls into each decoder rather than keeping all > > the infrastructure in the common main loop. However the

Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-26 Thread Richard Henderson
On 11/26/18 6:52 AM, Alex Bennée wrote: > I'm not convinced this is the best way to go about it. We end up having > to sprinkle the plugin calls into each decoder rather than keeping all > the infrastructure in the common main loop. However the common loop will > need to know the total number of

Re: [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-11-26 Thread Alex Bennée
Emilio G. Cota writes: > Signed-off-by: Emilio G. Cota > --- > include/exec/translator.h | 4 +++- > accel/tcg/translator.c | 4 ++-- > target/alpha/translate.c| 3 ++- > target/arm/translate-a64.c | 3 ++- > target/arm/translate.c | 6 -- > target/hppa/translate.c |

[Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn

2018-10-25 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/exec/translator.h | 4 +++- accel/tcg/translator.c | 4 ++-- target/alpha/translate.c| 3 ++- target/arm/translate-a64.c | 3 ++- target/arm/translate.c | 6 -- target/hppa/translate.c | 3 ++- target/i386/translate.c | 3 ++-