From nobody Mon Feb 9 17:37:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1568813318; cv=none; d=zoho.com; s=zohoarc; b=OIWyxk64uoBfq65lfA5iir/JIAh5MTzFYhHzerxbODcR5IXslKkIOs4Mi0HcpmphDe2iogOijIPafUrj5bnmQaYA6hnCDN1RW3FimJe0GZJljeTaPlvoRHPTCZ4/DdTnWwc7+b0HJJaV9urkeBsuVyNUEApFePlIR9cWsoTM+3c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568813318; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=dN+vlJupHc0Gy39RDAxArH5Y+6YX8MgaflZNqlxvgjo=; b=FEdC1/T92xuVjExzVvTBRQbs0QSPtiUxuXrRqXZfjMeExPg8vrKOUs+r0rIOuZGn7lstC1UdzeyFF4m/sirOA5RjI7Udo2/E8Vk+zAAT24UaQ4KLwErxhLZ+R2tAExe6Wn7/pu/6E42NObmnLxTDSS+qpN8p2PwKrqvhwOl3nIc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1568813318928586.192694437518; Wed, 18 Sep 2019 06:28:38 -0700 (PDT) Received: from localhost ([::1]:59052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAa0b-0006Be-DZ for importer@patchew.org; Wed, 18 Sep 2019 09:28:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60374) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAZth-0008AN-17 for qemu-devel@nongnu.org; Wed, 18 Sep 2019 09:21:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iAZte-0002Tt-VA for qemu-devel@nongnu.org; Wed, 18 Sep 2019 09:21:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38080) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iAZtc-0002Rr-2d; Wed, 18 Sep 2019 09:21:24 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 40F0A10CC203; Wed, 18 Sep 2019 13:21:23 +0000 (UTC) Received: from localhost (unknown [10.36.118.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id 269F3600C8; Wed, 18 Sep 2019 13:21:17 +0000 (UTC) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Date: Wed, 18 Sep 2019 14:21:10 +0100 Message-Id: <20190918132112.10418-2-stefanha@redhat.com> In-Reply-To: <20190918132112.10418-1-stefanha@redhat.com> References: <20190918132112.10418-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Wed, 18 Sep 2019 13:21:23 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/3] loader: Trace loaded images X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , qemu-block@nongnu.org, Alexey Kardashevskiy , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jason Wang , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Alexey Kardashevskiy This adds a trace point which prints every loaded image. This includes bios/firmware/kernel/initradmdisk/pcirom. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190613050937.124903-1-aik@ozlabs.ru> Signed-off-by: Stefan Hajnoczi --- 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 6a143dcd57..abcbd89654 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -203,6 +203,7 @@ trace-events-subdirs +=3D target/riscv trace-events-subdirs +=3D target/s390x trace-events-subdirs +=3D target/sparc trace-events-subdirs +=3D util +trace-events-subdirs +=3D hw/core =20 trace-events-files =3D $(SRC_PATH)/trace-events $(trace-events-subdirs:%= =3D$(SRC_PATH)/%/trace-events) =20 diff --git a/hw/core/loader.c b/hw/core/loader.c index 75eb56ddbb..0d60219364 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -45,6 +45,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qapi/error.h" +#include "trace.h" #include "hw/hw.h" #include "disas/disas.h" #include "migration/vmstate.h" @@ -1151,6 +1152,8 @@ static void rom_reset(void *unused) * CPU definitely fetches its instructions from the just written d= ata. */ cpu_flush_icache_range(rom->addr, rom->datasize); + + trace_loader_write_rom(rom->name, rom->addr, rom->datasize, rom->i= srom); } } =20 diff --git a/hw/core/trace-events b/hw/core/trace-events new file mode 100644 index 0000000000..fe47a9c8cb --- /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=3D0x%"PRIx64" ROM=3D%d" --=20 2.21.0