[Qemu-devel] Starting KVM/VMX guest with non-exiting RDTSC instruction

2018-06-04 Thread Lluís Vilanova
Hi, Is there some way to start a KVM-accelerated VM with QEMU (on an Intel/VMX host) that is configured so that RDTSC/RDTSCP instructions won't cause a VM-exit? According to Intel's manual, it seems I should disable the "RDTSC exiting" bit on the MSR that Linux identifies as

Re: [Qemu-devel] [PATCH v6 01/22] instrument: Add documentation

2017-10-21 Thread Lluís Vilanova
Peter Maydell writes: > On 15 October 2017 at 17:30, Lluís Vilanova <vilan...@ac.upc.edu> wrote: >> Thinking about it, shouldn't this always be the same given QEMU's TLB/page >> table >> consistency assurances? > What TLB/page table consistency assurances? For ARM

Re: [Qemu-devel] [PATCH v6 01/22] instrument: Add documentation

2017-10-15 Thread Lluís Vilanova
Emilio G Cota writes: > On Fri, Oct 06, 2017 at 18:07:16 +0300, Lluís Vilanova wrote: >> Emilio G Cota writes: >> > On Thu, Oct 05, 2017 at 02:28:12 +0300, Lluís Vilanova wrote: >> >> The API takes care of telling you if the access could be performed >

Re: [Qemu-devel] [PATCH] tcg: Initialize cpu_env generically

2017-10-12 Thread Lluís Vilanova
Richard Henderson writes: > On 10/11/2017 11:43 PM, Lluís Vilanova wrote: >>> /* Track which vCPU triggers events */ >>> CPUState *cpu; /* *_trans */ >>> -TCGv_env tcg_env; /* *_exec */ >> >> I would rather k

Re: [Qemu-devel] [PATCH] tcg: Initialize cpu_env generically

2017-10-12 Thread Lluís Vilanova
Richard Henderson writes: > This is identical for each target. So, move the initialization to > common code. Move the variable itself out of tcg_ctx and name it > cpu_env to minimize changes within targets. > This also means we can remove tcg_global_reg_new_{ptr,i32,i64}, > since there are no

Re: [Qemu-devel] [PATCH v6 01/22] instrument: Add documentation

2017-10-06 Thread Lluís Vilanova
Emilio G Cota writes: > On Thu, Oct 05, 2017 at 02:28:12 +0300, Lluís Vilanova wrote: >> Emilio G Cota writes: >> > I see some potential problems with this: >> > 1. Instrumenters' accesses could generate exceptions. I presume we'd want >> > to avoid >> &

Re: [Qemu-devel] [PATCH v6 01/22] instrument: Add documentation

2017-10-04 Thread Lluís Vilanova
Emilio G Cota writes: > On Sat, Sep 30, 2017 at 00:46:33 +0300, Lluís Vilanova wrote: >> Emilio G Cota writes: >> > I'm not sure I understand this concept of filtering. Are you saying that in >> > the first case, all memory accesses are instrumented, and then in the &

Re: [Qemu-devel] [PATCH v6 01/22] instrument: Add documentation

2017-09-26 Thread Lluís Vilanova
Emilio G Cota writes: > On Mon, Sep 25, 2017 at 21:03:39 +0300, Lluís Vilanova wrote: >> I know it's not exactly the same we're discussing, but the plot in [1] >> compares >> a few different ways to trace memory accesses on SPEC benchmarks: >> >> * First bar i

Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for "inlining" regions of code

2017-09-26 Thread Lluís Vilanova
Lluís Vilanova writes: > Richard Henderson writes: >> On 09/14/2017 08:20 AM, Lluís Vilanova wrote: >>> Richard Henderson writes: >>> >>>> On 09/10/2017 09:27 AM, Lluís Vilanova wrote: >>>>> TCG BBLs and instructions have multiple exit poi

Re: [Qemu-devel] [PATCH v6 00/22] instrument: Add basic event instrumentation

