qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Amos Kong <akong@redhat.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, lersek@redhat.com,
	lilei@linux.vnet.ibm.com, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 2/2] ps2: preserve repeat state on migration
Date: Thu, 30 May 2013 11:49:18 -0500	[thread overview]
Message-ID: <87k3mgct0x.fsf@codemonkey.ws> (raw)
In-Reply-To: <1369239012-8180-3-git-send-email-akong@redhat.com>

Amos Kong <akong@redhat.com> writes:

> Use a subsection to migrate repeat state (repate period and first
> delay).
>
> Signed-off-by: Amos Kong <akong@redhat.com>

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

      reply	other threads:[~2013-05-30 16:49 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22 16:10 [Qemu-devel] [PATCH v2 0/2] ps2 auto-repeat Amos Kong
2013-05-22 16:10 ` [Qemu-devel] [PATCH v2 1/2] ps2: add support of auto-repeat Amos Kong
2013-05-30 16:48   ` Anthony Liguori
2013-05-31 12:31     ` Amos Kong
2013-06-13 10:04       ` Amos Kong
2013-06-13 12:01         ` Anthony Liguori
2013-06-13 10:19       ` Andreas Färber
2013-06-13 12:34         ` Paolo Bonzini
2013-06-13 13:01           ` Anthony Liguori
2013-06-13 14:47             ` Paolo Bonzini
2013-06-13 18:28               ` Anthony Liguori
2013-06-14  3:45                 ` Amos Kong
2013-06-14  5:46       ` Amos Kong
2013-06-17 13:01         ` Luiz Capitulino
2013-06-26 11:56           ` Markus Armbruster
2013-07-02  6:49             ` Amos Kong
2013-07-23 12:43               ` Gerd Hoffmann
2013-05-22 16:10 ` [Qemu-devel] [PATCH v2 2/2] ps2: preserve repeat state on migration Amos Kong
2013-05-30 16:49   ` Anthony Liguori [this message]

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=87k3mgct0x.fsf@codemonkey.ws \
    --to=aliguori@us.ibm.com \
    --cc=akong@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=lilei@linux.vnet.ibm.com \
    --cc=peter.maydell@linaro.org \
    --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).