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

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

[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

[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 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@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 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] [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] [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

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

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

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

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

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

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

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

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

2016-01-29 Thread Lluís Vilanova
Eric Blake writes: > On 01/28/2016 02:53 PM, Lluís Vilanova wrote: >> Gives some general guidelines for reporting errors in QEMU. >> >> Signed-off-by: Lluís Vilanova >> --- >> HACKING | 33 + >> 1 file changed, 33 insert

qemu-devel@nongnu.org

2016-01-29 Thread Lluís Vilanova
David Gibson writes: > On Thu, Jan 28, 2016 at 10:53:43PM +0100, Lluís Vilanova wrote: >> Replaces all direct uses of 'error_setg(&error_fatal/abort)' with >> 'error_report_fatal/abort'. Also reimplements the former on top of the >> latter. >>

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

2016-01-29 Thread Lluís Vilanova
Peter Maydell writes: > On 28 January 2016 at 20:36, Lluís Vilanova wrote: >> The LTTng tracing backend includes the system's "syscall.h", but QEMU >> replaces it with its own for linux-user builds. This results in a double >> include on some targets (when LTT

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

2016-01-28 Thread Lluís Vilanova
The LTTng tracing backend includes the system's "syscall.h", but QEMU replaces it with its own for linux-user builds. This results in a double include on some targets (when LTTng is enabled). Signed-off-by: Lluís Vilanova --- linux-user/aarch64/syscall.h |5 + l

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

2016-01-28 Thread Lluís Vilanova
Eric Blake writes: > On 01/28/2016 02:41 PM, Lluís Vilanova wrote: >> 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_hel

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

2016-01-28 Thread Lluís Vilanova
Eric Blake writes: > On 01/28/2016 02:41 PM, Lluís Vilanova wrote: >> Gives some general guidelines for reporting errors in QEMU. >> >> Signed-off-by: Lluís Vilanova >> --- >> HACKING | 33 + >> 1 file changed, 33 inse

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

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

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

2016-01-28 Thread Lluís Vilanova
Please ignore this version; I forgot to fix a typo (fixed in v5). Cheers, Lluis Lluís Vilanova writes: > Adds leaner error-reporting functions for simple cases, and documents the > purpose of the different facilities available in QEMU. > Although not all printf+exit/abort are repl

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

2016-01-28 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@nongnu.org

2016-01-28 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 v5 3/5] util: [ppc] Use new error_report_fatal() instead of exit()

2016-01-28 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 v5 1/5] util: Introduce error reporting functions with fatal/abort

2016-01-28 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] [RFC][PATCH v5 0/5] utils: Improve and document error reporting

2016-01-28 Thread Lluís Vilanova
* Drop special object 'error_warn' in favour of raw 'error_report()' [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 (5): util: Introduce e

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

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

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

2016-01-28 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 v4 3/5] util: [ppc] Use new error_report_fatal() instead of exit()

2016-01-28 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@nongnu.org

2016-01-28 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] [RFC][PATCH v4 0/5] utils: Improve and document error reporting

2016-01-28 Thread Lluís Vilanova
r_report()' [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 (5): util: Introduce error reporting functions with fatal/abort util: Use new error_report_f

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

2016-01-28 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] [RFC][PATCH0/5] utils: Improve and document error reporting

2016-01-28 Thread Lluís Vilanova
r_report()' [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 (5): util: Introduce error reporting functions with fatal/abort util: Use new error_report_f

[Qemu-devel] [PATCH] build: Fix double-definition when using LTTng tracing

2016-01-28 Thread Lluís Vilanova
In linux-user builds, the LTTng backend pulls "syscall.h", which resets defines in "errno_defs.h", while "qemu.h" pulls "errno_defs.h" after "syscall.h" has been included. Signed-off-by: Lluís Vilanova --- translate-all.c |2 +- 1 file ch

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

2016-01-28 Thread Lluís Vilanova
Thomas Huth writes: > On 27.01.2016 20:20, Lluís Vilanova wrote: >> Lluís Vilanova writes: >> >>> Thomas Huth writes: >>>> On 20.01.2016 15:10, Lluís Vilanova wrote: >>>>> Thomas Huth writes: >>>>> >>>>>> O

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

