From nobody Mon Feb 9 06:42:41 2026 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=1733167796; cv=none; d=zohomail.com; s=zohoarc; b=cxAP0xzeg2eXJw7C404tCkT34UcD/xWD46/EhVeiu5h7RxJ7Gq/KYfc99Vw+CAmm3RZz9XJAvmm+KWQfUm5YFHh4cLGTMNfls8LAh29+zx5rzn1aWlO2spje3/H21aunW460TCwzuW0v8a1BQjWSUkPbshKa7cJPVPECpA2MO9o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1733167796; 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=dsGuaXXZUV4Wi7Ur/8GE5SClWQPhIsQr9JRT0WtqvP4=; b=Jp/EObPRzo94Gxazry6TTRXODKgFOyEca4QJLMkA5R4iEz3t+b0Nhg6Vw3trOyJogd02gxDCPEjU/ic+oswiXYuDCWVnSRpC4TGO13z55zTU7iU+zXmU9fLNJm+AwvtweyC+BxHcao2tlbF2WjvFU181O6TK15B881PjJonvMvs= 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 1733167796962178.34739935531286; Mon, 2 Dec 2024 11:29:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIC53-0005kt-Fp; Mon, 02 Dec 2024 14:27:37 -0500 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 1tIC4s-0005iv-Dd for qemu-devel@nongnu.org; Mon, 02 Dec 2024 14:27:26 -0500 Received: from mailgate02.uberspace.is ([185.26.156.114]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIC4q-0001x9-8x for qemu-devel@nongnu.org; Mon, 02 Dec 2024 14:27:26 -0500 Received: from skiff.uberspace.de (skiff.uberspace.de [185.26.156.131]) by mailgate02.uberspace.is (Postfix) with ESMTPS id BDCEC180BF1 for ; Mon, 2 Dec 2024 20:27:13 +0100 (CET) Received: (qmail 7167 invoked by uid 990); 2 Dec 2024 19:27:13 -0000 Received: from unknown (HELO unkown) (::1) by skiff.uberspace.de (Haraka/3.0.1) with ESMTPSA; Mon, 02 Dec 2024 20:27:13 +0100 Authentication-Results: skiff.uberspace.de; auth=pass (plain) From: Julian Ganz To: qemu-devel@nongnu.org Cc: Julian Ganz , Richard Henderson Subject: [RFC PATCH v3 05/11] target/alpha: call plugin trap callbacks Date: Mon, 2 Dec 2024 20:26:46 +0100 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Bar: ----- X-Rspamd-Report: REPLY(-4) BAYES_HAM(-2.999029) MID_CONTAINS_FROM(1) MIME_GOOD(-0.1) R_MISSING_CHARSET(0.5) X-Rspamd-Score: -5.599029 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nut.email; s=uberspace; h=from:to:cc:subject:date; bh=tpIDjpcFqj+Wp3kuZs4WF3UD19WsYadFBbweXL6VAzk=; b=S/nzySFcp1lYl3EoIp6r5nNpEiGidmumBxgHqHVyKEGQyzdZbEFxe24yZjNHzgTQlyyK5WW08d KO8JM6mnZAp2DCyzuXlbi0Yv0lg/vmMtid4mcqCQwlybS+5RE3PKf1o2mTlS8zuynqg80JuxNf5F qLL2KJzBCohtsJaoAsu1eQLyYurfu76d05LHDLcAQ1+p0laQJWR5q7ZxhdQCVrWkOYKb0zaf7vqd d/lDGFqVmkNZxzKDgzjFBeTybetfuJy1z9C8WkHDivjv94sXXnVdTpMEbQBkdc7XUYG1mE1XJ7Ps /VaZiH4yxuUZKJytHCkV+u8s/qVjpeLIZonrf30I0lrx2qvfF9iWuK4LgGAoNbj4fkSmleYhYSqk /vfbdQrQEzndveMQHRP/gLCirM7kR704Yhp9VN5GfurPy7B02cioE5k9w9wdbU5GHdyVmNIop2r2 A1jctISQuKHL4Dt0Hy5TierOCCBu6iCWDBNoWHsXlkf5NU0fYvTfAOmde5qslb4UhYF3/5C/de/e m4huXTe0EcV8JKmv7d4PHATzTEl4/oFnf/rsB+yBxX3zPr0WolPdhFW+1c23ZXa6cjxSc4nV2yTT jI54DsRhU41JzkNGdiQix+8E2dCfy673SwwY/d646gH4VdsU2wfwLd2gYxVs/Saf2guR9e0gCBqb w= 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=185.26.156.114; envelope-from=neither@nut.email; helo=mailgate02.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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 1733167798249116600 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. --- target/alpha/helper.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 2f1000c99f..acc92402af 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -25,6 +25,7 @@ #include "fpu/softfloat-types.h" #include "exec/helper-proto.h" #include "qemu/qemu-print.h" +#include "qemu/plugin.h" =20 =20 #define CONVERT_BIT(X, SRC, DST) \ @@ -326,6 +327,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; @@ -429,6 +431,16 @@ 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, env->pc); + break; + qemu_plugin_vcpu_exception_cb(cs, last_pc, env->pc); + default: + } } =20 bool alpha_cpu_exec_interrupt(CPUState *cs, int interrupt_request) --=20 2.45.2