From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a17:505:11ab:b0:1be9:327d:8ee3 with SMTP id so11csp2020233njb; Mon, 3 Feb 2025 02:57:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXPHoakpzppumSzp4Nh1fVaPWfL3pksP1O+C1hC6jekCCFqf8OHXBOCiSeUY8uXYQ6aTXKz/cIj9RFRKw==@linaro.org X-Google-Smtp-Source: AGHT+IFF+SrbM1LEdrIzcNM/TsN3cQs/f2YAqu7nQkVius7micmtzHUniVPoZGSKcU4JDkX2Drp2 X-Received: by 2002:a17:907:9452:b0:ab6:f997:216f with SMTP id a640c23a62f3a-ab6f9972265mr1665999566b.38.1738580223167; Mon, 03 Feb 2025 02:57:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1738580223; cv=pass; d=google.com; s=arc-20240605; b=RCIhrFUtq3Zr/RBYKX9hqnG8aNWGkAc+qdL4D3qOgL6ZFJtiiNwIAOMiNqLwaqB0Bt s3IU2bfq/VO9pszn6ICQJjyDsD6bExvdD7bpkHhVqY6jOmsXDzGui5TDeK3GQLYv6KQb 5HWXWtfqtA3HDZShmDUPevIhmqgYhkLdIIi2RLYmTS4UiskM8MYqiD7dR8Lf/K7TVOJ8 LyP0w70haTNcQic0eB+XK8KJF1l098lj5GPLnKcvOxqtnTTIrxBgj3e6ygHMQ8MjQ3K6 rvbwtiNGrU3SiwCkruhipvh8EpYK2qHybmyynMVgJEOozYeSciKGXDlUWuYfBBUlpQxX 20kQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=ZelkZYbmIeiDYu+lhC9THFE79bDxr1zcuB01eRzo0pE=; fh=bTxaO08wtvbJXRrHkcGdgejP+oTHP3V5Nlsfit6+Mc8=; b=QdAvSvrRG+O/iqlExqxlVc4azg+Uv76NPJtHvpApEReG+4WuAu1J4eL+mQ3jjNidUT sQKtsL6VsQshX7E+zjymY1EE7pg0ObeKXTJQ57CzwJzWGpGwVn1TWT9H78f8WVBPfgW2 iIWG+DgDiHJZtmInnHOL0dGD14jO068eLTS7k6VObwJP1Ve8QWOHVUYkFtFKqZLfCtKx 7t7rLDTUmz6Y1M2Uhhpf56mWIbksfyXpTaKum1apc25iDlu25/EUiAfX1LdZO4hgizAq /mKSS7+Omk7j92Bd+8iI8+ZjNbjW3A00AFwjfOFThbibWwmes/u5HhkTnZkgxhWfh628 4v7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-496365-alex.bennee=linaro.org@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-496365-alex.bennee=linaro.org@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-ab6e49feab4si815034566b.400.2025.02.03.02.57.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 02:57:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-496365-alex.bennee=linaro.org@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-496365-alex.bennee=linaro.org@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-496365-alex.bennee=linaro.org@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 306801881EE8 for ; Mon, 3 Feb 2025 10:57:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC40E20125F; Mon, 3 Feb 2025 10:56:56 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E4C5200BA9 for ; Mon, 3 Feb 2025 10:56:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738580216; cv=none; b=f4LWEaHMbgEes3QOP8CnJZcOb8Z3OALr3n1ER4/ral9G1ercEJ7ytWXKX9gJGOfaTJEg006odorKeL+hgMl8c7xPNi3yxN6rzvkGmRFL75xiUWUYxVlumk1JvdJ2zIpdgDmzVZjqJQ2UGp1h70FhHhCTaNFS/nuRjuo34Ev55GA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738580216; c=relaxed/simple; bh=6Gku+OxZtx1iIVCtDG2FF9RHz0J4dQ/SCQFGW64ivY0=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tEIPQBbDiXzeG2AlyCrNqAbze60r317wf5MzbQ+WImm3Rz0B8m4nWTFav9goNMhwuGK8Avn5nbR6JMd5sJrNDIw/rdJX1LvSaKpjI7njy6yO2jp7zr3oWMMMQ2UrJIKVVqBKScyb3o+8wy9MiV8KiqBO4E796Z8IZpl/kW5/vqg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Ymjzx2xtgz6L4xr; Mon, 3 Feb 2025 18:54:21 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 1F2FB140B73; Mon, 3 Feb 2025 18:56:53 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 3 Feb 2025 11:56:52 +0100 Date: Mon, 3 Feb 2025 10:56:51 +0000 From: Jonathan Cameron To: Mauro Carvalho Chehab CC: Igor Mammedov , "Michael S . Tsirkin" , Shiju Jose , , , Cleber Rosa , John Snow , Subject: Re: [PATCH v3 14/14] scripts/ghes_inject: add a script to generate GHES error inject Message-ID: <20250203105651.00001a4e@huawei.com> In-Reply-To: <80858743b6fd67db3f48ac8cb466bbcde5b11132.1738345063.git.mchehab+huawei@kernel.org> References: <80858743b6fd67db3f48ac8cb466bbcde5b11132.1738345063.git.mchehab+huawei@kernel.org> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500002.china.huawei.com (7.191.160.78) To frapeml500008.china.huawei.com (7.182.85.71) X-TUID: 9APJ8kEsBiHS On Fri, 31 Jan 2025 18:42:55 +0100 Mauro Carvalho Chehab wrote: > Using the QMP GHESv2 API requires preparing a raw data array > containing a CPER record. > > Add a helper script with subcommands to prepare such data. > > Currently, only ARM Processor error CPER record is supported, by > using: > $ ghes_inject.py arm > > which produces those warnings on Linux: > > [ 705.032426] [Firmware Warn]: GHES: Unhandled processor error type 0x02: cache error > [ 774.866308] {4}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1 > [ 774.866583] {4}[Hardware Error]: event severity: recoverable > [ 774.866738] {4}[Hardware Error]: Error 0, type: recoverable > [ 774.866889] {4}[Hardware Error]: section_type: ARM processor error > [ 774.867048] {4}[Hardware Error]: MIDR: 0x00000000000f0510 > [ 774.867189] {4}[Hardware Error]: running state: 0x0 > [ 774.867321] {4}[Hardware Error]: Power State Coordination Interface state: 0 > [ 774.867511] {4}[Hardware Error]: Error info structure 0: > [ 774.867679] {4}[Hardware Error]: num errors: 2 > [ 774.867801] {4}[Hardware Error]: error_type: 0x02: cache error > [ 774.867962] {4}[Hardware Error]: error_info: 0x000000000091000f > [ 774.868124] {4}[Hardware Error]: transaction type: Data Access > [ 774.868280] {4}[Hardware Error]: cache error, operation type: Data write > [ 774.868465] {4}[Hardware Error]: cache level: 2 > [ 774.868592] {4}[Hardware Error]: processor context not corrupted > [ 774.868774] [Firmware Warn]: GHES: Unhandled processor error type 0x02: cache error > > Such script allows customizing the error data, allowing to change > all fields at the record. Please use: > > $ ghes_inject.py arm -h > > For more details about its usage. > > Signed-off-by: Mauro Carvalho Chehab Thanks for examples. Given my poor python skills take this one with a pinch of salt. Reviewed-by: Jonathan Cameron From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A66CCC02193 for ; Mon, 3 Feb 2025 10:57:35 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1teu8Q-0003jX-K4; Mon, 03 Feb 2025 05:56:58 -0500 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 1teu8O-0003iw-S6; Mon, 03 Feb 2025 05:56:56 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1teu8N-00027k-Bd; Mon, 03 Feb 2025 05:56:56 -0500 Received: from mail.maildlp.com (unknown [172.18.186.216]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Ymjzx2xtgz6L4xr; Mon, 3 Feb 2025 18:54:21 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id 1F2FB140B73; Mon, 3 Feb 2025 18:56:53 +0800 (CST) Received: from localhost (10.203.177.66) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 3 Feb 2025 11:56:52 +0100 Date: Mon, 3 Feb 2025 10:56:51 +0000 To: Mauro Carvalho Chehab CC: Igor Mammedov , "Michael S . Tsirkin" , Shiju Jose , , , Cleber Rosa , John Snow , Subject: Re: [PATCH v3 14/14] scripts/ghes_inject: add a script to generate GHES error inject Message-ID: <20250203105651.00001a4e@huawei.com> In-Reply-To: <80858743b6fd67db3f48ac8cb466bbcde5b11132.1738345063.git.mchehab+huawei@kernel.org> References: <80858743b6fd67db3f48ac8cb466bbcde5b11132.1738345063.git.mchehab+huawei@kernel.org> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.177.66] X-ClientProxiedBy: lhrpeml500002.china.huawei.com (7.191.160.78) To frapeml500008.china.huawei.com (7.182.85.71) Received-SPF: pass client-ip=185.176.79.56; envelope-from=jonathan.cameron@huawei.com; helo=frasgout.his.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.01, 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: , Reply-to: Jonathan Cameron From: Jonathan Cameron via Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Fri, 31 Jan 2025 18:42:55 +0100 Mauro Carvalho Chehab wrote: > Using the QMP GHESv2 API requires preparing a raw data array > containing a CPER record. > > Add a helper script with subcommands to prepare such data. > > Currently, only ARM Processor error CPER record is supported, by > using: > $ ghes_inject.py arm > > which produces those warnings on Linux: > > [ 705.032426] [Firmware Warn]: GHES: Unhandled processor error type 0x02: cache error > [ 774.866308] {4}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1 > [ 774.866583] {4}[Hardware Error]: event severity: recoverable > [ 774.866738] {4}[Hardware Error]: Error 0, type: recoverable > [ 774.866889] {4}[Hardware Error]: section_type: ARM processor error > [ 774.867048] {4}[Hardware Error]: MIDR: 0x00000000000f0510 > [ 774.867189] {4}[Hardware Error]: running state: 0x0 > [ 774.867321] {4}[Hardware Error]: Power State Coordination Interface state: 0 > [ 774.867511] {4}[Hardware Error]: Error info structure 0: > [ 774.867679] {4}[Hardware Error]: num errors: 2 > [ 774.867801] {4}[Hardware Error]: error_type: 0x02: cache error > [ 774.867962] {4}[Hardware Error]: error_info: 0x000000000091000f > [ 774.868124] {4}[Hardware Error]: transaction type: Data Access > [ 774.868280] {4}[Hardware Error]: cache error, operation type: Data write > [ 774.868465] {4}[Hardware Error]: cache level: 2 > [ 774.868592] {4}[Hardware Error]: processor context not corrupted > [ 774.868774] [Firmware Warn]: GHES: Unhandled processor error type 0x02: cache error > > Such script allows customizing the error data, allowing to change > all fields at the record. Please use: > > $ ghes_inject.py arm -h > > For more details about its usage. > > Signed-off-by: Mauro Carvalho Chehab Thanks for examples. Given my poor python skills take this one with a pinch of salt. Reviewed-by: Jonathan Cameron