Re: [Qemu-devel] [PATCH v3 19/50] tcg: let plugins instrument memory accesses

2019-07-02 Thread Aaron Lindsay OS via Qemu-devel
On Jul 01 16:00, Alex Bennée wrote: > Aaron Lindsay OS writes: > > - a way for a plugin to reset any instrumentation decisions made in the > > past (essentially calls `tb_flush(cpu);` under the covers). We found > > this critical for plugins which undergo state changes during the > > course

Re: [Qemu-devel] [PATCH v3 19/50] tcg: let plugins instrument memory accesses

2019-07-01 Thread Alex Bennée
Aaron Lindsay OS writes: > On Jun 28 21:52, Alex Bennée wrote: >> Aaron Lindsay OS writes: >> > To make sure I understand - you're implying that one such query will >> > return the PA from the guest's perspective, right? >> >> Yes - although it will be two queries: >> >> struct

Re: [Qemu-devel] [PATCH v3 19/50] tcg: let plugins instrument memory accesses

2019-07-01 Thread Aaron Lindsay OS via Qemu-devel
On Jun 28 21:52, Alex Bennée wrote: > Aaron Lindsay OS writes: > > To make sure I understand - you're implying that one such query will > > return the PA from the guest's perspective, right? > > Yes - although it will be two queries: > > struct qemu_plugin_hwaddr *hw =

Re: [Qemu-devel] [PATCH v3 19/50] tcg: let plugins instrument memory accesses

2019-06-28 Thread Alex Bennée
Aaron Lindsay OS writes: > On Jun 28 18:11, Alex Bennée wrote: >> Aaron Lindsay OS writes: >> > On Jun 14 18:11, Alex Bennée wrote: >> >> From: "Emilio G. Cota" >> >> >> >> Here the trickiest feature is passing the host address to >> >> memory callbacks that request it. Perhaps it would be

Re: [Qemu-devel] [PATCH v3 19/50] tcg: let plugins instrument memory accesses

2019-06-28 Thread Aaron Lindsay OS via Qemu-devel
On Jun 28 18:11, Alex Bennée wrote: > Aaron Lindsay OS writes: > > On Jun 14 18:11, Alex Bennée wrote: > >> From: "Emilio G. Cota" > >> > >> Here the trickiest feature is passing the host address to > >> memory callbacks that request it. Perhaps it would be more > >> appropriate to pass a

Re: [Qemu-devel] [PATCH v3 19/50] tcg: let plugins instrument memory accesses

2019-06-28 Thread Alex Bennée
Aaron Lindsay OS writes: > On Jun 14 18:11, Alex Bennée wrote: >> From: "Emilio G. Cota" >> >> Here the trickiest feature is passing the host address to >> memory callbacks that request it. Perhaps it would be more >> appropriate to pass a "physical" address to plugins, but since >> in QEMU

Re: [Qemu-devel] [PATCH v3 19/50] tcg: let plugins instrument memory accesses

2019-06-28 Thread Aaron Lindsay OS via Qemu-devel
On Jun 14 18:11, Alex Bennée wrote: > From: "Emilio G. Cota" > > Here the trickiest feature is passing the host address to > memory callbacks that request it. Perhaps it would be more > appropriate to pass a "physical" address to plugins, but since > in QEMU host addr ~= guest physical, I'm

Re: [Qemu-devel] [PATCH v3 19/50] tcg: let plugins instrument memory accesses

2019-06-17 Thread Richard Henderson
On 6/14/19 10:11 AM, Alex Bennée wrote: > +static inline void set_hostaddr(CPUArchState *env, TCGMemOp mo, void *haddr) > +{ > +#ifdef CONFIG_PLUGIN > +if (mo & MO_HADDR) { > +env_tlb(env)->c.hostaddr = haddr; > +} > +#endif > +} > + Even if we weren't talking about recomputing

[Qemu-devel] [PATCH v3 19/50] tcg: let plugins instrument memory accesses

2019-06-14 Thread Alex Bennée
From: "Emilio G. Cota" XXX: store hostaddr from non-i386 TCG backends (do it in a helper?) XXX: what hostaddr to return for I/O accesses? XXX: what hostaddr to return for cross-page accesses? Here the trickiest feature is passing the host address to memory callbacks that request it. Perhaps it