From nobody Fri Nov 14 20:59:38 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=1761563204; cv=none; d=zohomail.com; s=zohoarc; b=ApU7sT0yTdogwIY2jWmoevBRPYjUzRrLLSXIiEhh0BvL9TfrlYdSpJWHQCgrAHqSNNOGkx7Jv8J5JroT23FPjoyQYvwx7DyBUnIcC/rKnYdpdzBUfN7lA+8nLYHB7r1VL7wXmL/Cfg3VQLIbEHdI0YrzHTzvOTBRpKHSaFoHKEU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1761563204; 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=7YUrkZOEiVqgaskj8vySb8u4ZvfCCqWGczqDOfAD8J8=; b=jsNXcwiHP/7O7pjy3XvNEw7fEpbi7IxPstDr/ZtCD2FkUcnPVc7b6VBbe1pgoXD8PTMpEMVRZ7KRijF4X8yyKqq7myyrqVFCV/ljHjxOJnt5vFwUVG4MDN9xjjzgwRm3vO0K5FP0mx30d1fjiIrg3lRYt6VOX3trTxA13QblPjQ= 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 17615632047441003.9898489887187; Mon, 27 Oct 2025 04:06:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vDL1z-000111-KW; Mon, 27 Oct 2025 07:04:55 -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 1vDL1O-0000cz-Uz for qemu-devel@nongnu.org; Mon, 27 Oct 2025 07:04:19 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vDL1B-0005gm-N5 for qemu-devel@nongnu.org; Mon, 27 Oct 2025 07:04:14 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-b6d345d7ff7so848540466b.1 for ; Mon, 27 Oct 2025 04:03:59 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b6d9b536710sm407933666b.57.2025.10.27.04.03.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Oct 2025 04:03:53 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6681A60A76; Mon, 27 Oct 2025 11:03:45 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761563038; x=1762167838; 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=7YUrkZOEiVqgaskj8vySb8u4ZvfCCqWGczqDOfAD8J8=; b=clBjQ/C7Tjkmy1ME334uPcGKyGtH61pdLPeItkAVus8T8mMDJ/wwTK+fZO/64LsVs6 BSpdW+GKPmhcYMSmhBNNk7XjJlrG3yNlM0VysM31evp3QLUCyukov4lh649ERnbaBjOO AEK6SKNuAL0bcphbx+665LXTbji7jxe2fAwWF4JODAGmtLUWfkZX6W9dLKHZ1nwuu5jm gTcOo81qgwadhIRccvVSqiQxRT/lI3nCKCb++bk8fSe9fXoZ5a30Kt9LwQKwlMmTNBhT hZj2TviG2n9EHIkQZNv0DhiYamd4ROreHYp85rIDhQd098US/HZITtC9o/r8wHRHLBJl bQMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761563038; x=1762167838; 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=7YUrkZOEiVqgaskj8vySb8u4ZvfCCqWGczqDOfAD8J8=; b=F8cOWQvFtS8NRrdUM78e6dkrLkP6Qy/9rYUUhbOA802FTf2Eh07zFInzHhTd8uOjqP Mi82rrHBTrbCDDg05NqJWXtjGrE5MOBsKmNsNmum1QTyuBdBvdY2/9SJYUiRaUXFNNMx o5RrEeP3FT540Rw4FrL/7SIRrhFcYCnV+nf2cQ8PzYyeR+Jel9P9UOllE6JsAXWJyZlN R5x9YD+qRPlhbs9iqhheBUjtmFSJZVyuYzy7Vlj7uJ5hyIN+2+qcD+KeVq++9SmUBwiR Hml8qTcLU/2OOgeNWggll1p6PYHCSEo8roJe4ciaiOXIZ7BGHbqNHuaA1W1bHMT1428G XjYA== X-Gm-Message-State: AOJu0Yy70Lpl3/njW7OweGCZERL1WSSk6EQOEO5MRBHNzDOAQgc9vgKb Ps9+umzEDJmFYpOf7sWcael5UlqJE0xqdn4Qsqeyaxt/wJHNKtDHzPOHFlOX95AcQAU= X-Gm-Gg: ASbGnctTeh3/A7raGjVlA0GBhXq6CMIaD0zx24LWS2bRUgt9/wTD5IdjIZJ4X57tyUy JAk2bXc49co7559zcgdzYicNzRdlWiPp8XXrjTqGun2ObnLfUBGmMygp4TcbkAQMLxD7ZWcqkg3 MhzL89XxulMQBr4nmzHKLBFX+X1OBfjCkn/Z4fI0Ws+pgSzvHA85FsfvS77IXmoqxpV2zIFEL+y 9oaSl0M63t7pfdlyfb7ctBbRzx72VrRQFNTC7L8bNcVmHRDqXeQk45soh0LohCFnCuIqxu2XsuP fNFJ9uH3c1V7dY+Enaud8PfsTPtIVdud5q9+azlIxJNemWpVBiYj7xX6wIGHvEL4nf8mzvqg88p s0Xlju0+R5w2AnW2eLT2XwINFEpaM0pXTbwMDTG5fdb4EoYbIqNMS54W5/7cVyAIIldCZrFks59 Qi X-Google-Smtp-Source: AGHT+IHwrtYRvdWMuVy2AMsMT1ZRJwpgRqGp0QvPKkCoaQSEbVYP8oZ9QpyiS2d9CfCH1xzbuKIyJQ== X-Received: by 2002:a17:907:3f0e:b0:b6d:3e23:b68f with SMTP id a640c23a62f3a-b6d6b7e401bmr1405286066b.0.1761563037918; Mon, 27 Oct 2025 04:03:57 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Liu Zhiwei , Alexandre Iooss , Chinmay Rath , qemu-arm@nongnu.org, Peter Maydell , Nicholas Piggin , Ilya Leoshkevich , David Hildenbrand , qemu-ppc@nongnu.org, Paolo Bonzini , qemu-s390x@nongnu.org, Pierrick Bouvier , Bastian Koppelmann , Helge Deller , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Stafford Horne , Mahmoud Mandour , Artyom Tarasenko , Eduardo Habkost , Palmer Dabbelt , Alistair Francis , Laurent Vivier , Weiwei Li , Daniel Henrique Barboza , Mark Cave-Ayland , Yoshinori Sato , "Edgar E. Iglesias" , Aurelien Jarno , Richard Henderson , Thomas Huth , Max Filippov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , Michael Rolnik , Song Gao , qemu-riscv@nongnu.org, Aleksandar Rikalo , Julian Ganz Subject: [PATCH 14/35] target/hppa: call plugin trap callbacks Date: Mon, 27 Oct 2025 11:03:21 +0000 Message-ID: <20251027110344.2289945-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027110344.2289945-1-alex.bennee@linaro.org> References: <20251027110344.2289945-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::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.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: 1761563206608158500 From: Julian Ganz We identified a number of exceptions as interrupts, and we assume every other exception is a (syncroneous) exceptions. PA-RISC appears to not have any form of host-call. This change places the hook for PA-RISC targets. Signed-off-by: Julian Ganz Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e --- target/hppa/int_helper.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c index 191ae19404b..4e4869285b5 100644 --- a/target/hppa/int_helper.c +++ b/target/hppa/int_helper.c @@ -24,6 +24,7 @@ #include "exec/helper-proto.h" #include "hw/core/cpu.h" #include "hw/hppa/hppa_hardware.h" +#include "qemu/plugin.h" =20 static void eval_interrupt(HPPACPU *cpu) { @@ -95,6 +96,7 @@ void hppa_cpu_do_interrupt(CPUState *cs) CPUHPPAState *env =3D &cpu->env; int i =3D cs->exception_index; uint64_t old_psw, old_gva_offset_mask; + uint64_t last_pc =3D cs->cc->get_pc(cs); =20 /* As documented in pa2.0 -- interruption handling. */ /* step 1 */ @@ -212,6 +214,21 @@ void hppa_cpu_do_interrupt(CPUState *cs) env->iasq_f =3D 0; env->iasq_b =3D 0; =20 + switch (i) { + case EXCP_HPMC: + case EXCP_POWER_FAIL: + case EXCP_RC: + case EXCP_EXT_INTERRUPT: + case EXCP_LPMC: + case EXCP_PER_INTERRUPT: + case EXCP_TOC: + qemu_plugin_vcpu_interrupt_cb(cs, last_pc); + break; + default: + qemu_plugin_vcpu_exception_cb(cs, last_pc); + break; + } + if (qemu_loglevel_mask(CPU_LOG_INT)) { static const char * const names[] =3D { [EXCP_HPMC] =3D "high priority machine check", --=20 2.47.3