Re: [Qemu-devel] [PATCH v4 13/54] plugin: add user-facing API

2019-09-10 Thread Aaron Lindsay OS via Qemu-devel
On Sep 06 20:31, Alex Bennée wrote: > Aaron Lindsay OS writes: > > > One thing I would find useful is the ability to access register values > > during an execution-time callback. I think the easiest way to do that > > generically would be to expose them via the gdb functionality (like > >

Re: [Qemu-devel] [PATCH v4 00/54] plugins for TCG

2019-09-10 Thread Aaron Lindsay OS via Qemu-devel
On Sep 06 20:52, Alex Bennée wrote: > > Markus Armbruster writes: > > Please advise why TCG plugins don't undermine the GPL. Any proposal to > > add a plugin interface needs to do that. > > I'm not sure what we can say about this apart from "ask your lawyer". > I'm certainly not proposing we

Re: [Qemu-devel] [Qemu-arm] [PATCH] elf: Allow loading AArch64 ELF files

2019-08-12 Thread Aaron Lindsay OS via Qemu-devel
On Aug 12 16:02, Peter Maydell wrote: > On Mon, 12 Aug 2019 at 15:46, Aaron Lindsay OS via Qemu-arm > wrote: > > > > Treat EM_AARCH64 as a valid value when checking the ELF's machine-type > > header. > > > > Signed-off-by: Aaron Lindsay > > --- > > include/hw/elf_ops.h | 6 ++ > > 1 file

[Qemu-devel] [PATCH] elf: Allow loading AArch64 ELF files

2019-08-12 Thread Aaron Lindsay OS via Qemu-devel
Treat EM_AARCH64 as a valid value when checking the ELF's machine-type header. Signed-off-by: Aaron Lindsay --- include/hw/elf_ops.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h index 690f9238c8..f12faa90a1 100644 ---

Re: [Qemu-devel] [PATCH v4 13/54] plugin: add user-facing API

2019-08-02 Thread Aaron Lindsay OS via Qemu-devel
One thing I would find useful is the ability to access register values during an execution-time callback. I think the easiest way to do that generically would be to expose them via the gdb functionality (like Pavel's earlier patchset did [1]), though that (currently) limits you to the

Re: [Qemu-devel] [PATCH v4 50/54] tests/plugin: add instruction execution breakdown

2019-08-01 Thread Aaron Lindsay OS via Qemu-devel
On Jul 31 17:07, Alex Bennée wrote: > + * Attempt to measure the amount of vectorisation that has been done > + * on some code by counting classes of instruction. This is very much > + * ARM specific. I suspect some of my plugins will also be architecture-specific. Does it make sense to have a

Re: [Qemu-devel] [PATCH v4 24/54] plugins: implement helpers for resolving hwaddr

2019-08-01 Thread Aaron Lindsay OS via Qemu-devel
On Jul 31 17:06, Alex Bennée wrote: > We need to keep a local per-cpu copy of the data as other threads may > be running. We use a automatically growing array and re-use the space > for subsequent queries. [...] > +bool tlb_plugin_lookup(CPUState *cpu, target_ulong addr, int mmu_idx, > +

Re: [Qemu-devel] [PATCH v4 04/54] target/arm: remove run time semihosting checks

2019-08-01 Thread Aaron Lindsay OS via Qemu-devel
On Jul 31 17:06, Alex Bennée wrote: > Now we do all our checking and use a common EXCP_SEMIHOST for > semihosting operations we can make helper code a lot simpler. > > Signed-off-by: Alex Bennée > > --- > v2 > - fix re-base conflicts > - hoist EXCP_SEMIHOST check > - comment cleanups >

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 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 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 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