All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] trace: fix ARM TrustZone PPC hwaddr type
@ 2018-03-06 17:22 Stefan Hajnoczi
  2018-03-06 18:40 ` Philippe Mathieu-Daudé
  2018-03-06 18:58 ` Peter Maydell
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2018-03-06 17:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, Peter Maydell

Commit 9eb8040c2d2b ("hw/misc/tz-ppc: Model TrustZone peripheral
protection controller") added trace events with hwaddr type arguments.

This is not allowed and leads to the following compiler errors when
building with ./configure --enable-trace-backends=ust:

  trace-ust-all.h:11847:20: error: unknown type name ‘hwaddr’; did you mean ‘h_addr’?
    TP_ARGS(int, n, hwaddr, offset, bool, secure, bool, user),

Generated LTTng UST tracepoint definitions cannot include declarations
for all QEMU types and therefore docs/devel/tracing.txt requires using
only primitive or stdint.h types.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/misc/trace-events | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/misc/trace-events b/hw/misc/trace-events
index eb5ffcc0a8..562d9ed005 100644
--- a/hw/misc/trace-events
+++ b/hw/misc/trace-events
@@ -92,8 +92,8 @@ tz_ppc_cfg_sec_resp(int level) "TZ PPC: cfg_sec_resp = %d"
 tz_ppc_irq_enable(int level) "TZ PPC: int_enable = %d"
 tz_ppc_irq_clear(int level) "TZ PPC: int_clear = %d"
 tz_ppc_update_irq(int level) "TZ PPC: setting irq line to %d"
-tz_ppc_read_blocked(int n, hwaddr offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" HWADDR_PRIx " read (secure %d user %d) blocked"
-tz_ppc_write_blocked(int n, hwaddr offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" HWADDR_PRIx " write (secure %d user %d) blocked"
+tz_ppc_read_blocked(int n, uint64_t offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" PRIx64 " read (secure %d user %d) blocked"
+tz_ppc_write_blocked(int n, uint64_t offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" PRIx64 " write (secure %d user %d) blocked"
 
 # hw/misc/iotkit-secctl.c
 iotkit_secctl_s_read(uint32_t offset, uint64_t data, unsigned size) "IoTKit SecCtl S regs read: offset 0x%x data 0x%" PRIx64 " size %u"
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] trace: fix ARM TrustZone PPC hwaddr type
  2018-03-06 17:22 [Qemu-devel] [PATCH] trace: fix ARM TrustZone PPC hwaddr type Stefan Hajnoczi
@ 2018-03-06 18:40 ` Philippe Mathieu-Daudé
  2018-03-07 12:34   ` Stefan Hajnoczi
  2018-03-06 18:58 ` Peter Maydell
  1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-03-06 18:40 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Peter Maydell

On 03/06/2018 02:22 PM, Stefan Hajnoczi wrote:
> Commit 9eb8040c2d2b ("hw/misc/tz-ppc: Model TrustZone peripheral
> protection controller") added trace events with hwaddr type arguments.
> 
> This is not allowed and leads to the following compiler errors when
> building with ./configure --enable-trace-backends=ust:
> 
>   trace-ust-all.h:11847:20: error: unknown type name ‘hwaddr’; did you mean ‘h_addr’?
>     TP_ARGS(int, n, hwaddr, offset, bool, secure, bool, user),
> 
> Generated LTTng UST tracepoint definitions cannot include declarations
> for all QEMU types and therefore docs/devel/tracing.txt requires using
> only primitive or stdint.h types.

Maybe the trace generator script can check for legal/forbidden types?

> 
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  hw/misc/trace-events | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/misc/trace-events b/hw/misc/trace-events
> index eb5ffcc0a8..562d9ed005 100644
> --- a/hw/misc/trace-events
> +++ b/hw/misc/trace-events
> @@ -92,8 +92,8 @@ tz_ppc_cfg_sec_resp(int level) "TZ PPC: cfg_sec_resp = %d"
>  tz_ppc_irq_enable(int level) "TZ PPC: int_enable = %d"
>  tz_ppc_irq_clear(int level) "TZ PPC: int_clear = %d"
>  tz_ppc_update_irq(int level) "TZ PPC: setting irq line to %d"
> -tz_ppc_read_blocked(int n, hwaddr offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" HWADDR_PRIx " read (secure %d user %d) blocked"
> -tz_ppc_write_blocked(int n, hwaddr offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" HWADDR_PRIx " write (secure %d user %d) blocked"
> +tz_ppc_read_blocked(int n, uint64_t offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" PRIx64 " read (secure %d user %d) blocked"
> +tz_ppc_write_blocked(int n, uint64_t offset, bool secure, bool user) "TZ PPC: port %d offset 0x%" PRIx64 " write (secure %d user %d) blocked"
>  
>  # hw/misc/iotkit-secctl.c
>  iotkit_secctl_s_read(uint32_t offset, uint64_t data, unsigned size) "IoTKit SecCtl S regs read: offset 0x%x data 0x%" PRIx64 " size %u"
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] trace: fix ARM TrustZone PPC hwaddr type
  2018-03-06 17:22 [Qemu-devel] [PATCH] trace: fix ARM TrustZone PPC hwaddr type Stefan Hajnoczi
  2018-03-06 18:40 ` Philippe Mathieu-Daudé
@ 2018-03-06 18:58 ` Peter Maydell
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2018-03-06 18:58 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers

On 6 March 2018 at 17:22, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> Commit 9eb8040c2d2b ("hw/misc/tz-ppc: Model TrustZone peripheral
> protection controller") added trace events with hwaddr type arguments.
>
> This is not allowed and leads to the following compiler errors when
> building with ./configure --enable-trace-backends=ust:
>
>   trace-ust-all.h:11847:20: error: unknown type name ‘hwaddr’; did you mean ‘h_addr’?
>     TP_ARGS(int, n, hwaddr, offset, bool, secure, bool, user),
>
> Generated LTTng UST tracepoint definitions cannot include declarations
> for all QEMU types and therefore docs/devel/tracing.txt requires using
> only primitive or stdint.h types.
>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---

Thanks -- Dan sent a patch for this already which I've committed
to master as commit f32408f3b472a08.

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] trace: fix ARM TrustZone PPC hwaddr type
  2018-03-06 18:40 ` Philippe Mathieu-Daudé
@ 2018-03-07 12:34   ` Stefan Hajnoczi
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2018-03-07 12:34 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: qemu-devel, Peter Maydell

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]

On Tue, Mar 06, 2018 at 03:40:23PM -0300, Philippe Mathieu-Daudé wrote:
> On 03/06/2018 02:22 PM, Stefan Hajnoczi wrote:
> > Commit 9eb8040c2d2b ("hw/misc/tz-ppc: Model TrustZone peripheral
> > protection controller") added trace events with hwaddr type arguments.
> > 
> > This is not allowed and leads to the following compiler errors when
> > building with ./configure --enable-trace-backends=ust:
> > 
> >   trace-ust-all.h:11847:20: error: unknown type name ‘hwaddr’; did you mean ‘h_addr’?
> >     TP_ARGS(int, n, hwaddr, offset, bool, secure, bool, user),
> > 
> > Generated LTTng UST tracepoint definitions cannot include declarations
> > for all QEMU types and therefore docs/devel/tracing.txt requires using
> > only primitive or stdint.h types.
> 
> Maybe the trace generator script can check for legal/forbidden types?

Yes, good idea.  I'll add it to my todo list.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-07 12:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-06 17:22 [Qemu-devel] [PATCH] trace: fix ARM TrustZone PPC hwaddr type Stefan Hajnoczi
2018-03-06 18:40 ` Philippe Mathieu-Daudé
2018-03-07 12:34   ` Stefan Hajnoczi
2018-03-06 18:58 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.