From nobody Thu Dec 18 21:08:24 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linux.dev ARC-Seal: i=1; a=rsa-sha256; t=1752421783; cv=none; d=zohomail.com; s=zohoarc; b=Ua9WuFgOgIeY821dlRK+ROsph6QqiSmdYQZ3l3wWc89nhXwS9dHsYSbpBbLOZkHwS0CUI4ML/BrO5P74HZF+vxBaskXvlkct2vE5dBsSoFwgRmZAhQ6J5r9gHJ1C+DCyulMDOgND6wzPxUN4ZDIx7OJ08piKoqUs2NVQ2rvUwmQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752421783; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=g++ulRUN4C55mZbS9xGwxQzv13dC9+1jGquJ51cFtp4=; b=nRlepTU5qIwvIKi3O3h8cpihvhZoXL/iekM8nQXB/8DxV3Qg02Qt0ehUAreP8ByT0hSE+vrzTJXSgNtsjMo9ERQjiL9nK0ACyP3hGE/4J1GXwx+RuXWEUDBpb4GP7cJvW2mLxJZ+C789EQwWHR2p5HPJFrL1tfi3LEvfeB0HfsQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1752421783392101.74952578809905; Sun, 13 Jul 2025 08:49:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uaywW-0007Qe-7r; Sun, 13 Jul 2025 11:48:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uayvZ-0006wx-PR for qemu-devel@nongnu.org; Sun, 13 Jul 2025 11:47:48 -0400 Received: from out-174.mta1.migadu.com ([95.215.58.174]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uayvX-00043e-Mj for qemu-devel@nongnu.org; Sun, 13 Jul 2025 11:47:45 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1752421651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=g++ulRUN4C55mZbS9xGwxQzv13dC9+1jGquJ51cFtp4=; b=HBY8LOIXBNrAtAw/C7HR0NBD3k5GkK6m5n3idLoL+ad5guYlhByJrcv6q3fDECaDWGzxBE EZn2dyunxdrnR35TgzQnh0OGvPz7smwGzHeUb+zlZc/gC3dWQqCAHBEdRA30c3HfuT8K8m EywVuySSu8CfiHYQ2pHw70LHerwlrv4= From: Zenghui Yu To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: agraf@csgraf.de, mads@ynddal.dk, peter.maydell@linaro.org, Zenghui Yu Subject: [PATCH] hvf: arm: Remove $pc from trace_hvf_data_abort() Date: Sun, 13 Jul 2025 23:47:19 +0800 Message-Id: <20250713154719.4248-1-zenghui.yu@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=95.215.58.174; envelope-from=zenghui.yu@linux.dev; helo=out-174.mta1.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linux.dev) X-ZM-MESSAGEID: 1752421785932116600 Content-Type: text/plain; charset="utf-8" We don't synchronize vcpu registers from the hardware accelerator (e.g., by cpu_synchronize_state()) in the Dabort handler, so env->pc points to the instruction which has nothing to do with the Dabort at all. And it doesn't seem to make much sense to log PC in every Dabort handler, let's just remove it from this trace event. Signed-off-by: Zenghui Yu Reviewed-by: Mads Ynddal Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/hvf/hvf.c | 2 +- target/arm/hvf/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index c9cfcdc08b..8f93e42b34 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2005,7 +2005,7 @@ int hvf_vcpu_exec(CPUState *cpu) uint32_t cm =3D (syndrome >> 8) & 0x1; uint64_t val =3D 0; =20 - trace_hvf_data_abort(env->pc, hvf_exit->exception.virtual_address, + trace_hvf_data_abort(hvf_exit->exception.virtual_address, hvf_exit->exception.physical_address, isv, iswrite, s1ptw, len, srt); =20 diff --git a/target/arm/hvf/trace-events b/target/arm/hvf/trace-events index b49746f28d..b29a995f3d 100644 --- a/target/arm/hvf/trace-events +++ b/target/arm/hvf/trace-events @@ -2,7 +2,7 @@ hvf_unhandled_sysreg_read(uint64_t pc, uint32_t reg, uint32= _t op0, uint32_t op1, hvf_unhandled_sysreg_write(uint64_t pc, uint32_t reg, uint32_t op0, uint32= _t op1, uint32_t crn, uint32_t crm, uint32_t op2) "unhandled sysreg write a= t pc=3D0x%"PRIx64": 0x%08x (op0=3D%d op1=3D%d crn=3D%d crm=3D%d op2=3D%d)" hvf_inject_fiq(void) "injecting FIQ" hvf_inject_irq(void) "injecting IRQ" -hvf_data_abort(uint64_t pc, uint64_t va, uint64_t pa, bool isv, bool iswri= te, bool s1ptw, uint32_t len, uint32_t srt) "data abort: [pc=3D0x%"PRIx64" = va=3D0x%016"PRIx64" pa=3D0x%016"PRIx64" isv=3D%d iswrite=3D%d s1ptw=3D%d le= n=3D%d srt=3D%d]" +hvf_data_abort(uint64_t va, uint64_t pa, bool isv, bool iswrite, bool s1pt= w, uint32_t len, uint32_t srt) "data abort: [va=3D0x%016"PRIx64" pa=3D0x%01= 6"PRIx64" isv=3D%d iswrite=3D%d s1ptw=3D%d len=3D%d srt=3D%d]" hvf_sysreg_read(uint32_t reg, uint32_t op0, uint32_t op1, uint32_t crn, ui= nt32_t crm, uint32_t op2, uint64_t val) "sysreg read 0x%08x (op0=3D%d op1= =3D%d crn=3D%d crm=3D%d op2=3D%d) =3D 0x%016"PRIx64 hvf_sysreg_write(uint32_t reg, uint32_t op0, uint32_t op1, uint32_t crn, u= int32_t crm, uint32_t op2, uint64_t val) "sysreg write 0x%08x (op0=3D%d op1= =3D%d crn=3D%d crm=3D%d op2=3D%d, val=3D0x%016"PRIx64")" hvf_unknown_hvc(uint64_t pc, uint64_t x0) "pc=3D0x%"PRIx64" unknown HVC! 0= x%016"PRIx64 --=20 2.34.1