Re: [Qemu-devel] [PATCH] build: Add include check on syscall.h

2016-01-29 Thread Lluís Vilanova
Peter Maydell writes: > On 29 January 2016 at 13:30, Lluís Vilanova wrote: >> Peter Maydell writes: >>> Adding include guards is fine, but it sounds to me like what we >>> should actually do to fix this confusion is rename all the linux-user >>> local headers

[Qemu-devel] [PATCH v5 0/2] trace: Show vCPU info in guest code events

2016-01-29 Thread Lluís Vilanova
generation into a separate patch. * Fix forward declarations (Stefan Hajnoczi & Eduardo Habkost). * Fix "since" tags in QAPI interface (Eric Blake). * Unify QAPI/QMP interface with an optional 'vcpu' argument (Eric Blake). * Fix QMP+GTK header workaround (Stefan Hajno

[Qemu-devel] [PATCH v5 2/2] trace: Add 'vcpu' event property to trace guest vCPU

2016-01-29 Thread Lluís Vilanova
e*" argument at execution time. Signed-off-by: Lluís Vilanova --- docs/tracing.txt | 40 ++ scripts/tracetool/__init__.py| 24 +- scripts/tracetool/format/h.py|3 ++ scripts/tracetool

[Qemu-devel] [PATCH v5 1/2] trace: Add support for vCPU pointers in trace events

2016-01-29 Thread Lluís Vilanova
to 'TCGv_ptr'), but that could change in the future to enforce the difference. Signed-off-by: Lluís Vilanova --- include/qemu/typedefs.h|1 + scripts/tracetool/transform.py |9 - target-alpha/translate.c |2 +- target-arm/translate.c |2 +

[Qemu-devel] [PATCH] build: Rename all "syscall.h" in target directories to "target_syscall.h".

2016-01-29 Thread Lluís Vilanova
This fixes double-definitions in *-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h"). Signed-off-by: Lluís Vilanova --- bsd-user/qemu.h |2 +- linux-user/aarch64/target_syscall.h |5 + l

Re: [Qemu-devel] [PATCH] build: Rename all "syscall.h" in target directories to "target_syscall.h".

