[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241003164641.76e5bffe@imammedo.users.ipa.redhat.com>
Date: Thu, 3 Oct 2024 16:46:41 +0200
From: Igor Mammedov <imammedo@...hat.com>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>, Shiju Jose
<shiju.jose@...wei.com>, "Michael S. Tsirkin" <mst@...hat.com>, Ani Sinha
<anisinha@...hat.com>, Peter Maydell <peter.maydell@...aro.org>, Shannon
Zhao <shannon.zhaosl@...il.com>, linux-kernel@...r.kernel.org,
qemu-arm@...gnu.org, qemu-devel@...gnu.org
Subject: Re: [PATCH RFC 5/5] arm/virt-acpi-build: Properly handle virt-9.1
On Tue, 1 Oct 2024 13:42:50 +0200
Mauro Carvalho Chehab <mchehab+huawei@...nel.org> wrote:
> A virt-9.1 machine can have only one source ID.
and here it is.
I'd just merge this into previous patch
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> ---
> hw/arm/virt-acpi-build.c | 30 ++++++++++++++++++++++++++----
> 1 file changed, 26 insertions(+), 4 deletions(-)
>
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index 476c365851c4..8036eb5953d0 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -894,6 +894,10 @@ static const AcpiNotificationSourceId hest_ghes_notify[] = {
> {ACPI_HEST_SRC_ID_SYNC, ACPI_GHES_NOTIFY_SEA},
> };
>
> +static const AcpiNotificationSourceId hest_ghes_notify_9_1[] = {
> + {ACPI_HEST_SRC_ID_QMP, ACPI_GHES_NOTIFY_GPIO},
> +};
> +
> static
> void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
> {
> @@ -947,10 +951,28 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
> build_dbg2(tables_blob, tables->linker, vms);
>
> if (vms->ras) {
> - acpi_add_table(table_offsets, tables_blob);
> - acpi_build_hest(tables_blob, tables->hardware_errors, tables->linker,
> - hest_ghes_notify, ARRAY_SIZE(hest_ghes_notify),
> - vms->oem_id, vms->oem_table_id);
> + AcpiGhesState *ags;
> + AcpiGedState *acpi_ged_state;
> +
> + acpi_ged_state = ACPI_GED(object_resolve_path_type("", TYPE_ACPI_GED,
> + NULL));
> + if (acpi_ged_state) {
> + ags = &acpi_ged_state->ghes_state;
> +
> + acpi_add_table(table_offsets, tables_blob);
> +
> + if (!ags->hest_lookup) {
> + acpi_build_hest(tables_blob, tables->hardware_errors,
> + tables->linker, hest_ghes_notify_9_1,
> + ARRAY_SIZE(hest_ghes_notify_9_1),
> + vms->oem_id, vms->oem_table_id);
> + } else {
> + acpi_build_hest(tables_blob, tables->hardware_errors,
> + tables->linker, hest_ghes_notify,
> + ARRAY_SIZE(hest_ghes_notify),
> + vms->oem_id, vms->oem_table_id);
> + }
> + }
> }
>
> if (ms->numa_state->num_nodes > 0) {
Powered by blists - more mailing lists