From nobody Thu Jan 23 05:42:42 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 1C5922139C8 for ; Wed, 22 Jan 2025 15:46:40 +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=1737560800; cv=none; b=SUGb9R2f4lmNPYwUvrbcBWaUnsuRzJNTA4OCmPx9mMvYAx6QDelek4/GOWMXr9nEkSyWb6Mpo5R6CzTYorwFrBtVEpEAE/1rKWNzzqXM/9AA0Iz53mA9Ibyr4CGgf7DQLrjRnVMINxfUhPBe9Nb1h72e3dhtrUil9CcStU7BuH4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737560800; c=relaxed/simple; bh=g0gfo/yes3890ErorV/wcsHaHmbCCk1aBKfBKpAltNc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mrU9z3qh8rVqlKvyeNlalMrd9atCasAK55W0+LXZo5sA5TJG6hbv4P0VqZCcrMCcSPw1jwzWt8xUbu1wfuUnPixeoy8rPTNIG+C2hgeSJS46cNXH9JiSr0TvKKSlKKWRNLUR0exz7UEf4I1dAcS03n77kKJe70aQvfWjMQ+/aIM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eDvuiCnz; 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="eDvuiCnz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD3C4C4CED6; Wed, 22 Jan 2025 15:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737560799; bh=g0gfo/yes3890ErorV/wcsHaHmbCCk1aBKfBKpAltNc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eDvuiCnzALqUN3kUrQ0678xn9PlAkJ117ctXm+03QFQO3Op6yUrozOrDDMnlbDikZ jGdE4F2yEvs8PU1QIEz/bjo6XYB3zu2Q4mHu47EP3mSbj9gT5riPfMxxq07+GlkIZn h4SDct7EZSmFpTOIqyVtDEpRn/pwncwZWUD4X2X9nJGOajvVCMAv1bJxdXUI6nIlq+ 5+tMdimtM1Kb7Ft0gGxEj3+ApTs4Ond9/KfvdbFalGfx0/tAYRRUfFXQ6WVIL39Wu9 6CGHE4sCihONomqlV/DMtcGw+BmS5H0cvsCUppe3Qww2w1FEo+c/XM/63JP9WrhT3P JLHtfNG2KrShQ== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tacw9-00000008ogU-3cZ3; Wed, 22 Jan 2025 16:46:37 +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 , Ani Sinha , linux-kernel@vger.kernel.org Subject: [PATCH 04/11] acpi/generic_event_device: Update GHES migration to cover hest addr Date: Wed, 22 Jan 2025 16:46:21 +0100 Message-ID: <6b79da0dbd8d735e93c15c4673bf2af61e8c34a2.1737560101.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 at GED should now support HEST table location too. Signed-off-by: Mauro Carvalho Chehab --- 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