2016-02-01 Thread Lluís Vilanova
Peter Maydell writes: > On 29 January 2016 at 18:53, Lluís Vilanova wrote: >> This fixes double-definitions in *-user builds when using the UST >> tracing backend (which indirectly includes the system's "syscall.h"). >> >> Signed-off-by:

[Qemu-devel] [PATCH v2 1/2] build: [linux-user] Rename all "syscall.h" in target directories to "target_syscall.h"

2016-02-01 Thread Lluís Vilanova
This fixes double-definitions in linux-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h"). Signed-off-by: Lluís Vilanova --- linux-user/aarch64/target_syscall.h |5 + linux-user/alpha/target_syscall.h |5 +

[Qemu-devel] [PATCH v2 2/2] build: [bsd-user] Rename all "syscall.h" in target directories to "target_syscall.h"

2016-02-01 Thread Lluís Vilanova
This fixes double-definitions in bsd-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h"). Signed-off-by: Lluís Vilanova --- bsd-user/i386/target_syscall.h|4 bsd-user/qemu.h |2 +- bsd-user/sparc/t

[Qemu-devel] [PATCH v2 0/2] build: Rename all "syscall.h" in target directories to "target_syscall.h"

2016-02-01 Thread Lluís Vilanova
This fixes double-definitions in *-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h"). Changes in v2 = * Fix includes for bsd-user too [Peter Maydell] Signed-off-by: Lluís Vilanova --- Lluís Vilanova (2): bui

Re: [Qemu-devel] [PATCH v2 1/2] build: [linux-user] Rename all "syscall.h" in target directories to "target_syscall.h"

2016-02-01 Thread Lluís Vilanova
Peter Maydell writes: > On 1 February 2016 at 14:18, Lluís Vilanova wrote: >> This fixes double-definitions in linux-user builds when using the UST >> tracing backend (which indirectly includes the system's "syscall.h"). >> >> Signed-off-by: Ll

[Qemu-devel] [PATCH v3 0/2] build: Rename all "syscall.h" in target directories to "target_syscall.h"

2016-02-01 Thread Lluís Vilanova
user too [Peter Maydell]. Signed-off-by: Lluís Vilanova --- Lluís Vilanova (2): build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target direc

[Qemu-devel] [PATCH v3 1/2] build: [linux-user] Rename "syscall.h" to "target_syscall.h" in target directories

2016-02-01 Thread Lluís Vilanova
This fixes double-definitions in linux-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h"). Signed-off-by: Lluís Vilanova --- linux-user/aarch64/target_syscall.h|5 + linux-user/alpha/target_syscall.h |5 +

[Qemu-devel] [PATCH v3 2/2] build: [bsd-user] Rename "syscall.h" to "target_syscall.h" in target directories

2016-02-01 Thread Lluís Vilanova
This fixes double-definitions in bsd-user builds when using the UST tracing backend (which indirectly includes the system's "syscall.h"). Signed-off-by: Lluís Vilanova Reviewed-by: Peter Maydell --- bsd-user/i386/target_syscall.h|4 bsd-user/qemu.h

Re: [Qemu-devel] [RFC PATCH 0/3] (Resend) TranslationBlock annotation mechanism

2016-02-01 Thread Lluís Vilanova
Lluís Vilanova writes: > Bastian Koppelmann writes: >> Hi Lluis, >> On 01/27/2016 07:54 PM, Lluís Vilanova wrote: [...] >>> >>> So, I'd say that such support is on the list of current developments (at >>> least >>> mine, specially

[Qemu-devel] [RFC] Programmable guest-to-QEMU hypercalls

2016-02-01 Thread Lluís Vilanova
Hi! I have in my trace instrumentation queue a series that adds a very simple but efficient way to trigger code in QEMU from guest code using guest-agnostic code. Blue Swirl showed some interest long ago in using it in the test suite (e.g., instruct QEMU to check the vCPU state after a series of i

[Qemu-devel] [RFC][PATCH v6 0/5] utils: Improve and document error reporting

2016-02-02 Thread Lluís Vilanova
rget-ppc'. * Replace all uses of 'abort()' with 'error_report_abort()' in 'target-ppc'. Changes in v3 = * Drop special object 'error_warn' in favour of raw 'error_report()' [suggested by Markus Armbruster]. Changes i

[Qemu-devel] [PATCH v6 1/5] util: Introduce error reporting functions with fatal/abort

2016-02-02 Thread Lluís Vilanova
Provide two lean functions to report error messages that fatal/abort QEMU. Signed-off-by: Lluís Vilanova --- include/qemu/error-report.h | 19 +++ util/qemu-error.c | 33 + 2 files changed, 52 insertions(+) diff --git a/include/qemu

qemu-devel@nongnu.org

2016-02-02 Thread Lluís Vilanova
Replaces all direct uses of 'error_setg(&error_fatal/abort)' with 'error_report_fatal/abort'. Also reimplements the former on top of the latter. Signed-off-by: Lluís Vilanova --- hw/block/fdc.c |6 +++--- hw/ppc/spapr.c |8 hw/ppc/spapr_drc.c

[Qemu-devel] [PATCH v6 3/5] util: [ppc] Use new error_report_fatal() instead of exit()

2016-02-02 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- target-ppc/kvm.c|5 +-- target-ppc/translate.c |7 ++-- target-ppc/translate_init.c | 80 +-- 3 files changed, 44 insertions(+), 48 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c

[Qemu-devel] [PATCH v6 4/5] util: [ppc] Use new error_report_abort() instead of abort()

2016-02-02 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- target-ppc/kvm.c|4 ++-- target-ppc/kvm_ppc.h| 15 +-- target-ppc/mmu-hash32.c |5 +++-- target-ppc/mmu_helper.c |3 +-- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c

[Qemu-devel] [PATCH v6 5/5] doc: Introduce coding style for errors

2016-02-02 Thread Lluís Vilanova
Gives some general guidelines for reporting errors in QEMU. Signed-off-by: Lluís Vilanova --- HACKING | 37 + 1 file changed, 37 insertions(+) diff --git a/HACKING b/HACKING index 12fbc8a..b738bce 100644 --- a/HACKING +++ b/HACKING @@ -157,3 +157,40

Re: [Qemu-devel] [PATCH v6 1/5] util: Introduce error reporting functions with fatal/abort

2016-02-03 Thread Lluís Vilanova
Markus Armbruster writes: > Thomas Huth writes: >> On 03.02.2016 10:48, Markus Armbruster wrote: >>> David Gibson writes: >>> >>>> On Tue, Feb 02, 2016 at 10:47:35PM +0100, Thomas Huth wrote: >>>>> On 02.02.2016 19:53,

Re: [Qemu-devel] [PATCH v6 5/5] doc: Introduce coding style for errors

2016-02-03 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: >> Gives some general guidelines for reporting errors in QEMU. >> >> Signed-off-by: Lluís Vilanova >> --- >> HACKING | 37 + >> 1 file changed, 37 insertions(+

Re: [Qemu-devel] [PATCH v6 1/5] util: Introduce error reporting functions with fatal/abort

2016-02-03 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: >> Markus Armbruster writes: >> >>> Thomas Huth writes: >>>> On 03.02.2016 10:48, Markus Armbruster wrote: >>>>> David Gibson writes: >>>>> >>>>>> On T

Re: [Qemu-devel] [PATCH v6 5/5] doc: Introduce coding style for errors

2016-02-03 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: >> Markus Armbruster writes: >> >>> Lluís Vilanova writes: >>>> Gives some general guidelines for reporting errors in QEMU. >>>> >>>> Signed-off-by: Lluís Vilanova >>>&

Re: [Qemu-devel] [PATCH v6 1/5] util: Introduce error reporting functions with fatal/abort

2016-02-03 Thread Lluís Vilanova
Markus Armbruster writes: [...] > As to the " " messages: surely you're joking, Mr. Feynman :) BTW, completely off-topic, but I just wanted to say that's a great book :) Cheers, Lluis

Re: [Qemu-devel] [PATCH 0/2] error: Documentation updates

2016-02-03 Thread Lluís Vilanova
Markus Armbruster writes: > This overlaps with parts of Lluís's "[RFC][PATCH v6 0/5] utils: > Improve and document error reporting". Lluís, feel free to integrate > my patches into a respin of your series. You can also respin on top > of my series. Reviewed-by: Lluí

Re: [Qemu-devel] [PATCH 0/2] error: Documentation updates

2016-02-04 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: >> Markus Armbruster writes: >> >>> This overlaps with parts of Lluís's "[RFC][PATCH v6 0/5] utils: >>> Improve and document error reporting". Lluís, feel free to integrate >>> my patc

[Qemu-devel] [PATCH ] [trivial] qapi: Build-depend on all json files

2016-02-04 Thread Lluís Vilanova
Dynamically detects the files used to generate QAPI code, thus ensuring it's never out of sync with the sources. Signed-off-by: Lluís Vilanova --- Makefile |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d0de2d4..627f772 100644

Re: [Qemu-devel] [PATCH ] [trivial] qapi: Build-depend on all json files

2016-02-04 Thread Lluís Vilanova
Lluís Vilanova writes: > Dynamically detects the files used to generate QAPI code, thus ensuring > it's never out of sync with the sources. > Signed-off-by: Lluís Vilanova > --- > Makefile |6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) Sorry, I fo

Re: [Qemu-devel] [PATCH ] [trivial] qapi: Build-depend on all json files

2016-02-04 Thread Lluís Vilanova
Peter Maydell writes: > On 4 February 2016 at 14:39, Lluís Vilanova wrote: >> Dynamically detects the files used to generate QAPI code, thus ensuring >> it's never out of sync with the sources. >> >> Signed-off-by: Lluís Vilanova >> --- >> Makefile |

[Qemu-devel] [PATCH v2] [trivial] qapi: Build-depend on all json files

2016-02-04 Thread Lluís Vilanova
Dynamically detects the files used to generate QAPI code, thus ensuring it's never out of sync with the sources. Signed-off-by: Lluís Vilanova --- Makefile |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d0de2d4..f8e8648 100644

Re: [Qemu-devel] [PATCH ] [trivial] qapi: Build-depend on all json files

2016-02-04 Thread Lluís Vilanova
Peter Maydell writes: > On 4 February 2016 at 15:32, Eric Blake wrote: >> On 02/04/2016 07:55 AM, Peter Maydell wrote: >>> On 4 February 2016 at 14:39, Lluís Vilanova wrote: >>>> Dynamically detects the files used to generate QAPI code, thus ensuring >>>&g

Re: [Qemu-devel] [PATCH ] [trivial] qapi: Build-depend on all json files

2016-02-04 Thread Lluís Vilanova
Daniel P Berrange writes: > On Thu, Feb 04, 2016 at 03:36:56PM +, Peter Maydell wrote: >> On 4 February 2016 at 15:32, Eric Blake wrote: >> > On 02/04/2016 07:55 AM, Peter Maydell wrote: >> >> On 4 February 2016 at 14:39, Lluís Vilanova wrote: >> >&

Re: [Qemu-devel] [PATCH ] [trivial] qapi: Build-depend on all json files

2016-02-04 Thread Lluís Vilanova
Lluís Vilanova writes: > Daniel P Berrange writes: >> On Thu, Feb 04, 2016 at 03:36:56PM +, Peter Maydell wrote: >>> On 4 February 2016 at 15:32, Eric Blake wrote: >>> > On 02/04/2016 07:55 AM, Peter Maydell wrote: >>> >> On 4

[Qemu-devel] [PATCH] [trivial] qapi: Add missing JSON files in build dependencies

2016-02-04 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- Makefile |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d0de2d4..30b1b2d 100644 --- a/Makefile +++ b/Makefile @@ -272,7 +272,8 @@ $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py

Re: [Qemu-devel] CPU Cache simulation

2015-11-20 Thread Lluís Vilanova
Pranith Kumar writes: > On Wed, Nov 18, 2015 at 1:06 PM, Eduardo Habkost wrote: >> >> >> Interesting. How much did you change QEMU to make this work? Have >> you been rebasing this to recent QEMU versions often? > The core of qemu is not changed except for one TCG issue I didn't know > how to

[Qemu-devel] [PATCH] [doc] Introduce coding style for errors

2015-11-23 Thread Lluís Vilanova
Gives some general guidelines for reporting errors in QEMU. Signed-off-by: Lluís Vilanova --- HACKING | 52 ++ include/qapi/error.h | 12 util/error.c | 24 +-- 3 files changed, 82

Re: [Qemu-devel] [PATCH] [doc] Introduce coding style for errors

2015-11-23 Thread Lluís Vilanova
Eric Blake writes: > On 11/23/2015 07:18 AM, Lluís Vilanova wrote: >> Gives some general guidelines for reporting errors in QEMU. > This is more than just a doc patch; you are actually proposing new code > in the way of &error_now. The commit message must absolutely mention

[Qemu-devel] QAPI vs QMP commands

2015-11-23 Thread Lluís Vilanova
When adding a new QAPI command, should I also add a corresponding entry in "qmp-commands.hx"? Thanks, Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juste

[Qemu-devel] [RFC][PATCH v2 0/2] utils: Improve and document error reporting

2015-11-23 Thread Lluís Vilanova
Vilanova --- Lluís Vilanova (2): utils: Add warning messages doc: Introduce coding style for errors HACKING | 31 +++ include/qapi/error.h | 20 util/error.c | 37 +++-- 3 files

[Qemu-devel] [PATCH v2 1/2] utils: Add warning messages

2015-11-23 Thread Lluís Vilanova
Adds a special error object that transforms error messages into immediately reported warnings. Signed-off-by: Lluís Vilanova --- include/qapi/error.h | 20 util/error.c | 37 +++-- 2 files changed, 47 insertions(+), 10 deletions

[Qemu-devel] [PATCH v2 2/2] doc: Introduce coding style for errors

2015-11-23 Thread Lluís Vilanova
Gives some general guidelines for reporting errors in QEMU. Signed-off-by: Lluís Vilanova --- HACKING | 31 +++ 1 file changed, 31 insertions(+) diff --git a/HACKING b/HACKING index 12fbc8a..e59bc34 100644 --- a/HACKING +++ b/HACKING @@ -157,3 +157,34 @@ painful

Re: [Qemu-devel] QAPI vs QMP commands

2015-11-23 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: >> When adding a new QAPI command, should I also add a corresponding entry in >> "qmp-commands.hx"? > Yes. > Towards the end of the very long QAPI patch queue are patches to get rid > of qmp-commands.hx. We

Re: [Qemu-devel] [PATCH v2 2/2] doc: Introduce coding style for errors

2015-11-23 Thread Lluís Vilanova
Daniel P Berrange writes: [...] > I don't think this "Errors in user inputs" vs "Other errors" distinction > really makes sense. Whether an error raised in a piece of code is related > to user input or not is almost impossible to determine in practice. So as > a rule to follow it is not practical.

Re: [Qemu-devel] [PATCH v2 2/2] doc: Introduce coding style for errors

2015-11-24 Thread Lluís Vilanova
Markus Armbruster writes: > "Daniel P. Berrange" writes: >> On Mon, Nov 23, 2015 at 07:41:24PM +0100, Lluís Vilanova wrote: >>> Gives some general guidelines for reporting errors in QEMU. >>> >>> Signed-off-by: Lluís Vilanova >>> --- &

[Qemu-devel] [PATCH v2 03/10] trace: [tcg] Identify events with the 'vcpu' property

2015-11-24 Thread Lluís Vilanova
A separate ID space ('TRACE_CPU_*') is used in attribute 'cpu_id' that only contains events with the 'vcpu' property. These are later used to select the appropriate physical TB cache based on what events are active. Signed-off-by: Lluís Vilanova --- qapi/trace.js

[Qemu-devel] [PATCH v2 08/10] disas: Remove unused macro '_'

2015-11-24 Thread Lluís Vilanova
Eliminates a future compilation error when UI code includes the tracing headers (indirectly pulling "disas/bfd.h" through "qom/cpu.h") and GLib's i18n '_' macro. Signed-off-by: Lluís Vilanova --- disas/i386.c|2 +- include/disas/bfd.h |1 -

[Qemu-devel] [PATCH v2 01/10] trace: Add support for vCPU pointers in trace events

2015-11-24 Thread Lluís Vilanova
to 'TCGv_ptr'), but that could change in the future to enforce the difference. Signed-off-by: Lluís Vilanova --- include/qemu/typedefs.h|1 + scripts/tracetool/transform.py |9 - target-alpha/translate.c |2 +- target-arm/translate.c |2 +

[Qemu-devel] [PATCH v2 00/10] trace: Per-vCPU tracing states

2015-11-24 Thread Lluís Vilanova
ke). * Unify QAPI/QMP interface with an optional 'vcpu' argument (Eric Blake). * Fix QMP+GTK header workaround (Stefan Hajnoczi). Signed-off-by: Lluís Vilanova --- Lluís Vilanova (10): trace: Add support for vCPU pointers in trace events trace: Add 'vcpu' event prope

[Qemu-devel] [PATCH v2 02/10] trace: Add 'vcpu' event property

2015-11-24 Thread Lluís Vilanova
e*" argument at execution time. Signed-off-by: Lluís Vilanova --- docs/tracing.txt | 40 ++ scripts/tracetool/__init__.py| 24 +- scripts/tracetool/format/h.py|3 ++ scripts/tracetool

[Qemu-devel] [PATCH v2 05/10] exec: [ŧcg] Use multiple physical TB caches

2015-11-24 Thread Lluís Vilanova
The physical translation block cache is split into as many caches as wanted, and the virtual TB cache on each guest CPU uses a (potentially) different physical TB cache. This is later exploited to support different tracing event states on a per-vCPU basis. Signed-off-by: Lluís Vilanova --- cpu

[Qemu-devel] [PATCH v2 10/10] trace: [tcg] Generate TCG code to trace guest events on a per-vCPU basis

2015-11-24 Thread Lluís Vilanova
Events with the 'tcg' and 'vcpu' properties will: * Trace the translation-time event ('*_trans'). * Generate TCG code to call a function that traces the execution-time event ('*_exec') iff the event is enabled for that vCPU. Signed-off-by: Lluís Vilanova

[Qemu-devel] [PATCH v2 04/10] exec: [tcg] Refactor flush of per-CPU virtual TB cache

2015-11-24 Thread Lluís Vilanova
The function is reused in later patches. Signed-off-by: Lluís Vilanova --- cputlb.c|2 +- include/exec/exec-all.h |6 ++ translate-all.c |7 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cputlb.c b/cputlb.c index bf1d50a..74bf989

[Qemu-devel] [PATCH v2 06/10] exec: [tcg] Track which vCPU is performing translation and execution

2015-11-24 Thread Lluís Vilanova
t to execution-time events ("*_exec"). Signed-off-by: Lluís Vilanova --- target-alpha/translate.c |1 + target-arm/translate.c|1 + target-cris/translate.c |1 + target-cris/translate_v10.c |1 + target-i386/translate.c |1 + target-lm32/tran

[Qemu-devel] [PATCH v2 07/10] [trivial] Track when QEMU has finished initialization

2015-11-24 Thread Lluís Vilanova
Later used to synchronize per-vCPU state of events enabled from command line. Signed-off-by: Lluís Vilanova --- Makefile.objs|2 +- bsd-user/main.c |1 + include/qemu-common.h|3 +++ linux-user/main.c|1 + qemu-common.c| 14

[Qemu-devel] [PATCH v2 09/10] trace: [tcg] Add per-vCPU tracing states for events with the 'vcpu' property

2015-11-24 Thread Lluís Vilanova
cal TB caches, and a bitmap of the identifiers of such enabled events is used to select a physical TB cache. Signed-off-by: Lluís Vilanova --- Makefile.objs|1 include/qom/cpu.h|5 + monitor.c

Re: [Qemu-devel] [PATCH v2 09/10] trace: [tcg] Add per-vCPU tracing states for events with the 'vcpu' property

2015-11-24 Thread Lluís Vilanova
Eric Blake writes: > On 11/24/2015 10:09 AM, Lluís Vilanova wrote: >> Each event with the 'vcpu' property gets a per-vCPU dynamic tracing state. >> >> The set of enabled events with the 'vcpu' and 'tcg' properties is used >> to select a pe

Re: [Qemu-devel] [PATCH 0/2] error: Documentation updates

2016-02-05 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: >> Markus Armbruster writes: >> >>> Lluís Vilanova writes: >>>> Markus Armbruster writes: >>>> >>>>> This overlaps with parts of Lluís's "[RFC][PATCH v6 0/5] utils: &g

Re: [Qemu-devel] [PATCH 0/2] error: Documentation updates

2016-02-08 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: >> Markus Armbruster writes: >> >>> Lluís Vilanova writes: >>>> Markus Armbruster writes: >>>> >>>>> Lluís Vilanova writes: >>>>>> Markus Armbruster write

Re: [Qemu-devel] trace: timestamps, core IDs, and file creation

2016-02-08 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Wed, Jan 13, 2016 at 03:13:02PM -0800, Hollis Blanchard wrote: >> Hi Stefan, I've been starting to use qemu tracing and found it quite useful. >> I have a couple comments about the trace events in general: > Sorry for the late reply. >> The event timestamps are host

Re: [Qemu-devel] [Qemu-arm] [PATCH v5 1/2] trace: Add support for vCPU pointers in trace events

2016-02-09 Thread Lluís Vilanova
Alex Bennée writes: > Lluís Vilanova writes: >> The tracing infrastructure later needs to differentiate between regular >> pointers and pointers to vCPUs. >> >> Also changes all targets to use the new 'TCGv_cpu' type instead of the >> generic

Re: [Qemu-devel] [Qemu-arm] [PATCH v5 1/2] trace: Add support for vCPU pointers in trace events

2016-02-09 Thread Lluís Vilanova
Alex Bennée writes: > Lluís Vilanova writes: >> The tracing infrastructure later needs to differentiate between regular >> pointers and pointers to vCPUs. >> >> Also changes all targets to use the new 'TCGv_cpu' type instead of the >> generic

[Qemu-devel] [BUG] trace: QEMU hangs on initialization with the "simple" backend

2016-02-09 Thread Lluís Vilanova
While starting the softmmu version of QEMU, the simple backend waits for the writeout thread to signal a condition variable when initializing the output file path. But since the writeout thread has not been created, it just waits forever. Thanks, Lluis

Re: [Qemu-devel] [Qemu-arm] [PATCH v5 1/2] trace: Add support for vCPU pointers in trace events

2016-02-09 Thread Lluís Vilanova
Lluís Vilanova writes: > Alex Bennée writes: >> Lluís Vilanova writes: >>> The tracing infrastructure later needs to differentiate between regular >>> pointers and pointers to vCPUs. >>> >>> Also changes all targets to use the new 'TCGv_cpu&

[Qemu-devel] [PATCH v6 1/4] trace: Extend API to manage event arguments

2016-02-09 Thread Lluís Vilanova
Lets the user to manage event arguments as a list, and simplifies argument concatenation. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool

[Qemu-devel] [PATCH v6 0/4] trace: Show vCPU info in guest code events

2016-02-09 Thread Lluís Vilanova
nterface with an optional 'vcpu' argument (Eric Blake). * Fix QMP+GTK header workaround (Stefan Hajnoczi). Signed-off-by: Lluís Vilanova Acked-by: Stefan Hajnoczi --- Lluís Vilanova (4): trace: Extend API to manage event arguments trace: Remove unnecessary intermediate eve

[Qemu-devel] [PATCH v6 2/4] trace: Remove unnecessary intermediate event copies

2016-02-09 Thread Lluís Vilanova
The current code forces the use of a chain of ".original" dereferences, which looks odd. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py|4 +--- scripts/tracetool/format/events_h.py |4 ++-- scripts/tracetool/format/tcg_h.py|4 ++-- 3 files

[Qemu-devel] [PATCH v6 4/4] trace: Add 'vcpu' event property to trace guest vCPU

2016-02-09 Thread Lluís Vilanova
e*" argument at execution time. Signed-off-by: Lluís Vilanova --- docs/tracing.txt | 41 + include/qemu/typedefs.h |1 scripts/tracetool/__init__.py| 11 +++- scripts/tracetool/format/h.py

[Qemu-devel] [PATCH v6 3/4] tcg: Add type for vCPU pointers

2016-02-09 Thread Lluís Vilanova
r'. As of now, the change is merely cosmetic ('TCGv_env' translates into 'TCGv_ptr'), but that could change in the future to enforce the difference. Note that a 'TCGv_cpu' type (for 'CPUState') is not added, since all helpers currently receive the architectur

Re: [Qemu-devel] [PATCH v6 3/4] tcg: Add type for vCPU pointers

2016-02-10 Thread Lluís Vilanova
Richard Henderson writes: > On 02/10/2016 08:14 AM, Lluís Vilanova wrote: >> Adds the 'TCGv_env' type for pointers to 'CPUArchState' objects. The >> tracing infrastructure later needs to differentiate between regular >> pointers and pointers to vCPUs. &

Re: [Qemu-devel] [PATCH v6 3/4] tcg: Add type for vCPU pointers

2016-02-10 Thread Lluís Vilanova
Lluís Vilanova writes: > Richard Henderson writes: >> On 02/10/2016 08:14 AM, Lluís Vilanova wrote: >>> Adds the 'TCGv_env' type for pointers to 'CPUArchState' objects. The >>> tracing infrastructure later needs to differentiate between regular &g

Re: [Qemu-devel] [PATCH v6 2/4] trace: Remove unnecessary intermediate event copies

2016-02-11 Thread Lluís Vilanova
Lluís Vilanova writes: > The current code forces the use of a chain of ".original" dereferences, > which looks odd. > Signed-off-by: Lluís Vilanova > --- > scripts/tracetool/__init__.py|4 +--- > scripts/tracetool/format/events_h.py |4 ++-- > sc

Re: [Qemu-devel] [BUG] trace: QEMU hangs on initialization with the "simple" backend

2016-02-11 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Tue, Feb 09, 2016 at 09:24:04PM +0100, Lluís Vilanova wrote: >> While starting the softmmu version of QEMU, the simple backend waits for the >> writeout thread to signal a condition variable when initializing the output >> file >> path. Bu

[Qemu-devel] [PATCH v70/4] trace: Show vCPU info in guest code events

2016-02-17 Thread Lluís Vilanova
jnoczi & Eduardo Habkost). * Fix "since" tags in QAPI interface (Eric Blake). * Unify QAPI/QMP interface with an optional 'vcpu' argument (Eric Blake). * Fix QMP+GTK header workaround (Stefan Hajnoczi). Signed-off-by: Lluís Vilanova Acked-by: Stefan Hajnoczi --- Lluís

[Qemu-devel] [PATCHv72/4] trace: Remove unnecessary intermediate event copies

2016-02-17 Thread Lluís Vilanova
The current code forces the use of a chain of ".original" dereferences, which looks odd. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py|5 ++--- scripts/tracetool/format/events_h.py |4 ++-- scripts/tracetool/format/tcg_h.py|4 ++-- 3 files

[Qemu-devel] [PATCHv71/4] trace: Extend API to manage event arguments

2016-02-17 Thread Lluís Vilanova
Lets the user to manage event arguments as a list, and simplifies argument concatenation. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool

[Qemu-devel] [PATCHv74/4] trace: Add 'vcpu' event property to trace guest vCPU

2016-02-17 Thread Lluís Vilanova
e*" argument at execution time. Signed-off-by: Lluís Vilanova --- docs/tracing.txt | 41 + include/qemu/typedefs.h |1 scripts/tracetool/__init__.py| 11 +++- scripts/tracetool/format/h.py

[Qemu-devel] [PATCHv73/4] tcg: Add type for vCPU pointers

2016-02-17 Thread Lluís Vilanova
r'. As of now, the change is merely cosmetic ('TCGv_env' translates into 'TCGv_ptr'), but that could change in the future to enforce the difference. Note that a 'TCGv_env' type (for 'CPUState') is not added, since all helpers currently receive the architec

Re: [Qemu-devel] [PATCH v70/4] trace: Show vCPU info in guest code events

2016-02-17 Thread Lluís Vilanova
Please ignore this series (messed-up title; again); I'll resend. Sorry about that. Lluis

[Qemu-devel] [PATCH v7 2/4] trace: Remove unnecessary intermediate event copies

2016-02-17 Thread Lluís Vilanova
The current code forces the use of a chain of ".original" dereferences, which looks odd. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py|5 ++--- scripts/tracetool/format/events_h.py |4 ++-- scripts/tracetool/format/tcg_h.py|4 ++-- 3 files

[Qemu-devel] [PATCH v7 1/4] trace: Extend API to manage event arguments

2016-02-17 Thread Lluís Vilanova
Lets the user to manage event arguments as a list, and simplifies argument concatenation. Signed-off-by: Lluís Vilanova --- scripts/tracetool/__init__.py | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool

[Qemu-devel] [PATCH v7 0/4] trace: Show vCPU info in guest code events

2016-02-17 Thread Lluís Vilanova
jnoczi & Eduardo Habkost). * Fix "since" tags in QAPI interface (Eric Blake). * Unify QAPI/QMP interface with an optional 'vcpu' argument (Eric Blake). * Fix QMP+GTK header workaround (Stefan Hajnoczi). Signed-off-by: Lluís Vilanova Acked-by: Stefan Hajnoczi --- Lluís

