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",