diff options
author | Peng Liang | 2020-11-12 03:06:38 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert | 2020-11-12 15:13:59 +0100 |
commit | 136fc6aa2cf38205fa3b47e155ebac11baccc789 (patch) | |
tree | 2fe33ce183195ef1a2522446e391a84137cabfcd /hw/acpi/generic_event_device.c | |
parent | migration/ram: Fix hexadecimal format string specifier (diff) | |
download | qemu-136fc6aa2cf38205fa3b47e155ebac11baccc789.tar.gz qemu-136fc6aa2cf38205fa3b47e155ebac11baccc789.tar.xz qemu-136fc6aa2cf38205fa3b47e155ebac11baccc789.zip |
ACPI: Avoid infinite recursion when dump-vmstate
There is a field with vmstate_ghes_state as vmsd in vmstate_ghes_state,
which will lead to infinite recursion in dump_vmstate_vmsd.
Fixes: a08a64627b ("ACPI: Record the Generic Error Status Block address")
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Peng Liang <liangpeng10@huawei.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20201112020638.874515-1-liangpeng10@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'hw/acpi/generic_event_device.c')
-rw-r--r-- | hw/acpi/generic_event_device.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c index 6df400e1ee..5454be67d5 100644 --- a/hw/acpi/generic_event_device.c +++ b/hw/acpi/generic_event_device.c @@ -322,6 +322,16 @@ static const VMStateDescription vmstate_ged_state = { } }; +static const VMStateDescription vmstate_ghes = { + .name = "acpi-ghes", + .version_id = 1, + .minimum_version_id = 1, + .fields = (VMStateField[]) { + VMSTATE_UINT64(ghes_addr_le, AcpiGhesState), + VMSTATE_END_OF_LIST() + }, +}; + static bool ghes_needed(void *opaque) { AcpiGedState *s = opaque; @@ -335,7 +345,7 @@ static const VMStateDescription vmstate_ghes_state = { .needed = ghes_needed, .fields = (VMStateField[]) { VMSTATE_STRUCT(ghes_state, AcpiGedState, 1, - vmstate_ghes_state, AcpiGhesState), + vmstate_ghes, AcpiGhesState), VMSTATE_END_OF_LIST() } }; |