[Qemu-devel] [PATCH v7 4/4] trace: Add 'vcpu' event property to trace guest vCPU

2016-02-17 Thread Lluís Vilanova
e*" argument at execution time. Signed-off-by: Lluís Vilanova --- docs/tracing.txt | 41 + include/qemu/typedefs.h |1 scripts/tracetool/__init__.py| 11 +++- scripts/tracetool/format/h.py

[Qemu-devel] [PATCH v7 3/4] tcg: Add type for vCPU pointers

2016-02-17 Thread Lluís Vilanova
r'. As of now, the change is merely cosmetic ('TCGv_env' translates into 'TCGv_ptr'), but that could change in the future to enforce the difference. Note that a 'TCGv_env' type (for 'CPUState') is not added, since all helpers currently receive the architec

Re: [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params

2016-01-11 Thread Lluís Vilanova
Edgar E Iglesias writes: > From: "Edgar E. Iglesias" > Hi, > On AArch64, when some load/stores trap under specific conditions, a set of > detailed info describing the insn is provided to the trap handler (e.g size > of the access, target registers, insn-length mode etc). > This specific info is

Re: [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params

2016-01-12 Thread Lluís Vilanova
Peter Maydell writes: > On 11 January 2016 at 20:16, Lluís Vilanova wrote: >> Great! I implemented a similar thing long time ago. In my case the machinery >> is >> completely hidden under the concept of "value promises" in TCG (i.e., the >> user >>

Re: [Qemu-devel] [RFC 0/2] tcg-icount: Add and use tcg_set_insn_param to update tcg insn params

2016-01-12 Thread Lluís Vilanova
Edgar E Iglesias writes: > On Tue, Jan 12, 2016 at 01:12:29PM +0100, Lluís Vilanova wrote: >> Peter Maydell writes: >> >> > On 11 January 2016 at 20:16, Lluís Vilanova wrote: >> >> Great! I implemented a similar thing long time ago. In my case the >&g

[Qemu-devel] [RFC][PATCH v3 ] utils: Improve and document error reporting

2016-01-15 Thread Lluís Vilanova
[suggested by Markus Armbruster]. Changes in v2 = * Split in two patches. * Explicitly add a warning error object. Signed-off-by: Lluís Vilanova --- Lluís Vilanova (1): doc: Introduce coding style for errors HACKING | 36 1 file ch

[Qemu-devel] [PATCH v3 ] doc: Introduce coding style for errors

2016-01-15 Thread Lluís Vilanova
Gives some general guidelines for reporting errors in QEMU. Signed-off-by: Lluís Vilanova --- HACKING | 36 1 file changed, 36 insertions(+) diff --git a/HACKING b/HACKING index 12fbc8a..1523bad 100644 --- a/HACKING +++ b/HACKING @@ -157,3 +157,39

[Qemu-devel] [PATCH v1 1/2] tcg: Add support for constant value promises

2016-01-15 Thread Lluís Vilanova
A TCG constant value promise allows creating TCG code that works with a constant whose value is not known until after the code has been generated (e.g., a count of the instructions in a basic block). Signed-off-by: Lluís Vilanova --- tcg/tcg-op.h |6 ++ tcg/tcg.c| 33

[Qemu-devel] [PATCH v1 0/2] tcg: Add support for constant value promises

2016-01-15 Thread Lluís Vilanova
(e.g., in gen_icount). Signed-off-by: Lluís Vilanova --- Lluís Vilanova (2): tcg: Add support for constant value promises gen-icount: Use constant value promises include/exec/gen-icount.h |8 +++- tcg/tcg-op.h |6 ++ tcg/tcg.c | 33

[Qemu-devel] [PATCH v1 2/2] gen-icount: Use constant value promises

2016-01-15 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- include/exec/gen-icount.h |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index 05d89d3..98d7a85 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -5,7

[Qemu-devel] [PATCH v4 0/9] trace: Per-vCPU tracing states

2016-01-15 Thread Lluís Vilanova
ke). * Unify QAPI/QMP interface with an optional 'vcpu' argument (Eric Blake). * Fix QMP+GTK header workaround (Stefan Hajnoczi). Signed-off-by: Lluís Vilanova Acked-by: Stefan Hajnoczi --- Lluís Vilanova (9): trace: Add support for vCPU pointers in trace events trace: A

[Qemu-devel] [PATCH v4 2/9] trace: Add 'vcpu' event property

2016-01-15 Thread Lluís Vilanova
e*" argument at execution time. Signed-off-by: Lluís Vilanova --- docs/tracing.txt | 40 ++ scripts/tracetool/__init__.py| 24 +- scripts/tracetool/format/h.py|3 ++ scripts/tracetool

[Qemu-devel] [PATCH v4 3/9] trace: [tcg] Identify events with the 'vcpu' property

2016-01-15 Thread Lluís Vilanova
A separate ID space ('TRACE_CPU_*') is used in attribute 'cpu_id' that only contains events with the 'vcpu' property. These are later used to select the appropriate physical TB cache based on what events are active. Signed-off-by: Lluís Vilanova --- qapi/trace.js

[Qemu-devel] [PATCH v4 8/9] trace: [tcg] Add per-vCPU tracing states for events with the 'vcpu' property

2016-01-15 Thread Lluís Vilanova
cal TB caches, and a bitmap of the identifiers of such enabled events is used to select a physical TB cache. Signed-off-by: Lluís Vilanova --- Makefile.objs|1 bsd-user/main.c |2 include/qom/cpu.h

[Qemu-devel] [PATCH v4 5/9] exec: [tcg] Use multiple physical TB caches

2016-01-15 Thread Lluís Vilanova
The physical translation block cache is split into as many caches as wanted, and the virtual TB cache on each guest CPU uses a (potentially) different physical TB cache. This is later exploited to support different tracing event states on a per-vCPU basis. Signed-off-by: Lluís Vilanova --- cpu

[Qemu-devel] [PATCH v4 4/9] exec: [tcg] Refactor flush of per-CPU virtual TB cache

2016-01-15 Thread Lluís Vilanova
The function is reused in later patches. Signed-off-by: Lluís Vilanova --- cputlb.c|2 +- include/exec/exec-all.h |6 ++ translate-all.c |7 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cputlb.c b/cputlb.c index bf1d50a..74bf989

[Qemu-devel] [PATCH v4 9/9] trace: [tcg] Generate TCG code to trace guest events on a per-vCPU basis

2016-01-15 Thread Lluís Vilanova
Events with the 'tcg' and 'vcpu' properties will: * Trace the translation-time event ('*_trans'). * Generate TCG code to call a function that traces the execution-time event ('*_exec') iff the event is enabled for that vCPU. Signed-off-by: Lluís Vilanova

<    3   4   5   6   7   8   9   10   11   12   >