qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH qemu] loader: Trace loaded images
Date: Thu, 13 Jun 2019 15:08:37 +0200	[thread overview]
Message-ID: <35361394-42ba-dcf0-6fe2-5a0a538d1440@redhat.com> (raw)
In-Reply-To: <20190613050937.124903-1-aik@ozlabs.ru>

Hi Alexey,

On 6/13/19 7:09 AM, Alexey Kardashevskiy wrote:
> This adds a trace point which prints every loaded image. This includes
> bios/firmware/kernel/initradmdisk/pcirom.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> 
> The example for a pseries guest:
> 
> loader_write_rom slof.bin: @0x0 size=0xe22e0 ROM=0
> loader_write_rom phdr #0: /home/aik/t/vml4120le: @0x400000 size=0x13df000 ROM=0
> loader_write_rom /home/aik/t/le.cpio: @0x1ad0000 size=0x9463a00 ROM=0

I find the "ROM=0" part confuse, maybe you can change to "ROM:false".

Regardless:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> 
> Sadly "spapr-rtas.bin" does not show up because it is loaded from
> the spapr machine reset handler rather than via rom_reset(), may be needs
> to be fixed.
> 
> ---
>  Makefile.objs        | 1 +
>  hw/core/loader.c     | 3 +++
>  hw/core/trace-events | 2 ++
>  3 files changed, 6 insertions(+)
>  create mode 100644 hw/core/trace-events
> 
> diff --git a/Makefile.objs b/Makefile.objs
> index c8337fa34be8..036ca6752908 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -200,6 +200,7 @@ trace-events-subdirs += target/riscv
>  trace-events-subdirs += target/s390x
>  trace-events-subdirs += target/sparc
>  trace-events-subdirs += util
> +trace-events-subdirs += hw/core
>  
>  trace-events-files = $(SRC_PATH)/trace-events $(trace-events-subdirs:%=$(SRC_PATH)/%/trace-events)
>  
> diff --git a/hw/core/loader.c b/hw/core/loader.c
> index a097bbe30a74..7fe083af492f 100644
> --- a/hw/core/loader.c
> +++ b/hw/core/loader.c
> @@ -44,6 +44,7 @@
>  
>  #include "qemu/osdep.h"
>  #include "qapi/error.h"
> +#include "trace.h"
>  #include "hw/hw.h"
>  #include "disas/disas.h"
>  #include "monitor/monitor.h"
> @@ -1114,6 +1115,8 @@ static void rom_reset(void *unused)
>           * CPU definitely fetches its instructions from the just written data.
>           */
>          cpu_flush_icache_range(rom->addr, rom->datasize);
> +
> +        trace_loader_write_rom(rom->name, rom->addr, rom->datasize, rom->isrom);
>      }
>  }
>  
> diff --git a/hw/core/trace-events b/hw/core/trace-events
> new file mode 100644
> index 000000000000..fe47a9c8cb1f
> --- /dev/null
> +++ b/hw/core/trace-events
> @@ -0,0 +1,2 @@
> +# loader.c
> +loader_write_rom(const char *name, uint64_t gpa, uint64_t size, bool isrom) "%s: @0x%"PRIx64" size=0x%"PRIx64" ROM=%d"
> 


  parent reply	other threads:[~2019-06-13 14:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-13  5:09 [Qemu-devel] [PATCH qemu] loader: Trace loaded images Alexey Kardashevskiy
2019-06-13  5:59 ` no-reply
2019-06-13 13:08 ` Philippe Mathieu-Daudé [this message]
2019-06-14  0:13   ` Alexey Kardashevskiy
2019-06-14  9:33     ` Stefan Hajnoczi
2019-06-14 10:10       ` Philippe Mathieu-Daudé
2019-06-28  9:21         ` Stefan Hajnoczi
2019-06-17  1:25       ` Alexey Kardashevskiy
2019-06-17  4:56         ` Philippe Mathieu-Daudé
2019-06-20  5:50           ` Alexey Kardashevskiy
2019-06-20  8:53             ` Philippe Mathieu-Daudé
2019-09-12 15:09               ` Philippe Mathieu-Daudé
2019-09-16 15:50 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35361394-42ba-dcf0-6fe2-5a0a538d1440@redhat.com \
    --to=philmd@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).