From nobody Thu Dec 18 15:56:26 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 93985204589 for ; Fri, 6 Dec 2024 17:21:28 +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=1733505688; cv=none; b=LonDGJRaei5GJiQ0vk57U1EQCTInBE7GMoJQY+2UkGqeGcAdWKwfeVFu/tGSdAauCuwchK2Wvilz5K0oViXRUw2MecbWgxMzgY3npTwjzbKpfaA/ts7N2z/MZPruI5BYTuP+HHooymLdwrPm6Q3DeirxlUlJKZCtDrS8aPFdnNE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733505688; c=relaxed/simple; bh=wU6bEN0SPz/LlKhqMAmMkomSPYpkFTOMIKtUFlzjV24=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ji8tb9m6m5Jdre3mYy1AhlA8iH+Eot2NwhJzAwHTwpMFVXjmVn3fat0NVoobnfTFF+9VdkkOmiX24HlaDN2KS67LkgQWi4lGanYA6b7RrOhr562rEYos05Vok2ZxhnwR5A9DCXRJYsCUYbHWH7wSvSAT5T4D/Z06WmZEfezmjoY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YOd1XUh8; 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="YOd1XUh8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B512CC4CEF9; Fri, 6 Dec 2024 17:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733505687; bh=wU6bEN0SPz/LlKhqMAmMkomSPYpkFTOMIKtUFlzjV24=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YOd1XUh8Pkz95TL4Qvy2M8F5/GFsP149rcAnvSAaxe86m7DevEszuvp7vII6BR3gM Jdmdrv6EBhgy/Ou9xiGR5nQcDJcDqW4d9FwaAKTuW6KU1dI2lmkNsnVe3fBWuAgLxt dVvDFiva61xpIN/e+PuokJjS0khH/w2VsOTCQCGMhXi9Fx37ly3dLLOXrQ0vUx7QNB 3ZDKANgFJafBx+zRDRdIWRy4tTpFX03UkI+/3VFxHXEz/FLUmidusD2SI16kDorKwQ kk9UI2Ul4N+ttYEO6xfBouxat2f2lzdtinh5MhNeNbtuXa0ArnGnQjPabKVPwJsQQd 9WcJSQzJimUGw== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tJc17-00000005RKc-3xJv; Fri, 06 Dec 2024 18:21:25 +0100 From: Mauro Carvalho Chehab To: "Michael S . Tsirkin" Cc: Jonathan Cameron , Shiju Jose , Mauro Carvalho Chehab , Ani Sinha , Igor Mammedov , linux-kernel@vger.kernel.org, qemu-devel@nongnu.org Subject: [PATCH 17/31] acpi/generic_event_device: Update GHES migration to cover hest addr Date: Fri, 6 Dec 2024 18:12:39 +0100 Message-ID: <6a04f0d7978e43a9a2238d14493513c5fff415f4.1733504943.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.47.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 at GED should now support HEST table location too. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jonathan Cameron --- 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 17baf36132a8..c1116dd8d7ae 100644 --- a/hw/acpi/generic_event_device.c +++ b/hw/acpi/generic_event_device.c @@ -387,6 +387,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, @@ -399,6 +427,7 @@ static const VMStateDescription vmstate_acpi_ged =3D { &vmstate_memhp_state, &vmstate_cpuhp_state, &vmstate_ghes_state, + &vmstate_hest_state, NULL } }; --=20 2.47.1