From patchwork Thu Apr 25 00:00:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 791785 Delivered-To: patch@linaro.org Received: by 2002:a5d:4884:0:b0:346:15ad:a2a with SMTP id g4csp1119597wrq; Wed, 24 Apr 2024 17:11:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWC+7Fsc/n0DXd9TKpfktb3eKagt4GQgISY+BLh2qAmHFHW9RfdL9Ll0w0aJEF/qf1qYwG6qZYLEpXbSai2uuuh X-Google-Smtp-Source: AGHT+IGalrbNWDLtbqAd+cvoOzI6c4AmTkg7RhlopG7ifY8REgMBzvyVvzp+U5t/yB1wLAoBKyeU X-Received: by 2002:ac8:5789:0:b0:439:b3de:a669 with SMTP id v9-20020ac85789000000b00439b3dea669mr4946983qta.44.1714003913957; Wed, 24 Apr 2024 17:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714003913; cv=none; d=google.com; s=arc-20160816; b=pdAdHjblmphBTYxQRBi8TOCdMRctwmmPEuVrE0izqL2S4dXmxiA6RAwvLS+88nWYeS RlHib1rHJMiU7gw3yiVPOPnQlS6KbC13WRYxeuSIagxR231DaMvVcDx9atuPqGRZTM1A YZIphl1b80Pt1hbw8pWKDwzeTO/auw1QzE2hSnyWZ7lwAASHNyXzqm6GqoLSYIfUFPqt WrnT9RcDVL3oFe6BUg+GERE2v3gaKVlDB6ZhlUjGMSY40o2PwlDqzHDF4rP/bxQ4Wt4K JnHYOD40yC0imlE8fm1LC9Hdtd6RxM7jeS6+jlqXU1RvG4qRsZCsbwaQjEPL3bljXccW 2ftg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=IL2hAokqpmQr3sSx0rCsqvvhI5ki9eqOu02SaoXaEMQ=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=E5C2n9f8jLfeMV4lV2x5/MAOy6vhgWa1LNsBaBbbGUtfDqIHsQScUM+/mbBvzdZ9aX Y3VMRBxxrItH2KwProPZy/vT/5CVEA6KH5Ttg5QBlRcsOU7RRBEx4slkbZSRM9NvofiA 8+GhveOt2QK3l84sXChQb2rOuPAIW+tAS6Wxe39KNWP9eQZY8V7zG7fthnYQmV2jAbuT cmi5mRzzd9xvObZ3GEPSu6klE0/eRyk8NPcSawfthMjbwt1cu3/RECXpzfbBOCi6ciTY gb479C9skMKrKxndAzOwD5OLkC5WmEdGI03hOsINadsdt42P1W4DUxlRn9FS765WfrSx OzLg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pMqXt2EI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x6-20020ac85f06000000b00439f518e6fesi4590986qta.158.2024.04.24.17.11.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Apr 2024 17:11:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pMqXt2EI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzmbf-000672-03; Wed, 24 Apr 2024 20: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 1rzmb7-0005Jd-W5 for qemu-devel@nongnu.org; Wed, 24 Apr 2024 20:04:22 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzmaw-0007ue-1F for qemu-devel@nongnu.org; Wed, 24 Apr 2024 20:04:11 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1e4bf0b3e06so4009705ad.1 for ; Wed, 24 Apr 2024 17:04:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714003448; x=1714608248; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=IL2hAokqpmQr3sSx0rCsqvvhI5ki9eqOu02SaoXaEMQ=; b=pMqXt2EIg+My+S0q42+uYmZ+cUJBMtM22sKVVCDDOFwSHcv24Kx9Ibn+/dALcrC2MC gG2hiwvnCIc3mAILeqPH+w+6bdtIaf0I4CIH9AnZSpZNWTRj9fx/aoLn35TeLx5lpAF1 qtGJK/rsWf3ew9hq9ZuelQ02i+CkhrvEoK2wL+2SrIdhFX7TA+WMdbHeN8t7x+RqpQdZ kC91ZEP6sDagvI+XZJwAlQXhhVXU35qb9Bsx+TDTxEn8qz51gG+LGADTZU+1q+97zaF3 U8KPaSRzhijU/fqcoCE66be0l3pRNzV+Ona58PZBofVZ+sVYVDb7jiCT3R58o3SXz1xd nYEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714003448; x=1714608248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IL2hAokqpmQr3sSx0rCsqvvhI5ki9eqOu02SaoXaEMQ=; b=T/BCpk34I1y7gJrAjNlmsrRsYf3+G5bm5C3+cXrYUcZrzjx/WtQL/zRhexf6jdt1E9 Qi5fhoZVD6m3+TKIG7nkvU0VEpdRqoRZCLt5ji9RhSDQcbuRNSkeZwIx8YJ/U4NsEazs Ll+W0xn586dn5eSXOjtm9LM66UJl84mPN3e6Gfx1QuFh53xMDLlGpyBTYmUWXM4yZxty +wTwFHWK3Bpixv51FdTeogp5CaeWDdsC70uCheFsiqqkmYwkXpInNkzTaWTLB6Sbo9My N6Pn+rcLAWJzt/MqKcU9GQnyOsusLLMuCfQC2o0t8tHxInvkn3lBJjXflU36Exb2l/hk bxtw== X-Gm-Message-State: AOJu0Yw45bMa/nnOmJmAWs4GxAL2mt++gJ9C6HZiexzdgMtAtb9OWdPy uu9/4O2xexzpAcwFGfVBF37Rwak+0J2d3C7VaFyQUx3ioIVvSmg8Nw0X6BaD24BWFk9gLblVlXN 4 X-Received: by 2002:a17:902:cf12:b0:1e5:11ac:a283 with SMTP id i18-20020a170902cf1200b001e511aca283mr5418959plg.9.1714003448453; Wed, 24 Apr 2024 17:04:08 -0700 (PDT) Received: from stoup.. ([156.19.246.23]) by smtp.gmail.com with ESMTPSA id y20-20020a170902ed5400b001e0648dfd68sm12483717plb.296.2024.04.24.17.04.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 17:04:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 45/45] target/hppa: Log cpu state on return-from-interrupt Date: Wed, 24 Apr 2024 17:00:23 -0700 Message-Id: <20240425000023.1002026-46-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240425000023.1002026-1-richard.henderson@linaro.org> References: <20240425000023.1002026-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Inverse of the logging on taking an interrupt. Signed-off-by: Richard Henderson --- target/hppa/sys_helper.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target/hppa/sys_helper.c b/target/hppa/sys_helper.c index 22d6c89964..9b43b556fd 100644 --- a/target/hppa/sys_helper.c +++ b/target/hppa/sys_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" @@ -93,6 +94,17 @@ void HELPER(rfi)(CPUHPPAState *env) env->iaoq_b = env->cr_back[1]; env->iasq_f = (env->cr[CR_IIASQ] << 32) & ~(env->iaoq_f & mask); env->iasq_b = (env->cr_back[0] << 32) & ~(env->iaoq_b & mask); + + if (qemu_loglevel_mask(CPU_LOG_INT)) { + FILE *logfile = qemu_log_trylock(); + if (logfile) { + CPUState *cs = env_cpu(env); + + fprintf(logfile, "RFI: cpu %d\n", cs->cpu_index); + hppa_cpu_dump_state(cs, logfile, 0); + qemu_log_unlock(logfile); + } + } } static void getshadowregs(CPUHPPAState *env)