From patchwork Wed May 15 09:40:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 796945 Delivered-To: patch@linaro.org Received: by 2002:a5d:452e:0:b0:34e:ceec:bfcd with SMTP id j14csp2892190wra; Wed, 15 May 2024 02:48:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVhPhE65sro7DznrbU/PeYeZpAM+k0jb9hO+kxfZA1USbBQzEUZ8Ot9iH6GHYoTFXDWmuihX2OCuwt9ilX9qdZy X-Google-Smtp-Source: AGHT+IHcDH0nH5njz9zShSlOCb9EYQnplYPrbebsmlt1g4KAvEzhtf4Y/ZLAGaol5R2wkVxHnOeq X-Received: by 2002:a05:6214:3b87:b0:6a0:c96e:c4e3 with SMTP id 6a1803df08f44-6a168147d5emr182434476d6.4.1715766505628; Wed, 15 May 2024 02:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715766505; cv=none; d=google.com; s=arc-20160816; b=t1Fl/E1a/sK7KxXuvLIR9uz5KbqntMl9mPo4g9FKU3y1DMtbW9XaosLzt5XS8drHCs 3k0aRMChK0/x9wEoo35HLUJ5ta03tDl52s62+WeqqIE4Y2N+Ry+IKfuBxIUO6PJRZCZV Nh0TNLbZNdf6IYs41R4xNXkuuKmyOsft5xlu0lL21R/k4ESOhmDqG2PdUYJB35aleqzE aL2wRLR+DLOcG1f3PLU8ddeEd+PqVNvRROLrMOvxfIYJ8Iw8WsuSOWgqGSzAneh8aqDc VeXk+QUN6KtDKvZkc03oJ+CK8Pc247EYp7yt+0XBN3L2/uM1/kUY9EuTdaA1HRM9LFpI iAcw== 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=k/g2nDoo1RH/BagtlW1sKBN2fIzNgtQvcf43UlqrvVNKUVwxFfCehvMuF/A+hz5jQJ D2n3/NV/W23V4y2ydaEsF/56agPaDCCi3QluhedJl/65b4xnxfa03Mo325LKZPTVAJvV n4WsM4PjTVyM30/WEhtzhlq8q0U0hZNjQPqBwHPiIjtKw2i9oSezqE/o9iTs9lKBXN4y vz0nLAP5Q9WE0otUBxlqpBZukowzsX5/ifsZd61Icu1M+gsgc14WaYVR/p/q0831GWCu sx3baxfIToUa44yWI4XnZhPG8CrR/Gx5vkSqRpX9qSpMoQJMqlP7HclAdmBpWaPinQm6 IW4A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WtiV8xHQ; 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 6a1803df08f44-6a15f1d8373si137816266d6.100.2024.05.15.02.48.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2024 02:48:25 -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=WtiV8xHQ; 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 1s7BBQ-0001Gk-HK; Wed, 15 May 2024 05:44:24 -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 1s7BBN-0000vi-6S for qemu-devel@nongnu.org; Wed, 15 May 2024 05:44:21 -0400 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7BBL-0002W0-3R for qemu-devel@nongnu.org; Wed, 15 May 2024 05:44:20 -0400 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5210684cee6so7748627e87.0 for ; Wed, 15 May 2024 02:44:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715766257; x=1716371057; 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=WtiV8xHQPSrHAjxzzNI1ARs/tHqyEorPwAROEtYxzdkryV54HQgjEcJF6Oax7T2qsO gapB0DSN9DM4wV7ns0QHPu2GISpmHd5DkI7xXJO/041abYJfc/O97Dy6ZT4vH7oFd9NB QXmYA3JkqHrrsQNLff1Abx2JHvUqcUmSIcUzEEuYCfFkFJjxB2BJeZy2R11yI+gpFDGe 2zmbUPTVQCDfo40OKACisQLL/8RngcFgVKSh4FO4Yr2A2CxI0ssU4d+lZcM2ddSBHAIN N60dKu3EgUnKLJsDz1LtknXQ20ZtnWQyHqfRnALK/GptlQDVBNVzQDL+LwYRJ23ahMcl 5Rlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715766257; x=1716371057; 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=gbRPqBDDciWdnxU81/iM6CRyJ4hmZK7K8GblK+4YvmLXaN+4/8W2mF+N6ndzbZlwZO v/qdBYjT63mgbmd9zr+rkSsUL7Q2G4ZPTGOpJjR1nA/u75Aq1qoBabHul1IRFFk4rjbr RaRatfpxHnWgOzZ85LeJS6HIQzxKXfnchsgFdMK/Yqi0AzyzGGucTowix2o522sGfdxV HkXLSWP4QGXBrZDlzYxm/TQIybRPK/gzo31a5Aok5ZfI4L3lxr053R+gaevGiO7rQzRE NCRYF/gt5Gf8X4/zUAA4dR/UoJLlMqSSJHHJOrmkQaQGzmo91Db4IJ5ROu2OiN01u7+J eHTw== X-Gm-Message-State: AOJu0YzIGTVpYHV6y/SPZdWwej2t5neyjaWQSo77NtGQapNUDLJdGrk8 AvFRsIks+OtGUc/ALj+JzTJe0AePWG4umcGxljWhy/vuiI1mjJdFvRnVRueJAAX+d5NJSWD74pV Ihvk= X-Received: by 2002:a19:770b:0:b0:51e:f8ae:db35 with SMTP id 2adb3069b0e04-5220fe798b9mr9813528e87.43.1715766255434; Wed, 15 May 2024 02:44:15 -0700 (PDT) Received: from stoup.. ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3502bbbc334sm15926239f8f.103.2024.05.15.02.44.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 02:44:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 43/43] target/hppa: Log cpu state on return-from-interrupt Date: Wed, 15 May 2024 11:40:43 +0200 Message-Id: <20240515094043.82850-44-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240515094043.82850-1-richard.henderson@linaro.org> References: <20240515094043.82850-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=richard.henderson@linaro.org; helo=mail-lf1-x134.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)