From nobody Thu May 8 13:00:51 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D5B102416AA for <linux-kernel@vger.kernel.org>; Wed, 15 Jan 2025 12:50:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736945441; cv=none; b=llUzWmCShSyw6Rgq7V/Xj2Yjc5VVZb6LDV5RlMkUh3ZrAgdRJaVsXBCxzeNkz06t7SUHn6PWdb71C2ibA8o0Nl00TuSKpPV4xaEWcGzUfVcjS2XgL6Il0Hz5iA3amhf8gZU2HqNbnCQQm0CNoKD2QabC5pz6Xqp+Te/LsdpNnk8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736945441; c=relaxed/simple; bh=AUhnlIqxgzeN1cO9oSGoHrFZMT09oNtXFdX8itNgViY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HVx10/rl4UxIhpBWB5pHVUVn2Fe0Ky2aUD+ELX8oHgn1n9sLUu0dmH/tGHjjmodUmFI2+RYbzdDUKILWyZhmeOCd0w9PKR1arOHaRSY7SQqQbElFh3KgEnMoDEKPPn1VaZ/tyuwyoiW+t3OnPkFUxuhMwZMdYFeO9PuwiSoQ/8o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iXmEzkOk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iXmEzkOk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3084EC4AF09; Wed, 15 Jan 2025 12:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736945441; bh=AUhnlIqxgzeN1cO9oSGoHrFZMT09oNtXFdX8itNgViY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iXmEzkOk7Fzdn2BegTCE8SqV9Jl8u9PW0clBNFS9xIXd2qr4UUKoeJU+RCBcxpIxn TkTHPncceTFYAdDe2nbH+kb3g9IoAzfjArCw5vXBFeCWM3fsw4dVfWoC0tfPxL+e9f RCmJdvPqshPV9BxbG6hvACDF1UwocErMNuiaLImjNKRrziXuIAedr/bB4s6zSdG1ia qXgL/xcbuf+eEbI00v8JLoAQB7GKvuJ9+puNabY2KTc5BG2WVJvSOajQ83keDHCklT yHupKSf82i/xpSGdTXRWbc2a8R1FHX6FbTIrAw2Lelb+bqhBdrzVlDVBwvqR0FIfnF CjwYcfDBTHfdg== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from <mchehab+huawei@kernel.org>) id 1tY2r1-00000004yGA-1QLB; Wed, 15 Jan 2025 13:50:39 +0100 From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> To: Igor Mammedov <imammedo@redhat.com>, "Michael S . Tsirkin" <mst@redhat.com> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>, Shiju Jose <shiju.jose@huawei.com>, qemu-arm@nongnu.org, qemu-devel@nongnu.org, Mauro Carvalho Chehab <mchehab+huawei@kernel.org>, Ani Sinha <anisinha@redhat.com>, Dongjiu Geng <gengdongjiu1@gmail.com>, linux-kernel@vger.kernel.org Subject: [PATCH v7 12/16] acpi/ghes: rename etc/hardware_error file macros Date: Wed, 15 Jan 2025 13:50:28 +0100 Message-ID: <e79a013bcd9f634b46ff6b34756d1b1403713af3.1736945236.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <cover.1736945236.git.mchehab+huawei@kernel.org> References: <cover.1736945236.git.mchehab+huawei@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Content-Type: text/plain; charset="utf-8" Now that we have also have a file to store HEST data location, which is part of GHES, better name the file where CPER records are stored. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> --- hw/acpi/ghes.c | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c index 6843ddf64b29..3f94a5542bb4 100644 --- a/hw/acpi/ghes.c +++ b/hw/acpi/ghes.c @@ -28,8 +28,8 @@ #include "hw/nvram/fw_cfg.h" #include "qemu/uuid.h" =20 -#define ACPI_GHES_ERRORS_FW_CFG_FILE "etc/hardware_errors" -#define ACPI_GHES_DATA_ADDR_FW_CFG_FILE "etc/hardware_errors_addr" +#define ACPI_HW_ERROR_FW_CFG_FILE "etc/hardware_errors" +#define ACPI_HW_ERROR_ADDR_FW_CFG_FILE "etc/hardware_errors_addr" =20 /* The max size in bytes for one error block */ #define ACPI_GHES_MAX_RAW_DATA_LENGTH (1 * KiB) @@ -234,7 +234,7 @@ static void build_ghes_error_table(GArray *hardware_err= ors, BIOSLinker *linker) ACPI_GHES_MAX_RAW_DATA_LENGTH * ACPI_GHES_ERROR_SOURCE_COUNT); =20 /* Tell guest firmware to place hardware_errors blob into RAM */ - bios_linker_loader_alloc(linker, ACPI_GHES_ERRORS_FW_CFG_FILE, + bios_linker_loader_alloc(linker, ACPI_HW_ERROR_FW_CFG_FILE, hardware_errors, sizeof(uint64_t), false); =20 for (i =3D 0; i < ACPI_GHES_ERROR_SOURCE_COUNT; i++) { @@ -243,17 +243,21 @@ static void build_ghes_error_table(GArray *hardware_e= rrors, BIOSLinker *linker) * corresponding "Generic Error Status Block" */ bios_linker_loader_add_pointer(linker, - ACPI_GHES_ERRORS_FW_CFG_FILE, sizeof(uint64_t) * i, - sizeof(uint64_t), ACPI_GHES_ERRORS_FW_CFG_FILE, - error_status_block_offset + i * ACPI_GHES_MAX_RAW_DATA_LENGTH); + ACPI_HW_ERROR_FW_CFG_FILE, + sizeof(uint64_t) * i, + sizeof(uint64_t), + ACPI_HW_ERROR_FW_CFG_FILE, + error_status_block_offset + + i * ACPI_GHES_MAX_RAW_DATA_LENGTH); } =20 /* * tell firmware to write hardware_errors GPA into * hardware_errors_addr fw_cfg, once the former has been initialized. */ - bios_linker_loader_write_pointer(linker, ACPI_GHES_DATA_ADDR_FW_CFG_FI= LE, - 0, sizeof(uint64_t), ACPI_GHES_ERRORS_FW_CFG_FILE, 0); + bios_linker_loader_write_pointer(linker, ACPI_HW_ERROR_ADDR_FW_CFG_FIL= E, 0, + sizeof(uint64_t), + ACPI_HW_ERROR_FW_CFG_FILE, 0); } =20 /* Build Generic Hardware Error Source version 2 (GHESv2) */ @@ -290,8 +294,10 @@ static void build_ghes_v2(GArray *table_data, build_append_gas(table_data, AML_AS_SYSTEM_MEMORY, 0x40, 0, 4 /* QWord access */, 0); bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE, - address_offset + GAS_ADDR_OFFSET, sizeof(uint64_t), - ACPI_GHES_ERRORS_FW_CFG_FILE, source_id * sizeof(uint64_t)); + address_offset + GAS_ADDR_OFFSET, + sizeof(uint64_t), + ACPI_HW_ERROR_FW_CFG_FILE, + source_id * sizeof(uint64_t)); =20 /* Notification Structure */ build_ghes_hw_error_notification(table_data, notify); @@ -308,9 +314,11 @@ static void build_ghes_v2(GArray *table_data, build_append_gas(table_data, AML_AS_SYSTEM_MEMORY, 0x40, 0, 4 /* QWord access */, 0); bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE, - address_offset + GAS_ADDR_OFFSET, - sizeof(uint64_t), ACPI_GHES_ERRORS_FW_CFG_FILE, - (ACPI_GHES_ERROR_SOURCE_COUNT + source_id) * sizeof(uint64_t)); + address_offset + GAS_ADDR_OFFSET, + sizeof(uint64_t), + ACPI_HW_ERROR_FW_CFG_FILE, + (ACPI_GHES_ERROR_SOURCE_COUNT + source_= id) + * sizeof(uint64_t)); =20 /* * Read Ack Preserve field @@ -346,11 +354,11 @@ void acpi_ghes_add_fw_cfg(AcpiGhesState *ags, FWCfgSt= ate *s, GArray *hardware_error) { /* Create a read-only fw_cfg file for GHES */ - fw_cfg_add_file(s, ACPI_GHES_ERRORS_FW_CFG_FILE, hardware_error->data, + fw_cfg_add_file(s, ACPI_HW_ERROR_FW_CFG_FILE, hardware_error->data, hardware_error->len); =20 /* Create a read-write fw_cfg file for Address */ - fw_cfg_add_file_callback(s, ACPI_GHES_DATA_ADDR_FW_CFG_FILE, NULL, NUL= L, + fw_cfg_add_file_callback(s, ACPI_HW_ERROR_ADDR_FW_CFG_FILE, NULL, NULL, NULL, &(ags->ghes_addr_le), sizeof(ags->ghes_addr_le), false); =20 ags->present =3D true; --=20 2.47.1