From nobody Wed Oct 23 01:39:01 2024 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=1729356060; cv=none; d=zohomail.com; s=zohoarc; b=Fxwky3A4BKmMGk2nTe0LCC2oodPAFR6j+PELvAsu7UPDfnFtiYGbiLYQHqfyVc/GxyhzjGn12Js9sb0VBnlQMLOxmKfCIZvYpl+Cw5GYpCEFby+QqzBzzUlk4J6eNGWp7dB7S7FQEc2P6KIgrnUJ2eg/oKF6UR9L5bu2k/jEnvw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729356060; 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=p1U79YdT0PylnjVG2LczPbrGQf0BQ1W2G0WtcJ4foSk=; b=GomJ4JDLufl2x8DPrUoC7rGsWTxQyXodcCMDgTj9LLO2cctJwhEPCOcz/fKmfhdQwtwXHFlSgQBejDzpeYF4Yt3+65eEwvnxq1AMFj4KEzF82P/dOVmg+WPZBdhNeVISWf0eRt7WUPhvWDVJx1Ly1chHQroGFuPx3A9k38Gu/78= 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 1729356060758988.1957903040847; Sat, 19 Oct 2024 09:41:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t2CUx-0001zm-6H; Sat, 19 Oct 2024 12:40:15 -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 1t2CUt-0001wV-JJ for qemu-devel@nongnu.org; Sat, 19 Oct 2024 12:40:11 -0400 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 1t2CUs-0003xC-3q for qemu-devel@nongnu.org; Sat, 19 Oct 2024 12:40:11 -0400 Received: from skiff.uberspace.de (skiff.uberspace.de [185.26.156.131]) by mailgate02.uberspace.is (Postfix) with ESMTPS id 904C917F838 for ; Sat, 19 Oct 2024 18:39:59 +0200 (CEST) Received: (qmail 9787 invoked by uid 990); 19 Oct 2024 16:39:59 -0000 Received: from unknown (HELO unkown) (::1) by skiff.uberspace.de (Haraka/3.0.1) with ESMTPSA; Sat, 19 Oct 2024 18:39:59 +0200 Authentication-Results: skiff.uberspace.de; auth=pass (plain) From: Julian Ganz To: qemu-devel@nongnu.org Cc: Julian Ganz , Michael Rolnik Subject: [RFC PATCH v2 5/7] target/avr: call plugin trap callbacks Date: Sat, 19 Oct 2024 18:39:38 +0200 Message-ID: <5807fbae77440ce091c1480a173e371a72142952.1729355735.git.neither@nut.email> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: <20231021122502.26746-1-neither@nut.email> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Bar: ----- X-Rspamd-Report: REPLY(-4) BAYES_HAM(-2.955061) MID_CONTAINS_FROM(1) MIME_GOOD(-0.1) R_MISSING_CHARSET(0.5) X-Rspamd-Score: -5.555061 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nut.email; s=uberspace; h=from:to:cc:subject:date; bh=3kEDEfs2NK+O76NkQpJ9J9wdE/Guadg1wnJP/wNvu24=; b=oL2YfM2sk5MpdnW86mImRU62igmM9MjOSYjboKOGIu1YkkUy7wFrnxDLp7m9lpwf3pclQ/wpE7 wtrnF4hWQkb5y5HTD4NMxxrdx3LoAU7MXIvU9SWXsDjQEbJDK0GppXrnyFb2i6oVfNcWXWEU5Dlg MdzR3ho/AaU9BnwTNKz7vMyTjCFdxcQDkUtq4Lo+ZZNX0yMLZcN4Jmrc9XwBQnyHPA5HpjjQm7OO P1pKedCoI/Rr0XEUaX/KspdT4EwEvosqizSUwfupWiJB1Ai3+W6EH6CXVjHnO6jyrLv9aQTANqHS OV8Ob2MReoHawOJg5fQmkx18EKzfwZzpqEfC2b2mZoyP6qmBdLVlk+ftesPyLNDZ6kBrTQCezO19 zGO8GQfFZVIHI7pX1CndzZ2AUgUrTUNnDz/0FbOCS2wSkqPXK55zdTrEoV35xQtfXqPQVqkpcEPe ThXSz9i0QecFaIe/c4BJHCOxY765f4/uMZrCe5FaLC+FL2YnITG+mMInQXdrecEgJCtE6i3lxnMy z+kRKN6xSuRdDbBOyauCozvR8m8yI6bb8cBlGOe/xu5UOrvdlwTxSLnmXWPJlR7jAlWJmoPCLFT+ zD3jZa+wgIjRA5Fdf2mdPsurVvt/5AOgwL9/Q6VegPh4U6AtX6H5WrxzILzCGkua/PJKgjdpFue6 k= 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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1729356061467116600 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 the hook for AVR targets. That architecture appears to only know interrupts. Signed-off-by: Julian Ganz Reviewed-by: Michael Rolnik --- target/avr/helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/avr/helper.c b/target/avr/helper.c index 345708a1b3..be94552674 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -28,6 +28,7 @@ #include "exec/cpu_ldst.h" #include "exec/address-spaces.h" #include "exec/helper-proto.h" +#include "qemu/plugin.h" =20 bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request) { @@ -97,6 +98,8 @@ void avr_cpu_do_interrupt(CPUState *cs) env->sregI =3D 0; /* clear Global Interrupt Flag */ =20 cs->exception_index =3D -1; + + qemu_plugin_vcpu_interrupt_cb(cs); } =20 hwaddr avr_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) --=20 2.45.2