From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui62e-0001hc-G6 for qemu-devel@nongnu.org; Thu, 30 May 2013 12:49:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ui62W-0001OU-CT for qemu-devel@nongnu.org; Thu, 30 May 2013 12:49:32 -0400 Received: from e9.ny.us.ibm.com ([32.97.182.139]:60751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui62W-0001OQ-6t for qemu-devel@nongnu.org; Thu, 30 May 2013 12:49:24 -0400 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 May 2013 12:49:23 -0400 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 11FA9C90050 for ; Thu, 30 May 2013 12:49:21 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r4UGnL1e320780 for ; Thu, 30 May 2013 12:49:21 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r4UGnKhO018140 for ; Thu, 30 May 2013 13:49:21 -0300 From: Anthony Liguori In-Reply-To: <1369239012-8180-3-git-send-email-akong@redhat.com> References: <1369239012-8180-1-git-send-email-akong@redhat.com> <1369239012-8180-3-git-send-email-akong@redhat.com> Date: Thu, 30 May 2013 11:49:18 -0500 Message-ID: <87k3mgct0x.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH v2 2/2] ps2: preserve repeat state on migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, lersek@redhat.com, lilei@linux.vnet.ibm.com, kraxel@redhat.com Amos Kong writes: > Use a subsection to migrate repeat state (repate period and first > delay). > > Signed-off-by: Amos Kong Ah, You should fold this into 1/2. Otherwise you break migration during bisecting. Regards, Anthony Liguori > --- > hw/input/ps2.c | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/hw/input/ps2.c b/hw/input/ps2.c > index 8adbb4a..cdb18e6 100644 > --- a/hw/input/ps2.c > +++ b/hw/input/ps2.c > @@ -611,6 +611,13 @@ static const VMStateDescription vmstate_ps2_common = { > } > }; > > +static bool ps2_keyboard_repeatstate_needed(void *opaque) > +{ > + PS2KbdState *s = opaque; > + > + return s->repeat_period || s->repeat_delay; > +} > + > static bool ps2_keyboard_ledstate_needed(void *opaque) > { > PS2KbdState *s = opaque; > @@ -626,6 +633,18 @@ static int ps2_kbd_ledstate_post_load(void *opaque, int version_id) > return 0; > } > > +static const VMStateDescription vmstate_ps2_keyboard_repeatstate = { > + .name = "ps2kbd/repeatstate", > + .version_id = 3, > + .minimum_version_id = 2, > + .minimum_version_id_old = 2, > + .fields = (VMStateField[]) { > + VMSTATE_INT32(repeat_period, PS2KbdState), > + VMSTATE_INT32(repeat_delay, PS2KbdState), > + VMSTATE_END_OF_LIST() > + } > +}; > + > static const VMStateDescription vmstate_ps2_keyboard_ledstate = { > .name = "ps2kbd/ledstate", > .version_id = 3, > @@ -665,6 +684,9 @@ static const VMStateDescription vmstate_ps2_keyboard = { > .vmsd = &vmstate_ps2_keyboard_ledstate, > .needed = ps2_keyboard_ledstate_needed, > }, { > + .vmsd = &vmstate_ps2_keyboard_repeatstate, > + .needed = ps2_keyboard_repeatstate_needed, > + }, { > /* empty */ > } > } > -- > 1.8.1.4