From nobody Sat Sep 6 17:38:42 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=1757019293; cv=none; d=zohomail.com; s=zohoarc; b=ULyH+qX/CW6ahi7MU7/QXZtBWDnnjRSiPGt40c8ohVy9xJKzA0l+NW58YUqZzxhF3E7UoL7CsFShQuLa4QWLGVEORp8OzmBwjhS0lj+EvNAlQesFIvk8YTNVRlQJZJui5WTPcdQTPwbn4JWH6u/WAi3fbmPwdkYOqWR12ldm8Lk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1757019293; 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=P7Zztw43UAiqxdi4e3UMo7xspQaoF+6Gc+slafGaNHo=; b=GLBcd1We2+JMNajtTGX7HrYkfvAWzVo6VXZqDBpCnm02TQw2wECleoHlnrigFwep1w6UKxsJj+W2zipKupiItR+DCiJHf9VeVEA3jFRHrU3t1z5IYo6rDPDIQejF3faSNQGcpEXD+Yqjn9b1gXxuNSf4lwm0Am1ONA9Qjy2PoKw= 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 1757019293991466.8432597670376; Thu, 4 Sep 2025 13:54:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uuGu0-0006Xg-Pn; Thu, 04 Sep 2025 16:49:53 -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 1uuGtl-0005wi-Ay for qemu-devel@nongnu.org; Thu, 04 Sep 2025 16:49:41 -0400 Received: from mailgate01.uberspace.is ([95.143.172.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uuGta-0000zm-Ae for qemu-devel@nongnu.org; Thu, 04 Sep 2025 16:49:37 -0400 Received: from skiff.uberspace.de (skiff.uberspace.de [185.26.156.131]) by mailgate01.uberspace.is (Postfix) with ESMTPS id B376560C05 for ; Thu, 4 Sep 2025 22:49:17 +0200 (CEST) Received: (qmail 2379 invoked by uid 990); 4 Sep 2025 20:49:17 -0000 Received: from unknown (HELO unkown) (::1) by skiff.uberspace.de (Haraka/3.0.1) with ESMTPSA; Thu, 04 Sep 2025 22:49:17 +0200 Authentication-Results: skiff.uberspace.de; auth=pass (plain) From: Julian Ganz To: qemu-devel@nongnu.org Cc: Julian Ganz , Bastian Koppelmann , Richard Henderson Subject: [PATCH v6 21/25] target/tricore: call plugin trap callbacks Date: Thu, 4 Sep 2025 22:48:56 +0200 Message-ID: <69d6bef3b97f71e6caa2de246d300912c037698e.1757018626.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.993729) MID_CONTAINS_FROM(1) MIME_GOOD(-0.1) R_MISSING_CHARSET(0.5) X-Rspamd-Score: -5.593729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nut.email; s=uberspace; h=from:to:cc:subject:date; bh=sikDKxVdoH/tFrpwzH0GPVt3AT9j5FuE97/PA4t+p6A=; b=HbwJ1KlyH0jessT85JTQ8RyjUFprsOgDzDvKQq/zmlStOf9jHZ8dwhssZfcQD5AYZnQXxA+QcB os/BqjW5XiYsAeJ0R/udZGK8rAwH8wpdCOjmccv6u8UTnQHajlvOAtzkH/rrhZ7/qM2EetYDFJEC 5mP7G+KU4SfqudEyENHvhK/c4hAPsOFATAX+G7NTr9IftKTvjGBUnV+SFsmrBASD7Mr3O7TP9KUE x1RQM0i3QnuKV2fEPr19vW7WHirwt0u2Gv7+J7DJcRfQzsbzp25FZGM9CY1QjwAxdMm2lsi954Jf OlM5Rxmk/4Uo2tjAij19BYkDBeSpYyH4w1DN958DYfxiKVviCXyr1d6xF/FM265WdSY8KMyFE77o MDu/6vMhsbS19AD6Qujg2h3CE7hijym7x+USeN1Tqttj2i3b5hD0LN/PpoaAguSVZmrqdY/yYBKJ ZI4wrIVArzNep7Q8onBv0z8nbBUdnlPpKKfXnVHLECuvU8nwnc+O1OmmwnJ4au1PpHv4ERnzInsU aal2E4HD3HUoFPYLEJpr9TCjjleTtXzuHRln+bHX+HYcCNnII3pQJhlsunW8tq3uuduW0gRQmLvF k5PJBDG//wleUYLtQZAji9ImLl5r+BTMdb1uq3OWVmOJK3P1vmneLapjntgIrjNqfelSoPuqW0qH 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=95.143.172.20; 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, 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: 1757019296244124100 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 an exception hook for TriCore targets. Interrupts are not implemented for this target and it has no host calls. Reviewed-by: Bastian Koppelmann Reviewed-by: Richard Henderson Signed-off-by: Julian Ganz --- target/tricore/op_helper.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c index 9910c13f4b..9bd6ce55d1 100644 --- a/target/tricore/op_helper.c +++ b/target/tricore/op_helper.c @@ -19,6 +19,7 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "accel/tcg/cpu-ldst.h" +#include "qemu/plugin.h" #include /* for crc32 */ =20 =20 @@ -29,8 +30,11 @@ void raise_exception_sync_internal(CPUTriCoreState *env,= uint32_t class, int tin uintptr_t pc, uint32_t fcd_pc) { CPUState *cs =3D env_cpu(env); + uint64_t last_pc; + /* in case we come from a helper-call we need to restore the PC */ cpu_restore_state(cs, pc); + last_pc =3D env->PC; =20 /* Tin is loaded into d[15] */ env->gpr_d[15] =3D tin; @@ -90,6 +94,7 @@ void raise_exception_sync_internal(CPUTriCoreState *env, = uint32_t class, int tin /* Update PC using the trap vector table */ env->PC =3D env->BTV | (class << 5); =20 + qemu_plugin_vcpu_exception_cb(cs, last_pc); cpu_loop_exit(cs); } =20 --=20 2.49.1