2017-09-26 Thread Lluís Vilanova
Emilio G Cota writes: > On Mon, Sep 25, 2017 at 21:07:45 +0300, Lluís Vilanova wrote: >> You're doing it right, and I've checked that the branch is properly pushed. >> Can >> you compile with V=1 to show me the failing cmdline? > $ make V=1 > (cd /data/src/qemu2; prin

Re: [Qemu-devel] [RFC 0/6] initial plugin support

2017-09-25 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Mon, Sep 18, 2017 at 04:05:31PM +0100, Peter Maydell wrote: >> On 18 September 2017 at 15:59, Stefan Hajnoczi wrote: >> > Thanks for sending this! Could you and Lluís collaborate on a single >> > instrumentation plugin API? >> > >> > Let's have a

Re: [Qemu-devel] [PATCH v6 00/22] instrument: Add basic event instrumentation

2017-09-25 Thread Lluís Vilanova
Emilio G Cota writes: > On Wed, Sep 13, 2017 at 12:53:43 +0300, Lluís Vilanova wrote: >> The instrumentation code is dynamically loaded as a library into QEMU either >> when it starts or later using its remote control interfaces. The loaded code >> only has access to functio

Re: [Qemu-devel] [PATCH v6 01/22] instrument: Add documentation

2017-09-25 Thread Lluís Vilanova
First, sorry for the late response; I was away for a few days. Peter Maydell writes: > On 18 September 2017 at 18:09, Lluís Vilanova <vilan...@ac.upc.edu> wrote: >> Peter Maydell writes: >>> It's also exposing internal QEMU implementation detail. >>> What if i

Re: [Qemu-devel] [PATCH v6 01/22] instrument: Add documentation

2017-09-18 Thread Lluís Vilanova
Peter Maydell writes: > On 15 September 2017 at 14:39, Lluís Vilanova <vilan...@ac.upc.edu> wrote: >> Peter Maydell writes: >>> This looks like it's exposing too much implementation detail. >>> We should just provide an API for "hook to be called

Re: [Qemu-devel] [PATCH v5 00/22] instrument: Add basic event instrumentation

2017-09-15 Thread Lluís Vilanova
Peter Maydell writes: > On 12 September 2017 at 22:01, Lluís Vilanova <vilan...@ac.upc.edu> wrote: >> This series adds an API to add instrumentation events. >> >> It also provides additional APIs for: >> * Controlling tracing events. >> * Peek/poke guest me

Re: [Qemu-devel] [PATCH v6 01/22] instrument: Add documentation

2017-09-15 Thread Lluís Vilanova
Peter Maydell writes: > On 13 September 2017 at 10:57, Lluís Vilanova <vilan...@ac.upc.edu> wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- >> MAINTAINERS |6 ++ >> docs/instrument.txt | 173 >> +

Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for "inlining" regions of code

2017-09-15 Thread Lluís Vilanova
Richard Henderson writes: > On 09/14/2017 08:20 AM, Lluís Vilanova wrote: >> Richard Henderson writes: >> >>> On 09/10/2017 09:27 AM, Lluís Vilanova wrote: >>>> TCG BBLs and instructions have multiple exit points from where to raise >>>> traci

Re: [Qemu-devel] [PATCH 6/7] trace: Add event "guest_inst_after"

2017-09-14 Thread Lluís Vilanova
Richard Henderson writes: > On 09/10/2017 09:35 AM, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- >> accel/tcg/translator.c | 23 ++- >> trace-events |8 >> 2 files

Re: [Qemu-devel] [PATCH 5/7] trace: Add event "guest_bbl_after"

2017-09-14 Thread Lluís Vilanova
Richard Henderson writes: > On 09/10/2017 09:31 AM, Lluís Vilanova wrote: >> +void translator__gen_goto_tb(TCGContext *ctx) >> +{ >> +if (ctx->disas.in_guest_code && >> +(TRACE_GUEST_BBL_AFTER_ENABLED)) { >> +if (ctx->di

Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for "inlining" regions of code

2017-09-14 Thread Lluís Vilanova
Richard Henderson writes: > On 09/10/2017 09:27 AM, Lluís Vilanova wrote: >> TCG BBLs and instructions have multiple exit points from where to raise >> tracing events, but some of the necessary information in the generic >> disassembly infrastructure is not available u

Re: [Qemu-devel] [PATCH 3/7] trace: Add event "guest_inst_info_before"

2017-09-14 Thread Lluís Vilanova
Richard Henderson writes: > On 09/10/2017 09:23 AM, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- >> accel/tcg/translator.c | 18 ++ >> trace-events |9 + >> 2 files changed, 27 inse

Re: [Qemu-devel] [PATCH 2/7] trace: Add event "guest_inst_before"

2017-09-14 Thread Lluís Vilanova
Richard Henderson writes: > On 09/10/2017 09:19 AM, Lluís Vilanova wrote: >> while (true) { >> +target_ulong pc_insn = db->pc_next; > Why not just "pc"? >> + db-> num_insns++; ops-> insn_start(db, cpu); >> tcg_debug_assert(db->is_

Re: [Qemu-devel] [PATCH 1/7] trace: Add event "guest_bbl_before"

2017-09-14 Thread Lluís Vilanova
Richard Henderson writes: > On 09/10/2017 09:15 AM, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- >> accel/tcg/translator.c |6 ++ >> trace-events | 11 +++ >> 2 files changed, 17 inse

[Qemu-devel] [PATCH v6 22/22] instrument: Add API to manipulate guest memory

2017-09-13 Thread Lluís Vilanova
It includes access to the guest's memory and vCPU registers. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/Makefile.objs |1 instrument/qemu-instr/state.h | 104 + instrument/state.c

[Qemu-devel] [PATCH v6 18/22] instrument: Add event 'guest_mem_before_trans'

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile.target |1 + instrument/control.c| 15 + instrument/control.h| 36 +- instrument/control.inc.h| 16 +++--- instrument/ev

[Qemu-devel] [PATCH v6 21/22] instrument: Add event 'guest_user_syscall_ret'

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/syscall.c |3 +++ instrument/control.c| 15 +++ instrument/events.h |5 + instrument/events.inc.h | 13 + instrument/load.c

[Qemu-devel] [PATCH v6 20/22] instrument: Add event 'guest_user_syscall'

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/syscall.c |6 ++ instrument/control.c| 18 ++ instrument/events.h |7 +++ instrument/events.inc.h | 16 instrument/

[Qemu-devel] [PATCH v6 19/22] instrument: Add event 'guest_mem_before_exec'

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- include/exec/cpu_ldst_template.h |4 +++ include/exec/cpu_ldst_useronly_template.h |4 +++ include/exec/helper-gen.h |1 + include/exec/helper-proto.h |1 + include/exec/helper

[Qemu-devel] [PATCH v6 17/22] trace: Introduce a proper structure to describe memory accesses

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- include/exec/cpu_ldst_template.h | 15 ++ include/exec/cpu_ldst_useronly_template.h | 15 ++ tcg/tcg-op.c | 22 + trace/mem-inte

[Qemu-devel] [PATCH v6 16/22] instrument: Add event 'guest_cpu_reset'

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/control.c|9 + instrument/events.h |3 +++ instrument/events.inc.h | 11 +++ instrument/load.c |1 + instrument/qemu-instr/control.h |9

[Qemu-devel] [PATCH v6 15/22] instrument: Add event 'guest_cpu_exit'

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/control.c|9 + instrument/events.h |3 +++ instrument/events.inc.h | 11 +++ instrument/load.c | 17 + instrument/qemu-instr/con

[Qemu-devel] [PATCH v6 14/22] exec: Add function to synchronously flush TB on a stopped vCPU

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- accel/stubs/tcg-stub.c|3 +++ accel/tcg/translate-all.c |7 +++ include/exec/exec-all.h |1 + 3 files changed, 11 insertions(+) diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c index 5dd480b1a2..5226

[Qemu-devel] [PATCH v6 13/22] instrument: Support synchronous modification of vCPU state

2017-09-13 Thread Lluís Vilanova
Stops all vCPUs to allow performing management operations like TB invalidations. These are later necessary to ensure translated code does not reference unloaded instrumentation libraries. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/control.c

[Qemu-devel] [PATCH v6 12/22] instrument: Add event 'guest_cpu_enter'

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/control.c|9 instrument/events.h |5 instrument/events.inc.h | 11 + instrument/load.c |9 instrument/qemu-instr/control.h

[Qemu-devel] [PATCH v6 11/22] instrument: Track vCPUs

2017-09-13 Thread Lluís Vilanova
Keep a translation between instrumentation's QICPU and CPUState objects to avoid exposing QEMU's internals to instrumentation clients. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- cpus-common.c|9 + instrument/control.c

[Qemu-devel] [PATCH v6 10/22] instrument: Add support for tracing events

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- .gitignore|1 Makefile |3 + instrument/Makefile.objs |1 instrument/error.h|6 ++ instrument/qemu-instr/types.h

[Qemu-devel] [PATCH v6 09/22] instrument: Add basic control interface

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile|4 +++ configure |1 + include/qemu/compiler.h | 19 instrument/Makefile.objs|1 + instrument/control.c

[Qemu-devel] [PATCH v6 08/22] instrument: [hmp] Add library loader

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- hmp-commands.hx | 32 monitor.c | 39 +++ 2 files changed, 71 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 1941e19932..2e8ebe8422

[Qemu-devel] [PATCH v6 07/22] instrument: [qapi] Add library loader

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- MAINTAINERS |1 + Makefile |1 + instrument/Makefile.objs |1 + instrument/qmp.c | 82 ++ monitor.c|4 ++ qapi-schem

[Qemu-devel] [PATCH v6 06/22] instrument: [softmmu] Add command line library loader

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- qemu-options.hx | 19 +++ vl.c| 15 +++ 2 files changed, 34 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 9f6e2adfff..6947388aab 100644 --- a/qemu-options.hx +++

[Qemu-devel] [PATCH v6 05/22] instrument: [bsd-user] Add command line library loader

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/main.c| 17 + bsd-user/syscall.c |5 + 2 files changed, 22 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index 8a6706a1c8..104844edfc 100644 --- a/bsd-user/main.c +++ b/bsd-user/

[Qemu-devel] [PATCH v6 04/22] instrument: [linux-user] Add command line library loader

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- linux-user/main.c| 21 + linux-user/syscall.c |4 2 files changed, 25 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 03666ef657..ac5c30c1fb 100644 --- a/linux-user/main.c

[Qemu-devel] [PATCH v6 03/22] instrument: Add generic library loader

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- MAINTAINERS |1 Makefile.objs|4 + configure|3 + instrument/Makefile.objs |4 + instrument/cmdline.c | 128 +++ instrument/cmdline.h

[Qemu-devel] [PATCH v6 02/22] instrument: Add configure-time flag

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- configure |9 + 1 file changed, 9 insertions(+) diff --git a/configure b/configure index fd7e3a5e81..a21d1bceb9 100755 --- a/configure +++ b/configure @@ -356,6 +356,7 @@ pie="" qom_cast_debug="yes&

[Qemu-devel] [PATCH v6 01/22] instrument: Add documentation

2017-09-13 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- MAINTAINERS |6 ++ docs/instrument.txt | 173 +++ 2 files changed, 179 insertions(+) create mode 100644 docs/instrument.txt diff --git a/MAINTAINERS b/MAINTAINERS

[Qemu-devel] [PATCH v6 00/22] instrument: Add basic event instrumentation

2017-09-13 Thread Lluís Vilanova
://code.gso.ac.upc.edu/git/qemu-dbi. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Changes in v6 = * Fix a minor style warning. * Fix a minor compilation error. Changes in v5 = * Rebase on fcea73709b. * Minor changes to pass checkpatch. * Fix

Re: [Qemu-devel] [PATCH v5 00/22] instrument: Add basic event instrumentation

2017-09-13 Thread Lluís Vilanova
no-reply writes: > Hi, > This series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. > Subject: [Qemu-devel] [PATCH v5 00/22] instrument: Add basic event > instrumentation >

Re: [Qemu-devel] [PATCH v5 00/22] instrument: Add basic event instrumentation

2017-09-13 Thread Lluís Vilanova
no-reply writes: > Hi, > This series seems to have some coding style problems. See output below for > more information: > Subject: [Qemu-devel] [PATCH v5 00/22] instrument: Add basic event > instrumentation > Message-id: 150525010239.15988.8172586618197849619.st...@frigg.lan > Type: series >

[Qemu-devel] [PATCH v2] trace: Immediately apply per-vCPU state changes if a vCPU is being created

2017-09-12 Thread Lluís Vilanova
Right now, function trace_event_set_vcpu_state_dynamic() asynchronously enables events in the case a vCPU is executing TCG code. If the vCPU is being created this makes some events like "guest_cpu_enter" to not be traced. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Revie

[Qemu-devel] [PATCH v5 22/22] instrument: Add API to manipulate guest memory

2017-09-12 Thread Lluís Vilanova
It includes access to the guest's memory and vCPU registers. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/Makefile.objs |1 instrument/qemu-instr/state.h | 104 + instrument/state.c

[Qemu-devel] [PATCH v5 21/22] instrument: Add event 'guest_user_syscall_ret'

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/syscall.c |3 +++ instrument/control.c| 15 +++ instrument/events.h |5 + instrument/events.inc.h | 13 + instrument/load.c

[Qemu-devel] [PATCH v5 20/22] instrument: Add event 'guest_user_syscall'

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/syscall.c |6 ++ instrument/control.c| 18 ++ instrument/events.h |7 +++ instrument/events.inc.h | 16 instrument/

[Qemu-devel] [PATCH v5 19/22] instrument: Add event 'guest_mem_before_exec'

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- include/exec/cpu_ldst_template.h |4 +++ include/exec/cpu_ldst_useronly_template.h |4 +++ include/exec/helper-gen.h |1 + include/exec/helper-proto.h |1 + include/exec/helper

[Qemu-devel] [PATCH v5 18/22] instrument: Add event 'guest_mem_before_trans'

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile.target |1 + instrument/control.c| 15 + instrument/control.h| 36 +- instrument/control.inc.h| 16 +++--- instrument/ev

[Qemu-devel] [PATCH v5 17/22] trace: Introduce a proper structure to describe memory accesses

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- include/exec/cpu_ldst_template.h | 15 ++ include/exec/cpu_ldst_useronly_template.h | 15 ++ tcg/tcg-op.c | 22 + trace/mem-inte

[Qemu-devel] [PATCH v5 16/22] instrument: Add event 'guest_cpu_reset'

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/control.c|9 + instrument/events.h |3 +++ instrument/events.inc.h | 11 +++ instrument/load.c |1 + instrument/qemu-instr/control.h |9

[Qemu-devel] [PATCH v5 15/22] instrument: Add event 'guest_cpu_exit'

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/control.c|9 + instrument/events.h |3 +++ instrument/events.inc.h | 11 +++ instrument/load.c | 17 + instrument/qemu-instr/con

[Qemu-devel] [PATCH v5 14/22] exec: Add function to synchronously flush TB on a stopped vCPU

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- accel/stubs/tcg-stub.c|3 +++ accel/tcg/translate-all.c |7 +++ include/exec/exec-all.h |1 + 3 files changed, 11 insertions(+) diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c index 5dd480b1a2..5226

[Qemu-devel] [PATCH v5 13/22] instrument: Support synchronous modification of vCPU state

2017-09-12 Thread Lluís Vilanova
Stops all vCPUs to allow performing management operations like TB invalidations. These are later necessary to ensure translated code does not reference unloaded instrumentation libraries. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/control.c

[Qemu-devel] [PATCH v5 12/22] instrument: Add event 'guest_cpu_enter'

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/control.c|9 instrument/events.h |5 instrument/events.inc.h | 11 + instrument/load.c |9 instrument/qemu-instr/control.h

[Qemu-devel] [PATCH v5 11/22] instrument: Track vCPUs

2017-09-12 Thread Lluís Vilanova
Keep a translation between instrumentation's QICPU and CPUState objects to avoid exposing QEMU's internals to instrumentation clients. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- cpus-common.c|9 + instrument/control.c

[Qemu-devel] [PATCH v5 10/22] instrument: Add support for tracing events

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- .gitignore|1 Makefile |3 + instrument/Makefile.objs |1 instrument/error.h|6 ++ instrument/qemu-instr/types.h

[Qemu-devel] [PATCH v5 09/22] instrument: Add basic control interface

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile|4 +++ configure |1 + include/qemu/compiler.h | 19 instrument/Makefile.objs|1 + instrument/control.c

[Qemu-devel] [PATCH v5 08/22] instrument: [hmp] Add library loader

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- hmp-commands.hx | 32 monitor.c | 39 +++ 2 files changed, 71 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 1941e19932..2e8ebe8422

[Qemu-devel] [PATCH v5 07/22] instrument: [qapi] Add library loader

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- MAINTAINERS |1 + Makefile |1 + instrument/Makefile.objs |1 + instrument/qmp.c | 82 ++ monitor.c|4 ++ qapi-schem

[Qemu-devel] [PATCH v5 06/22] instrument: [softmmu] Add command line library loader

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- qemu-options.hx | 19 +++ vl.c| 15 +++ 2 files changed, 34 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 9f6e2adfff..6947388aab 100644 --- a/qemu-options.hx +++

[Qemu-devel] [PATCH v5 05/22] instrument: [bsd-user] Add command line library loader

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/main.c| 17 + bsd-user/syscall.c |5 + 2 files changed, 22 insertions(+) diff --git a/bsd-user/main.c b/bsd-user/main.c index 8a6706a1c8..104844edfc 100644 --- a/bsd-user/main.c +++ b/bsd-user/

[Qemu-devel] [PATCH v5 04/22] instrument: [linux-user] Add command line library loader

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- linux-user/main.c| 21 + linux-user/syscall.c |4 2 files changed, 25 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 03666ef657..ac5c30c1fb 100644 --- a/linux-user/main.c

[Qemu-devel] [PATCH v5 03/22] instrument: Add generic library loader

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- MAINTAINERS |1 Makefile.objs|4 + configure|3 + instrument/Makefile.objs |4 + instrument/cmdline.c | 128 +++ instrument/cmdline.h

[Qemu-devel] [PATCH v5 02/22] instrument: Add configure-time flag

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- configure |9 + 1 file changed, 9 insertions(+) diff --git a/configure b/configure index fd7e3a5e81..a21d1bceb9 100755 --- a/configure +++ b/configure @@ -356,6 +356,7 @@ pie="" qom_cast_debug="yes&

[Qemu-devel] [PATCH v5 01/22] instrument: Add documentation

2017-09-12 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- MAINTAINERS |6 ++ docs/instrument.txt | 173 +++ 2 files changed, 179 insertions(+) create mode 100644 docs/instrument.txt diff --git a/MAINTAINERS b/MAINTAINERS

[Qemu-devel] [PATCH v5 00/22] instrument: Add basic event instrumentation

2017-09-12 Thread Lluís Vilanova
://code.gso.ac.upc.edu/git/qemu-dbi. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Changes in v5 = * Rebase on fcea73709b. * Minor changes to pass checkpatch. * Fix symbol availability to external libraries by adding missing default symbol visibility flag. * Use a

Re: [Qemu-devel] [PATCH v4 00/20] instrument: Add basic event instrumentation

2017-09-10 Thread Lluís Vilanova
Emilio G Cota writes: > On Wed, Sep 06, 2017 at 20:22:41 +0300, Lluís Vilanova wrote: >> This series adds an API to add instrumentation events. >> >> It also provides additional APIs for: >> * Controlling tracing events > hmm didn't Stefan say that tracing sho

Re: [Qemu-devel] [PATCH v4 09/20] instrument: Add basic control interface

2017-09-10 Thread Lluís Vilanova
Emilio G Cota writes: > On Wed, Sep 06, 2017 at 20:59:02 +0300, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- > (snip) >> +QI_VPUBLIC void qi_set_fini(qi_fini_fn fn, void *data) >> +{ >> +ERROR_IF(!instr_ge

Re: [Qemu-devel] [PATCH v4 09/20] instrument: Add basic control interface

2017-09-10 Thread Lluís Vilanova
Emilio G Cota writes: > On Wed, Sep 06, 2017 at 20:59:02 +0300, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- >> Makefile |5 +++ >> configure |1 + >> in

Re: [Qemu-devel] [PATCH v4 08/20] instrument: [hmp] Add library loader

2017-09-10 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova <vilan...@ac.upc.edu> writes: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- >> hmp-commands.hx | 28 ++ >> monitor.c | 60 >> +

Re: [Qemu-devel] [PATCH v4 07/20] instrument: [qapi] Add library loader

2017-09-10 Thread Lluís Vilanova
ads-up, there's nothing for you to do about it right now. > Lluís Vilanova <vilan...@ac.upc.edu> writes: [...] >> diff --git a/instrument/load.h b/instrument/load.h >> index 2ddb2c6c19..f8a02e6849 100644 >> --- a/instrument/load.h >> +++ b/instrument/load.h >

Re: [Qemu-devel] [PATCH v4 03/20] instrument: Add generic library loader

2017-09-10 Thread Lluís Vilanova
Emilio G Cota writes: > On Wed, Sep 06, 2017 at 20:34:48 +0300, Lluís Vilanova wrote: >> Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> >> --- > (snip) >> diff --git a/configure b/configure >> index 80dcc91c98..05bd7b1950 100755 >> --- a/configur

Re: [Qemu-devel] [PATCH v4 00/20] instrument: Add basic event instrumentation

2017-09-10 Thread Lluís Vilanova
Emilio G Cota writes: > On Wed, Sep 06, 2017 at 20:22:41 +0300, Lluís Vilanova wrote: >> This series adds an API to add instrumentation events. >> >> It also provides additional APIs for: >> * Controlling tracing events > hmm didn't Stefan say that tr

Re: [Qemu-devel] [PATCH v4 00/20] instrument: Add basic event instrumentation

2017-09-10 Thread Lluís Vilanova
Emilio G Cota writes: > On Thu, Sep 07, 2017 at 12:58:05 +0200, Markus Armbruster wrote: >> Lluís Vilanova <vilan...@ac.upc.edu> writes: >> >> > This series adds an API to add instrumentation events. >> > >> > It also provides additional APIs fo

[Qemu-devel] [PATCH v2] trace: Immediately apply per-vCPU state changes if a vCPU is being created

2017-09-10 Thread Lluís Vilanova
Right now, function trace_event_set_vcpu_state_dynamic() asynchronously enables events in the case a vCPU is executing TCG code. If the vCPU is being created this makes some events like "guest_cpu_enter" to not be traced. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> Revie

[Qemu-devel] [PATCH 7/7] trace: Add event "guest_inst_info_after"

2017-09-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- accel/tcg/translator.c | 18 ++ trace-events |8 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index c010aeee45..d3039e7fd2

[Qemu-devel] [PATCH 6/7] trace: Add event "guest_inst_after"

2017-09-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- accel/tcg/translator.c | 23 ++- trace-events |8 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index d66d601c89..c010

[Qemu-devel] [PATCH 5/7] trace: Add event "guest_bbl_after"

2017-09-10 Thread Lluís Vilanova
Need to use "TCG inlining" to avoid showing a trace entry for each exit point (up to two per BBL). Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- accel/tcg/translator.c| 54 + include/exec/translator.h | 22 +++

[Qemu-devel] [PATCH 4/7] tcg: Add support for "inlining" regions of code

2017-09-10 Thread Lluís Vilanova
acing code will be placed), and "inline regions" (which identify the TCG code that must be inlined). The TCG compiler will basically copy each inline region to any inline points that reference it. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- include/qemu/log.h |1

[Qemu-devel] [PATCH 3/7] trace: Add event "guest_inst_info_before"

2017-09-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- accel/tcg/translator.c | 18 ++ trace-events |9 + 2 files changed, 27 insertions(+) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 287d27b4f7..6598931171 100644 --- a/acc

[Qemu-devel] [PATCH 2/7] trace: Add event "guest_inst_before"

2017-09-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- accel/tcg/translator.c |3 +++ trace-events |8 2 files changed, 11 insertions(+) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 91b3b0da32..287d27b4f7 100644 --- a/accel/tcg/translator.c

[Qemu-devel] [PATCH 1/7] trace: Add event "guest_bbl_before"

2017-09-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- accel/tcg/translator.c |6 ++ trace-events | 11 +++ 2 files changed, 17 insertions(+) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index afa3af478a..91b3b0da32 100644 --- a/accel/tcg/transl

[Qemu-devel] [PATCH 0/7] trace: Add guest code events

2017-09-10 Thread Lluís Vilanova
Adds events to trace guest code execution. Events with additional info are disabled by default to minimize overheads, since that additional information might not be necessarily needed. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Lluís Vilanova (7): trace: Add

[Qemu-devel] [PATCH v4 20/20] instrument: Add API to manipulate guest memory

2017-09-06 Thread Lluís Vilanova
It includes access to the guest's memory and vCPU registers. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/Makefile.objs |1 instrument/qemu-instr/state.h | 104 + instrument/state.c

[Qemu-devel] [PATCH v4 19/20] instrument: Add event 'guest_user_syscall_ret'

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/syscall.c |3 +++ instrument/control.c| 11 +++ instrument/events.h |5 + instrument/events.inc.h | 13 + instrument/load.c

[Qemu-devel] [PATCH v4 18/20] instrument: Add event 'guest_user_syscall'

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- bsd-user/syscall.c |3 +++ instrument/control.c| 14 ++ instrument/events.h |7 +++ instrument/events.inc.h | 16 instrument/

[Qemu-devel] [PATCH v4 17/20] instrument: Add event 'guest_mem_before_exec'

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- include/exec/cpu_ldst_template.h |4 +++ include/exec/cpu_ldst_useronly_template.h |4 +++ include/exec/helper-gen.h |1 + include/exec/helper-proto.h |1 + include/exec/helper

[Qemu-devel] [PATCH v4 16/20] instrument: Add event 'guest_mem_before_trans'

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- Makefile.target |1 + instrument/control.c| 13 +++- instrument/control.h| 36 +- instrument/control.inc.h| 16 +++--- instrument/ev

[Qemu-devel] [PATCH v4 15/20] trace: Introduce a proper structure to describe memory accesses

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- include/exec/cpu_ldst_template.h | 15 ++ include/exec/cpu_ldst_useronly_template.h | 15 ++ tcg/tcg-op.c | 22 + trace/mem-inte

[Qemu-devel] [PATCH v4 14/20] instrument: Add event 'guest_cpu_reset'

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/control.c|9 + instrument/events.h |3 +++ instrument/events.inc.h | 11 +++ instrument/load.c |1 + instrument/qemu-instr/control.h |9

[Qemu-devel] [PATCH v4 13/20] instrument: Add event 'guest_cpu_exit'

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/control.c|9 + instrument/events.h |3 +++ instrument/events.inc.h | 11 +++ instrument/load.c |1 + instrument/qemu-instr/control.h

[Qemu-devel] [PATCH v4 12/20] instrument: Add event 'guest_cpu_enter'

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- instrument/control.c|9 instrument/events.h |5 instrument/events.inc.h | 11 ++ instrument/load.c |1 + instrument/qemu-instr/control.h

[Qemu-devel] [PATCH v4 11/20] instrument: Track vCPUs

2017-09-06 Thread Lluís Vilanova
Keep a translation between instrumentation's QICPU and CPUState objects to avoid exposing QEMU's internals to instrumentation clients. Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- cpus-common.c|9 + instrument/control.c

[Qemu-devel] [PATCH v4 10/20] instrument: Add support for tracing events

2017-09-06 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova <vilan...@ac.upc.edu> --- .gitignore|1 Makefile |3 + instrument/Makefile.objs |1 instrument/error.h|6 ++ instrument/qemu-instr/types.h

  1   2   3   4   5   6   7   8   9   10   >