From nobody Fri Nov 14 19:42:48 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1761753263; cv=none; d=zohomail.com; s=zohoarc; b=VkJBnet3oe90mQj8HuRwxH8Y7a7Am3ShL0DV2blr13vAume4ueWJEI1uDVptxnkq4pIYlxBK4BxKosFLOs2rQwbOoZ4KkF7+6J2NhRKzGmKXPP5gplDYwR/WmjIi1f+hhfn+3xJOGv9Cn13fuaJ057aVt/UeBV/ri2vB2zZIT0o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761753263; h=Content-Type: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=ONPjhxBdnZw2nEiSNLLc67Obp7P7Ify6BVfhuB1s+3s=; b=K2dUwBrygo0GAem/VdmZv59Q5ICrve2P1EYTubpqaC8n7mDDzdtdu/PYIyFzXtIfshBtRccNADQlbyLQlfEgif3D+pe57V/qbfKP9GCoU4IkZoykl7jwvWcfailXrAX/o8mGEfpq0QRSGCRF5a2zbP4mZ9/Fu+gZjOf4ci+SEXM= 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 176175326354218.25401980383333; Wed, 29 Oct 2025 08:54:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vE8SU-0004cX-DH; Wed, 29 Oct 2025 11:51:34 -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 1vE8SN-0004Y3-E8 for qemu-devel@nongnu.org; Wed, 29 Oct 2025 11:51:27 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vE8S0-0002tb-Kv for qemu-devel@nongnu.org; Wed, 29 Oct 2025 11:51:27 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-63c523864caso16430429a12.1 for ; Wed, 29 Oct 2025 08:50:59 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-64043e05a5esm2512795a12.4.2025.10.29.08.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 08:50:54 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E7CD260915; Wed, 29 Oct 2025 15:50:46 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761753057; x=1762357857; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ONPjhxBdnZw2nEiSNLLc67Obp7P7Ify6BVfhuB1s+3s=; b=KglwVBffYuD8o9fN/bFgeDpp7SCI+m0tjAl/Z74EfLyE36uGVpP0EF/KVf2ukGxiMH xDqyNH/G1lBwrtE9q7dJfm936R03HmyfUvRoOzjcGShxpHaiK210JqvBeNo1XeIX+49j +nQbziPFl2MXw0JzoHDYAkiiaj0va8u7TJlBv2yMxNDOERsPABClpbc3fs3xfYCtVd5m zjds8zsdEzlHn2aJFU+W7qNlBj+paOeaGIQlU9Eq13obAhafHKRP7qSOynyKfTbzvW5y OOicqfiVZFDerFryXbCcRYuRBbtyLurNl5v/RQEWnUwsU97n5YwyQF2rWYxBlx6QM8LB jQ/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761753057; x=1762357857; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ONPjhxBdnZw2nEiSNLLc67Obp7P7Ify6BVfhuB1s+3s=; b=nVqtvxhndmtoGRWCXTXQGt89GMCDcTNOHEtCsPhQgmug6jbVrVZHjsPYIY/cVTcPsR 8X0348yVGmCZWC1Ro10zmwGs/QocgpNMrKWi2wEdnUz8ByTxDXUwwehSizoZ311D3rkD G1oB+6R3FhuIlnzWmKbVeLmRjWdQU8RwvGqmoI0pITu/JCPbGNpzHfxtKKk4K4BTEhdw 1Ndj17BCHPlcb4pKsoBGPva3bkf8sQqMDkmcS7lkNDwaRutcyNlYV9DkNIWdq9PFJohT pUXyoC1xybhKIny0ZuOng4Pv3ORWGclvfQEtU7mJmNqueYbThL+7eGXNGWRcWxIKjj8+ 8SCg== X-Gm-Message-State: AOJu0YyJ70TfNV/06Kqf7yD7vUZ98WVeJ9/uImCrx/1PPm2kDwn+U6Jt GCb5rNFe9t8eBaMwQNObD5DeZkhxd0UfbJy1qNS97A0M5/YiQjSrbZScFa/bLYfwiFQieeS5gtA RMROVqTE= X-Gm-Gg: ASbGncuBEJ/gZGDVaTCR+QKurUs0W3H5sV7pUkATjghBjayYuoDatSOk6syShIt+hup ZKQN0E5RRK1n/cVwIWGWKac47mGXxdZzsm7n0feJMYGKl6usJq6iG3JitWBtBLvsRCkwcUv42Do JdV9lB2owlVlbYCKXsYZwIn1lxWNJ12F6j3hlGGfV+ZfpshgvD64bWGXkv/DQ1BU405eBAgfwJH XBpKv55FDo4mw5sqhvjURMnz4YYCmWR6LtP2kVOZc7si7C4PNNjWbcZ//5Cds+g6tMRC9PGRdQ7 rl+pV0Oioo6Vn/r/i+O3trA0h7IHKhHyvJ+v+SheiTm9iDRYpJNhhln4w8savNRRPJd8B/sTiVZ SdWzEd/Nh4P7+g3l0Ldjc4dZxX7ptiASqEH+fKfjT7CPtqjyVf+vLtdw9bEf3yjYI6UI87uR+ja Jn X-Google-Smtp-Source: AGHT+IEk5gN0V25rW1P43a+juaOx7z4oJTcYOb6OkbZZaSFVpz1E8qXc6CbrH6kclP4LSbDjscapLA== X-Received: by 2002:a05:6402:1442:b0:63c:4d42:993f with SMTP id 4fb4d7f45d1cf-640441aee2dmr2776482a12.3.1761753057248; Wed, 29 Oct 2025 08:50:57 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Julian Ganz , Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PULL 11/35] target/alpha: call plugin trap callbacks Date: Wed, 29 Oct 2025 15:50:20 +0000 Message-ID: <20251029155045.257802-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251029155045.257802-1-alex.bennee@linaro.org> References: <20251029155045.257802-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::530; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x530.google.com 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_DNSWL_NONE=-0.0001, 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 @linaro.org) X-ZM-MESSAGEID: 1761753265837158500 From: Julian Ganz 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 Message-ID: <20251027110344.2289945-12-alex.bennee@linaro.org> Signed-off-by: Alex Benn=C3=A9e diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 096eac34458..a9af52a928f 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.47.3