From nobody Fri Nov 14 23:29:53 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 ARC-Seal: i=1; a=rsa-sha256; t=1759744970; cv=none; d=zohomail.com; s=zohoarc; b=BsOml0sKoD682wmFqZS7R7sYZWfmPZdGZl6+NqqJSQrs/oI6YAK92mvBMvgQxvqGYWi0nMhrefIE5fQm8U5LCC3EO4GBKOdqGBfC2f9rYuos4c21J3jgV/FWsn8p3tdMFpb/UcHI2HmJBw2kia9XRQR3KR6BK9HFJfgyQ6S3stQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1759744970; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6X/mg66Ujbgx3PeYRZ1lBPcVhcbnkVV8qymVGDX478M=; b=novh9wfzYnas+8kOsA/6K53mzoHX5kkmCXVkMTxZWR4n8Z35qr4NM904NWrvC7pJD4qA6NnpJksdyg5L6jyNIvoCCN8cJiIBH5DOHLI5GQ192F2YZwj2PTW7xIexVY/9IbsWXIkmyvgCLY7kpWUSsT5xWXcZMJ1Ur3rHUjV5HA4= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1759744969908385.113512922939; Mon, 6 Oct 2025 03:02:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v5hye-0006O3-Q8; Mon, 06 Oct 2025 05:57:56 -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 1v5hyZ-0006Kk-Uc for qemu-devel@nongnu.org; Mon, 06 Oct 2025 05:57:51 -0400 Received: from mailgate01.uberspace.is ([2001:1a50:11:0:c83f:a8ff:fea6:c8da]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1v5hyY-0003os-DP for qemu-devel@nongnu.org; Mon, 06 Oct 2025 05:57:51 -0400 Received: from skiff.uberspace.de (skiff.uberspace.de [185.26.156.131]) by mailgate01.uberspace.is (Postfix) with ESMTPS id A934260B7B for ; Mon, 6 Oct 2025 11:57:38 +0200 (CEST) Received: (qmail 18688 invoked by uid 990); 6 Oct 2025 09:57:38 -0000 Received: from unknown (HELO unkown) (::1) by skiff.uberspace.de (Haraka/3.0.1) with ESMTPSA; Mon, 06 Oct 2025 11:57:38 +0200 Authentication-Results: skiff.uberspace.de; auth=pass (plain) From: Julian Ganz To: qemu-devel@nongnu.org Cc: Julian Ganz , Richard Henderson Subject: [PATCH v7 05/25] target/alpha: call plugin trap callbacks Date: Mon, 6 Oct 2025 11:57:00 +0200 Message-ID: <7c6fe7d9cb00f84bb912b1e4393c656815b5cc7d.1759744337.git.neither@nut.email> X-Mailer: git-send-email 2.49.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Bar: ----- X-Rspamd-Report: REPLY(-4) BAYES_HAM(-2.995421) MID_CONTAINS_FROM(1) MIME_GOOD(-0.1) R_MISSING_CHARSET(0.5) X-Rspamd-Score: -5.595421 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nut.email; s=uberspace; h=from:to:cc:subject:date; bh=NQdS6b7lSZHjuzHV/xnNiUQELPfMS5Qhlg2RCswDKUA=; b=B3kpuZdbD/clCUytsY2r2M24fy77jOvlamf+MH5GiZur/NEf+uT6hMuV/EXa5vAv71UONBWj+P z9WQLlYo3tpApggUU4vpls+YzIWb0c9M36VBWiCla4O6lqh2E0QlpY7hH2sjHQEqZfVtfAay885v Ul3H0JY0WCNYNwxkPFB+ztw4yy+voVOhZfnDUSaBHa8qsOgMSI4ObWiWujhUou0S0bTpeDLghdje RdR2tpKkLTkZL8siokiJRTY1HGGQspnLupKktqFYOsD9EdoLsJsscQHlH4H1XCHCEtb0dK5ljqJq AI90CCNxTVGjhbvbU6va+Ez2dbrTVaMbWGpqaLDaK+jT4+vhzAx1I/2CBhEpqBbKDvkAolzBDG+H d8TFVkl/6VaQNdKWWlAtePXBQbF6S5uF34AHLIIp9j/HC5P4wpnV03NjZmZ4Ilhs4pwcpD2KprcS ARo9UF63KfW6m9tE5qeWyjGzv3xsfLQzrSUUZJ604XS7a9o+IzFfaKwF80jU7v4nguY5gYEUAY2M 7V1TB8h1Ky68MAtRDjn7Vy0ABfOGRGHInNxCDZOmpRr+f5OTTAniWxo0HoSNDCtgyViX/UhLRDQr zJ0sZiatcYgRI9O4G5/ehNlgknU8DmeJQoAIzmGuZYdGFjgNfws7e4kNvSS76XMGGlbLCxng81N6 A= 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=2001:1a50:11:0:c83f:a8ff:fea6:c8da; envelope-from=neither@nut.email; helo=mailgate01.uberspace.is X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 @nut.email) X-ZM-MESSAGEID: 1759744973350116600 Content-Type: text/plain; charset="utf-8" We recently introduced API for registering callbacks for trap related events as well as the corresponding hook functions. Due to differences between architectures, the latter need to be called from target specific code. This change places hooks for Alpha targets. Reviewed-by: Richard Henderson Signed-off-by: Julian Ganz --- target/alpha/helper.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 096eac3445..a9af52a928 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -27,6 +27,7 @@ #include "exec/helper-proto.h" #include "qemu/qemu-print.h" #include "system/memory.h" +#include "qemu/plugin.h" =20 =20 #define CONVERT_BIT(X, SRC, DST) \ @@ -328,6 +329,7 @@ void alpha_cpu_do_interrupt(CPUState *cs) { CPUAlphaState *env =3D cpu_env(cs); int i =3D cs->exception_index; + uint64_t last_pc =3D env->pc; =20 if (qemu_loglevel_mask(CPU_LOG_INT)) { static int count; @@ -431,6 +433,17 @@ void alpha_cpu_do_interrupt(CPUState *cs) =20 /* Switch to PALmode. */ env->flags |=3D ENV_FLAG_PAL_MODE; + + switch (i) { + case EXCP_SMP_INTERRUPT: + case EXCP_CLK_INTERRUPT: + case EXCP_DEV_INTERRUPT: + qemu_plugin_vcpu_interrupt_cb(cs, last_pc); + break; + default: + qemu_plugin_vcpu_exception_cb(cs, last_pc); + break; + } } =20 bool alpha_cpu_exec_interrupt(CPUState *cs, int interrupt_request) --=20 2.49.1