From: Peter Maydell <peter.maydell@linaro.org>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: richard.henderson@linaro.org, deller@gmx.de,
svens@stackframe.org, mst@redhat.com, pbonzini@redhat.com,
hpoussin@reactos.org, aleksandar.rikalo@syrmia.com,
f4bug@amsat.org, qemu-devel@nongnu.org, qemu-arm@nongnu.org
Subject: Re: [PATCH 34/40] lasips2: update VMStateDescription for LASIPS2 device
Date: Tue, 5 Jul 2022 09:18:21 +0100 [thread overview]
Message-ID: <CAFEAcA-uTpGWoRqDOwW+W8gifbGrywt-ofY31RiiCvwEb0Yo+w@mail.gmail.com> (raw)
In-Reply-To: <becf7d89-3d40-b40a-aeeb-9d99c79ef7a0@ilande.co.uk>
On Tue, 5 Jul 2022 at 07:48, Mark Cave-Ayland
<mark.cave-ayland@ilande.co.uk> wrote:
>
> On 04/07/2022 14:38, Peter Maydell wrote:
>
> > On Wed, 29 Jun 2022 at 13:41, Mark Cave-Ayland
> > <mark.cave-ayland@ilande.co.uk> wrote:
> >>
> >> Since this series has already introduced a migration break for the HPPA B160L
> >> machine, we can use this opportunity to improve the VMStateDescription for
> >> the LASIPS2 device.
> >>
> >> Add the new int_status field to the VMStateDescription and remodel the ports
> >> as separate VMSTATE_STRUCT instances.
> >>
> >> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> >> ---
> >> hw/input/lasips2.c | 25 +++++++++++++++++++------
> >> 1 file changed, 19 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c
> >> index e602e3c986..ea7c07a2ba 100644
> >> --- a/hw/input/lasips2.c
> >> +++ b/hw/input/lasips2.c
> >> @@ -35,15 +35,28 @@
> >> #include "qapi/error.h"
> >>
> >>
> >> +static const VMStateDescription vmstate_lasips2_port = {
> >> + .name = "lasips2-port",
> >> + .version_id = 1,
> >> + .minimum_version_id = 1,
> >> + .fields = (VMStateField[]) {
> >> + VMSTATE_UINT8(control, LASIPS2Port),
> >> + VMSTATE_UINT8(buf, LASIPS2Port),
> >> + VMSTATE_BOOL(loopback_rbne, LASIPS2Port),
> >> + VMSTATE_END_OF_LIST()
> >> + }
> >> +};
> >> +
> >> static const VMStateDescription vmstate_lasips2 = {
> >> .name = "lasips2",
> >> - .version_id = 0,
> >> - .minimum_version_id = 0,
> >> + .version_id = 1,
> >> + .minimum_version_id = 1,
> >> .fields = (VMStateField[]) {
> >> - VMSTATE_UINT8(kbd_port.parent_obj.control, LASIPS2State),
> >> - VMSTATE_UINT8(kbd_port.parent_obj.id, LASIPS2State),
> >> - VMSTATE_UINT8(mouse_port.parent_obj.control, LASIPS2State),
> >> - VMSTATE_UINT8(mouse_port.parent_obj.id, LASIPS2State),
> >> + VMSTATE_UINT8(int_status, LASIPS2State),
> >> + VMSTATE_STRUCT(kbd_port.parent_obj, LASIPS2State, 1,
> >> + vmstate_lasips2_port, LASIPS2Port),
> >> + VMSTATE_STRUCT(mouse_port.parent_obj, LASIPS2State, 1,
> >> + vmstate_lasips2_port, LASIPS2Port),
> >> VMSTATE_END_OF_LIST()
> >> }
> >> };
> >
> > The set of things we were migrating and the set of
> > things we now migrate don't seem to line up ?
>
> Yeah I should probably have documented this better in the commit message. The
> existing VMStateDescription isn't correct since it misses both the buf and
> loopback_rbne fields which are accessed across port reads and writes, and the port id
> is not required because it is hardcoded to 0 for the keyboard port and 1 for the
> mouse port.
>
> Rather than have the extra code churn throughout the series, I went for doing the
> minimum to vmstate_lasips2 to make the patch compile and then fix up everything
> (including add the new int_status bitmap) in this one patch. I think this is fine
> since as we're introducing a migration break in the series, there are no concerns
> over backward compatibility.
>
> Would an updated description for this commit message be sufficient? A quick skim over
> the emails indicates that the only queries during review were related to the handling
> of the VMStateDescription.
Yeah, if you comment this in the relevant commit messages that should be
good enough.
-- PMM
next prev parent reply other threads:[~2022-07-05 8:34 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-29 12:39 [PATCH 00/40] PS2 device QOMification - part 2 Mark Cave-Ayland
2022-06-29 12:39 ` [PATCH 01/40] pl050: move PL050State from pl050.c to new pl050.h header file Mark Cave-Ayland
2022-07-04 13:12 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 02/40] pl050: rename pl050_keyboard_init() to pl050_kbd_init() Mark Cave-Ayland
2022-07-04 13:12 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 03/40] pl050: change PL050State dev pointer from void to PS2State Mark Cave-Ayland
2022-07-04 13:14 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 04/40] pl050: introduce new PL050_KBD_DEVICE QOM type Mark Cave-Ayland
2022-07-04 13:15 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 05/40] pl050: introduce new PL050_MOUSE_DEVICE " Mark Cave-Ayland
2022-07-04 13:15 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 06/40] pl050: move logic from pl050_realize() to pl050_init() Mark Cave-Ayland
2022-07-04 13:16 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 07/40] pl050: introduce PL050DeviceClass for the PL050 device Mark Cave-Ayland
2022-07-04 13:17 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 08/40] pl050: introduce pl050_kbd_class_init() and pl050_kbd_realize() Mark Cave-Ayland
2022-07-04 13:17 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 09/40] pl050: introduce pl050_mouse_class_init() and pl050_mouse_realize() Mark Cave-Ayland
2022-07-04 13:18 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 10/40] pl050: don't use legacy ps2_kbd_init() function Mark Cave-Ayland
2022-07-04 13:20 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 11/40] pl050: don't use legacy ps2_mouse_init() function Mark Cave-Ayland
2022-07-04 13:20 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 12/40] lasips2: don't use vmstate_register() in lasips2_realize() Mark Cave-Ayland
2022-07-04 13:20 ` Peter Maydell
2022-06-29 12:39 ` [PATCH 13/40] lasips2: remove the qdev base property and the lasips2_properties array Mark Cave-Ayland
2022-07-04 13:21 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 14/40] lasips2: remove legacy lasips2_initfn() function Mark Cave-Ayland
2022-07-04 13:22 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 15/40] lasips2: change LASIPS2State dev pointer from void to PS2State Mark Cave-Ayland
2022-07-04 13:22 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 16/40] lasips2: QOMify LASIPS2Port Mark Cave-Ayland
2022-07-04 13:23 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 17/40] lasips2: introduce new LASIPS2_KBD_PORT QOM type Mark Cave-Ayland
2022-07-04 13:22 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 18/40] lasips2: introduce new LASIPS2_MOUSE_PORT " Mark Cave-Ayland
2022-07-04 13:23 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 19/40] lasips2: move keyboard port initialisation to new lasips2_kbd_port_init() function Mark Cave-Ayland
2022-07-04 13:24 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 20/40] lasips2: move mouse port initialisation to new lasips2_mouse_port_init() function Mark Cave-Ayland
2022-07-04 13:25 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 21/40] lasips2: introduce lasips2_kbd_port_class_init() and lasips2_kbd_port_realize() Mark Cave-Ayland
2022-07-04 13:25 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 22/40] lasips2: introduce lasips2_mouse_port_class_init() and lasips2_mouse_port_realize() Mark Cave-Ayland
2022-07-04 13:25 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 23/40] lasips2: rename LASIPS2Port irq field to birq Mark Cave-Ayland
2022-07-04 13:25 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 24/40] lasips2: introduce port IRQ and new lasips2_port_init() function Mark Cave-Ayland
2022-07-04 13:26 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 25/40] lasips2: introduce LASIPS2PortDeviceClass for the LASIPS2_PORT device Mark Cave-Ayland
2022-07-04 13:26 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 26/40] lasips2: add named input gpio to port for downstream PS2 device IRQ Mark Cave-Ayland
2022-07-04 13:27 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 27/40] lasips2: add named input gpio to handle incoming port IRQs Mark Cave-Ayland
2022-07-04 13:27 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 28/40] lasips2: switch to using port-based IRQs Mark Cave-Ayland
2022-07-04 13:28 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 29/40] lasips2: rename LASIPS2Port parent pointer to lasips2 Mark Cave-Ayland
2022-07-04 13:28 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 30/40] lasips2: standardise on lp name for LASIPS2Port variables Mark Cave-Ayland
2022-07-04 13:29 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 31/40] lasips2: switch register memory region to DEVICE_BIG_ENDIAN Mark Cave-Ayland
2022-07-04 13:29 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 32/40] lasips2: don't use legacy ps2_kbd_init() function Mark Cave-Ayland
2022-07-04 13:29 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 33/40] lasips2: don't use legacy ps2_mouse_init() function Mark Cave-Ayland
2022-07-04 13:30 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 34/40] lasips2: update VMStateDescription for LASIPS2 device Mark Cave-Ayland
2022-07-04 13:38 ` Peter Maydell
2022-07-05 6:48 ` Mark Cave-Ayland
2022-07-05 8:18 ` Peter Maydell [this message]
2022-06-29 12:40 ` [PATCH 35/40] pckbd: introduce new vmstate_kbd_mmio VMStateDescription for the I8042_MMIO device Mark Cave-Ayland
2022-07-04 13:35 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 36/40] pckbd: don't use legacy ps2_kbd_init() function Mark Cave-Ayland
2022-07-04 13:36 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 37/40] ps2: remove unused " Mark Cave-Ayland
2022-07-04 13:37 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 38/40] pckbd: don't use legacy ps2_mouse_init() function Mark Cave-Ayland
2022-07-04 13:37 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 39/40] ps2: remove unused " Mark Cave-Ayland
2022-07-04 13:37 ` Peter Maydell
2022-06-29 12:40 ` [PATCH 40/40] pckbd: remove legacy i8042_mm_init() function Mark Cave-Ayland
2022-07-04 13:38 ` Peter Maydell
2022-07-01 19:37 ` [PATCH 00/40] PS2 device QOMification - part 2 Helge Deller
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=CAFEAcA-uTpGWoRqDOwW+W8gifbGrywt-ofY31RiiCvwEb0Yo+w@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=aleksandar.rikalo@syrmia.com \
--cc=deller@gmx.de \
--cc=f4bug@amsat.org \
--cc=hpoussin@reactos.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=svens@stackframe.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).