The GHES migration logic at GED should now support HEST table
location too.
Increase migration version and change needed to check for both
ghes_addr_le and hest_addr_le.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
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 = {
}
};
+static const VMStateDescription vmstate_hest = {
+ .name = "acpi-hest",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .fields = (const VMStateField[]) {
+ VMSTATE_UINT64(hest_addr_le, AcpiGhesState),
+ VMSTATE_END_OF_LIST()
+ },
+};
+
+static bool hest_needed(void *opaque)
+{
+ AcpiGedState *s = opaque;
+ return s->ghes_state.hest_addr_le;
+}
+
+static const VMStateDescription vmstate_hest_state = {
+ .name = "acpi-ged/hest",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .needed = hest_needed,
+ .fields = (const VMStateField[]) {
+ VMSTATE_STRUCT(ghes_state, AcpiGedState, 1,
+ vmstate_hest, AcpiGhesState),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static const VMStateDescription vmstate_acpi_ged = {
.name = "acpi-ged",
.version_id = 1,
@@ -399,6 +427,7 @@ static const VMStateDescription vmstate_acpi_ged = {
&vmstate_memhp_state,
&vmstate_cpuhp_state,
&vmstate_ghes_state,
+ &vmstate_hest_state,
NULL
}
};
--
2.47.0
On Wed, 13 Nov 2024 09:37:02 +0100 Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote: > The GHES migration logic at GED should now support HEST table > location too. > > Increase migration version and change needed to check for both > ghes_addr_le and hest_addr_le. Where is the migration version increased? Maybe I'm misunderstanding the comment. > > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> > --- > 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 = { > } > }; > > +static const VMStateDescription vmstate_hest = { > + .name = "acpi-hest", > + .version_id = 1, > + .minimum_version_id = 1, > + .fields = (const VMStateField[]) { > + VMSTATE_UINT64(hest_addr_le, AcpiGhesState), > + VMSTATE_END_OF_LIST() > + }, > +}; > + > +static bool hest_needed(void *opaque) > +{ > + AcpiGedState *s = opaque; > + return s->ghes_state.hest_addr_le; > +} > + > +static const VMStateDescription vmstate_hest_state = { > + .name = "acpi-ged/hest", > + .version_id = 1, > + .minimum_version_id = 1, > + .needed = hest_needed, > + .fields = (const VMStateField[]) { > + VMSTATE_STRUCT(ghes_state, AcpiGedState, 1, > + vmstate_hest, AcpiGhesState), > + VMSTATE_END_OF_LIST() > + } > +}; > + > static const VMStateDescription vmstate_acpi_ged = { > .name = "acpi-ged", > .version_id = 1, > @@ -399,6 +427,7 @@ static const VMStateDescription vmstate_acpi_ged = { > &vmstate_memhp_state, > &vmstate_cpuhp_state, > &vmstate_ghes_state, > + &vmstate_hest_state, > NULL > } > };
Em Wed, 20 Nov 2024 15:01:19 +0000 Jonathan Cameron <Jonathan.Cameron@huawei.com> escreveu: > On Wed, 13 Nov 2024 09:37:02 +0100 > Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote: > > > The GHES migration logic at GED should now support HEST table > > location too. > > > > Increase migration version and change needed to check for both > > ghes_addr_le and hest_addr_le. > > Where is the migration version increased? Maybe I'm misunderstanding > the comment. Legacy comment. We dropped migration version increase, as this is not needed anymore. Comment dropped. > > > > > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> > > --- > > 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 = { > > } > > }; > > > > +static const VMStateDescription vmstate_hest = { > > + .name = "acpi-hest", > > + .version_id = 1, > > + .minimum_version_id = 1, > > + .fields = (const VMStateField[]) { > > + VMSTATE_UINT64(hest_addr_le, AcpiGhesState), > > + VMSTATE_END_OF_LIST() > > + }, > > +}; > > + > > +static bool hest_needed(void *opaque) > > +{ > > + AcpiGedState *s = opaque; > > + return s->ghes_state.hest_addr_le; > > +} > > + > > +static const VMStateDescription vmstate_hest_state = { > > + .name = "acpi-ged/hest", > > + .version_id = 1, > > + .minimum_version_id = 1, > > + .needed = hest_needed, > > + .fields = (const VMStateField[]) { > > + VMSTATE_STRUCT(ghes_state, AcpiGedState, 1, > > + vmstate_hest, AcpiGhesState), > > + VMSTATE_END_OF_LIST() > > + } > > +}; > > + > > static const VMStateDescription vmstate_acpi_ged = { > > .name = "acpi-ged", > > .version_id = 1, > > @@ -399,6 +427,7 @@ static const VMStateDescription vmstate_acpi_ged = { > > &vmstate_memhp_state, > > &vmstate_cpuhp_state, > > &vmstate_ghes_state, > > + &vmstate_hest_state, > > NULL > > } > > }; > Thanks, Mauro
© 2016 - 2024 Red Hat, Inc.