OSDN Git Service

macfb: add VMStateDescription for MacfbNubusState and MacfbSysBusState
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sat, 5 Mar 2022 15:55:21 +0000 (15:55 +0000)
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Wed, 9 Mar 2022 09:29:10 +0000 (09:29 +0000)
commit580399c2775717ef8329f63ca1bdf26047147609
tree2bc0a033fe6ffbbf3bd3783139762ba84464335b
parenta4c7be3736b2bcfe6c716651c744bbcaf7ae15d9
macfb: add VMStateDescription for MacfbNubusState and MacfbSysBusState

Currently when QEMU tries to migrate the macfb framebuffer it crashes randomly
because the opaque provided by the DeviceClass vmsd property for both devices
is set to MacfbState rather than MacfbNubusState or MacfbSysBusState as
appropriate.

Resolve the issue by adding new VMStateDescriptions for MacfbNubusState and
MacfbSysBusState which embed the existing vmstate_macfb VMStateDescription
within them using VMSTATE_STRUCT.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20220305155530.9265-2-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
hw/display/macfb.c