From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org
Cc: "Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PULL 09/18] g364fb: add VMStateDescription for G364SysBusState
Date: Fri, 2 Jul 2021 15:35:48 +0200 [thread overview]
Message-ID: <20210702133557.60317-10-f4bug@amsat.org> (raw)
In-Reply-To: <20210702133557.60317-1-f4bug@amsat.org>
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Currently when QEMU attempts to migrate the MIPS magnum machine it crashes due
to a mistake in the g364fb VMStateDescription configuration which expects a
G364SysBusState and not a G364State.
Resolve the issue by adding a new VMStateDescription for G364SysBusState and
embedding the existing vmstate_g364fb VMStateDescription inside it using
VMSTATE_STRUCT.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fixes: 97a3f6ffbba ("g364fb: convert to qdev")
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210625163554.14879-3-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/display/g364fb.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/hw/display/g364fb.c b/hw/display/g364fb.c
index 87effbf2b0f..caca86d7738 100644
--- a/hw/display/g364fb.c
+++ b/hw/display/g364fb.c
@@ -517,6 +517,16 @@ static Property g364fb_sysbus_properties[] = {
DEFINE_PROP_END_OF_LIST(),
};
+static const VMStateDescription vmstate_g364fb_sysbus = {
+ .name = "g364fb-sysbus",
+ .version_id = 2,
+ .minimum_version_id = 2,
+ .fields = (VMStateField[]) {
+ VMSTATE_STRUCT(g364, G364SysBusState, 2, vmstate_g364fb, G364State),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static void g364fb_sysbus_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -525,7 +535,7 @@ static void g364fb_sysbus_class_init(ObjectClass *klass, void *data)
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->desc = "G364 framebuffer";
dc->reset = g364fb_sysbus_reset;
- dc->vmsd = &vmstate_g364fb;
+ dc->vmsd = &vmstate_g364fb_sysbus;
device_class_set_props(dc, g364fb_sysbus_properties);
}
--
2.31.1
next prev parent reply other threads:[~2021-07-02 13:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-02 13:35 [PULL 00/18] MIPS patches for 2021-07-02 Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 01/18] target/mips: Add declarations for generic TCG helpers Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 02/18] target/mips: Extract Code Compaction ASE translation routines Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 03/18] target/mips: Extract the microMIPS ISA " Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 04/18] target/mips: Extract nanoMIPS " Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 05/18] hw/pci-host/bonito: Trace PCI config accesses smaller than 32-bit Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 06/18] hw/pci-host/bonito: Allow " Philippe Mathieu-Daudé
2021-07-02 15:29 ` BALATON Zoltan
2021-07-02 13:35 ` [PULL 07/18] tests/acceptance: Test Linux on the Fuloong 2E machine Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 08/18] g364fb: use RAM memory region for framebuffer Philippe Mathieu-Daudé
2021-07-02 13:35 ` Philippe Mathieu-Daudé [this message]
2021-07-02 13:35 ` [PULL 10/18] dp8393x: checkpatch fixes Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 11/18] dp8393x: convert to trace-events Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 12/18] hw/mips/jazz: move PROM and checksum calculation from dp8393x device to board Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 13/18] hw/m68k/q800: " Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 14/18] dp8393x: remove onboard PROM containing MAC address and checksum Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 15/18] qemu/bitops.h: add bitrev8 implementation Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 16/18] hw/m68k/q800: fix PROM checksum and MAC address storage Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 17/18] hw/mips/jazz: specify correct endian for dp8393x device Philippe Mathieu-Daudé
2021-07-02 13:35 ` [PULL 18/18] hw/mips/jazz: Map the UART devices unconditionally Philippe Mathieu-Daudé
2021-07-04 15:02 ` [PULL 00/18] MIPS patches for 2021-07-02 Peter Maydell
2021-07-04 15:24 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210702133557.60317-10-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).