Re: [PATCH 3/3] ps2: migration support for command reply queue

2021-08-10 Thread Volker Rümelin
Hi, this part actually works. .needed is only evaluated on the sending side. For the receiving side subsections are optional. Migration doesn't fail if a subsection isn't loaded. Before I sent this patch series one of the migration tests was a migration from 6.0.92 to 6.0.92 with one byte in

Re: [PATCH 3/3] ps2: migration support for command reply queue

2021-08-09 Thread Gerd Hoffmann
Hi, > this part actually works. .needed is only evaluated on the sending side. For > the receiving side subsections are optional. Migration doesn't fail if a > subsection isn't loaded. Before I sent this patch series one of the > migration tests was a migration from 6.0.92 to 6.0.92 with one by

Re: [PATCH 3/3] ps2: migration support for command reply queue

2021-08-09 Thread Volker Rümelin
Hi, +static bool ps2_keyboard_cqueue_needed(void *opaque) +{ +PS2KbdState *s = opaque; + +return s->common.queue.cwptr != -1; /* the queue is mostly empty */ +} + +static const VMStateDescription vmstate_ps2_keyboard_cqueue = { +.name = "ps2kbd/command_reply_queue", +.needed =

Re: [PATCH 3/3] ps2: migration support for command reply queue

2021-08-09 Thread Gerd Hoffmann
Hi, > +static bool ps2_keyboard_cqueue_needed(void *opaque) > +{ > +PS2KbdState *s = opaque; > + > +return s->common.queue.cwptr != -1; /* the queue is mostly empty */ > +} > + > +static const VMStateDescription vmstate_ps2_keyboard_cqueue = { > +.name = "ps2kbd/command_reply_queue",

[PATCH 3/3] ps2: migration support for command reply queue

2021-08-07 Thread Volker Rümelin
Add migration support for the PS/2 keyboard command reply queue. Signed-off-by: Volker Rümelin --- hw/input/ps2.c | 40 ++-- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index 8c06fd7fb4..9376a8f4ce 100644 ---