From nobody Mon Apr 7 01:09: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 1F74D22A4D2 for ; Mon, 13 Jan 2025 13:08: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=1736773739; cv=none; b=b2HTg2GJ662BqI8ZcrRUKsrMah0uTgjZv0Jdim6bVnv4xIF34ygVghy0Na1drB/848JRK1d0f6ftw7KNVXcr6vNszMPPa4SThiLpdewCXURi0EHVa4Zh+kiwMuJ5ZFEUQp7Oxy5kufVBDMyYio7dY4Cz5d2d2dbGETgc5i4GiuE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736773739; c=relaxed/simple; bh=GgETsGrAdEp9quugVeJqfW0eXtpodBaT9e9TG7kSTvI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K3vXxU6S5j5w20XFv2SXeEIC8mtqnx7ONoCuSrUcrfUx/sTKU6+aW74Jcav752SOW05qBlgc8Q3dthQ84yivUwDUNp1wPKR/4GauZrWWoGC7EO4+RS76q7tTPkg0CNsEzu4vIVI/dm3GAfBInCNp+nWWtNOjqeGrdKyShdNpzeI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=h3GjqS7W; 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="h3GjqS7W" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA734C4AF0B; Mon, 13 Jan 2025 13:08:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736773738; bh=GgETsGrAdEp9quugVeJqfW0eXtpodBaT9e9TG7kSTvI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h3GjqS7WRMnpAt1UlZ8kDGv4p1RWvhn7OmyruPcf4E5Df8/1vBoXUyZmXXdkuDjk0 IBGr4nkDn8bw+gokvFAr8rbM2bhjGL75T61SaEQAhx/18rnhT70lvX3V8/G/I4EqPS wuiUgkcUmuTS2M4hcSHu6CGLJ78oD0QGiZPCF9qtRzfWpDaYy0lIB1wq4nGkSSmr8y TFPTF7ngh7NoCWUjj9/Xeg3bPZiHLEyOb/lrvsF9Ha4pEeKspR1YhgjG+eEQJYUuKW zwiUFijLdqqR2DafDfFMrcEofwd2NolV+pVCGDp399m32EkNHFfUpbHkQzD2SQGpwy dfpmFKK95FoCQ== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tXKBc-00000003Yn5-3dM1; Mon, 13 Jan 2025 14:08:56 +0100 From: Mauro Carvalho Chehab To: Igor Mammedov , "Michael S . Tsirkin" Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ani Sinha , Dongjiu Geng , Eduardo Habkost , Marcel Apfelbaum , Peter Maydell , Shannon Zhao , Yanan Wang , Zhao Liu , linux-kernel@vger.kernel.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org, Mauro Carvalho Chehab Subject: [PATCH v4 4/5] acpi/generic_event_device: Update GHES migration to cover hest addr Date: Mon, 13 Jan 2025 14:08:50 +0100 Message-ID: <20250113130854.848688-5-mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250113130854.848688-1-mchehab+huawei@kernel.org> References: <20250113130854.848688-1-mchehab+huawei@kernel.org> 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.47.1