From nobody Thu Apr 3 10:11:39 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 599432505CD for ; Fri, 7 Mar 2025 19:14:58 +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=1741374898; cv=none; b=X77xgpurdpiJ6XI8jVOEb9tUGR9sJwpQ5AG7y1RzyU2Dgh99sJHlqcXQbQ1E9vNdevsPpKXq+I801BmmuiRCWEsbwS1ppPKplLR2bI3b8/Vfo+Ikiuq6yIXl+nOEzmnqtL0o5FjKg+7F3rST4PdoM6+ZNLBngjfLaIkxmX2KMuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741374898; c=relaxed/simple; bh=WNgUSU0OrqFnvTXh8PzzTv6ghTQeysRMH1deXYrrJ9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H7FXOkdXz5awsB9Pij1/pPeeFjn3fMzjdwhjSwI6LBjeDpCiZOcEr/a7zyQpYD4CH3DPGuy9ZDW+UR3PuYwnEU4pcjrb+QwARNTpJM8dIdBiT1GpZa3BFAyOMowPBgXbwMNDawzTniL0YRmeDUJ0x5JNxa01yeEGXqI+rA6nqaw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=t/2EaS5q; 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="t/2EaS5q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA88AC4CEE9; Fri, 7 Mar 2025 19:14:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1741374897; bh=WNgUSU0OrqFnvTXh8PzzTv6ghTQeysRMH1deXYrrJ9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t/2EaS5qhxLrFqkwfrWVpSYOTqH0n7Y6H8OG4579UpSBIRMB+1RamWg2U3kbIwNq6 qNnnasdQIV2DFB/1Zs9klJ9hxJuY7z7Psbk8r4ztTNbOuFwYG8mOsTP4VNs4fV6vZL POKmPNKRQJNfzHPW3ZCYXAwnKVcJ67CT9UQ6KiCoyn2Ch1XFjPqgPNSro+L4ony4IT 9TTz8+c3FRBbO94WH8WMOMYq/5BsQYS1EkjCVXa3rPeGAAM/cuSKGjX1Vz5YRlJhIY DEyDaGgq062zjAIbWdEbvITPZTP5zAdSSjHebe7RHHE4qMHjp3CM3E7EmdvcnIb76V nfSZQykyIDE2A== Received: from mchehab by mail.kernel.org with local (Exim 4.98.1) (envelope-from ) id 1tqd9r-0000000BQmz-3qvr; Fri, 07 Mar 2025 20:14:55 +0100 From: Mauro Carvalho Chehab To: Igor Mammedov , "Michael S . Tsirkin" Cc: Jonathan Cameron , Shiju Jose , qemu-arm@nongnu.org, qemu-devel@nongnu.org, Mauro Carvalho Chehab , "Gavin Shan" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ani Sinha , linux-kernel@vger.kernel.org Subject: [PATCH v8 11/20] acpi/generic_event_device: Update GHES migration to cover hest addr Date: Fri, 7 Mar 2025 20:14:40 +0100 Message-ID: <67c9a127c2f1eb7552fa93e957cf2b4b8b2aa13d.1741374594.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" The GHES migration logic should now support HEST table location too. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron Reviewed-by: Igor Mammedov --- hw/acpi/generic_event_device.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c index c85d97ca3776..5346cae573b7 100644 --- a/hw/acpi/generic_event_device.c +++ b/hw/acpi/generic_event_device.c @@ -386,6 +386,34 @@ static const VMStateDescription vmstate_ghes_state =3D= { } }; =20 +static const VMStateDescription vmstate_hest =3D { + .name =3D "acpi-hest", + .version_id =3D 1, + .minimum_version_id =3D 1, + .fields =3D (const VMStateField[]) { + VMSTATE_UINT64(hest_addr_le, AcpiGhesState), + VMSTATE_END_OF_LIST() + }, +}; + +static bool hest_needed(void *opaque) +{ + AcpiGedState *s =3D opaque; + return s->ghes_state.hest_addr_le; +} + +static const VMStateDescription vmstate_hest_state =3D { + .name =3D "acpi-ged/hest", + .version_id =3D 1, + .minimum_version_id =3D 1, + .needed =3D hest_needed, + .fields =3D (const VMStateField[]) { + VMSTATE_STRUCT(ghes_state, AcpiGedState, 1, + vmstate_hest, AcpiGhesState), + VMSTATE_END_OF_LIST() + } +}; + static const VMStateDescription vmstate_acpi_ged =3D { .name =3D "acpi-ged", .version_id =3D 1, @@ -398,6 +426,7 @@ static const VMStateDescription vmstate_acpi_ged =3D { &vmstate_memhp_state, &vmstate_cpuhp_state, &vmstate_ghes_state, + &vmstate_hest_state, NULL } }; --=20 2.48.1