2016-01-28 Thread Lluís Vilanova
Bastian Koppelmann writes: > Hi Lluis, > On 01/27/2016 07:54 PM, Lluís Vilanova wrote: >> There is this modified version I wrote [1], which precisely provides a plugin >> infrastructure to attach callbacks into guest code events (a binary >> instrumentation framework bas

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

2016-01-27 Thread Lluís Vilanova
Lluís Vilanova writes: > Thomas Huth writes: >> On 20.01.2016 15:10, Lluís Vilanova wrote: >>> Thomas Huth writes: >>> >>>> On 18.01.2016 21:26, Eric Blake wrote: >>>>> On 01/15/2016 06:54 AM, Lluís Vilanova wrote: >>>

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

2016-01-27 Thread Lluís Vilanova
Thomas Huth writes: > On 20.01.2016 15:10, Lluís Vilanova wrote: >> Thomas Huth writes: >> >>> On 18.01.2016 21:26, Eric Blake wrote: >>>> On 01/15/2016 06:54 AM, Lluís Vilanova wrote: >>>>> Gives some general guidelines for reporting errors

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

2016-01-27 Thread Lluís Vilanova
Bastian Koppelmann writes: > Hi Peter, > thank you for your feedback. >> (2) it feels a bit unpolished at the moment (lack of documentation, >> doesn't have any existing analysis tools that produce the format that >> the code reads that would make it immediately usable by an end-user) >> > Sure

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

2016-01-20 Thread Lluís Vilanova
Thomas Huth writes: > On 18.01.2016 21:26, Eric Blake wrote: >> On 01/15/2016 06:54 AM, Lluís Vilanova wrote: >>> Gives some general guidelines for reporting errors in QEMU. >>> >>> Signed-off-by: Lluís Vilanova >>> --- >>> HACKING | 36 +

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

2016-01-19 Thread Lluís Vilanova
Edgar E Iglesias writes: > On Sat, Jan 16, 2016 at 09:57:36PM +0100, Lluís Vilanova wrote: >> Richard Henderson writes: >> >> > On 01/15/2016 12:12 PM, Lluís Vilanova wrote: >> >> Richard Henderson writes: >> >> >> >>>

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

2016-01-18 Thread Lluís Vilanova
Paolo Bonzini writes: > On 15/01/2016 17:38, 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 v1 1/2] tcg: Add support for constant value promises

2016-01-16 Thread Lluís Vilanova
Richard Henderson writes: > On 01/15/2016 12:12 PM, Lluís Vilanova wrote: >> Richard Henderson writes: >> >>> On 01/15/2016 07:35 AM, Lluís Vilanova wrote: >>>> +TCGv_i64 tcg_promise_i64(TCGv_promise_i64 *promise) >>>> +{ >>>>

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

2016-01-15 Thread Lluís Vilanova
Richard Henderson writes: > On 01/15/2016 07:35 AM, Lluís Vilanova wrote: >> +TCGv_i64 tcg_promise_i64(TCGv_promise_i64 *promise) >> +{ >> +int pi = tcg_ctx.gen_next_parm_idx; >> +*promise = (TCGv_promise_i64)&tcg_ctx.gen_opparam_buf[pi]; >>

[Qemu-devel] [PATCH v4 6/9] exec: [tcg] Track which vCPU is performing translation and execution

2016-01-15 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 v4 1/9] trace: Add support for vCPU pointers in trace events

2016-01-15 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 v4 7/9] disas: Remove unused macro '_'

2016-01-15 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 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

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

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

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-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] [PATCH v2 05/10] exec: [ŧcg] Use multiple physical TB caches

2016-01-07 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Tue, Nov 24, 2015 at 06:09:14PM +0100, Lluís Vilanova wrote: > Commit message uses 'LATIN SMALL LETTER T WITH STROKE' (U+0167) instead > of regular 't' character :). Woops! Thanks :)

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

2015-12-29 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: >> Adds a special error object that transforms error messages into >> immediately reported warnings. > Before I dive into details: my fundamental objection is that &error_warn > is new infrastructure without a use.

Re: [Qemu-devel] Request for Help (Generate Trace for Individual Instructions)

2015-12-23 Thread Lluís Vilanova
Junaid Aslam writes: > Dear Sir > I am a student in Netherlands TU/e and intend to explore QEMU for a project. I > need help in understanding how i can trace an individual instruction which is > translated by TCG. For this moment in am more interested in Guest load store > and > Function call ins

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

[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

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

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

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

[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

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

<    5   6   7   8   9   10   11   12   13   14   >