All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Amos Kong <akong@redhat.com>
Cc: peter.maydell@linaro.org, Anthony Liguori <aliguori@us.ibm.com>,
	lilei@linux.vnet.ibm.com, qemu-devel@nongnu.org,
	kraxel@redhat.com, lersek@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/2] ps2: add support of auto-repeat
Date: Thu, 13 Jun 2013 12:19:29 +0200	[thread overview]
Message-ID: <51B99CB1.6020006@suse.de> (raw)
In-Reply-To: <20130531123117.GA8400@t430s.nay.redhat.com>

Am 31.05.2013 14:31, schrieb Amos Kong:
> diff --git a/hw/input/ps2.c b/hw/input/ps2.c
> index cdb18e6..fdb9912 100644
> --- a/hw/input/ps2.c
> +++ b/hw/input/ps2.c
> @@ -615,7 +615,17 @@ static bool ps2_keyboard_repeatstate_needed(void
> *opaque)
>  {
>      PS2KbdState *s = opaque;
>  
> -    return s->repeat_period || s->repeat_delay;
> +    return s->repeat_period || s->repeat_delay || s->repeat_key ||
> s->repeat_timer;
> +}
> +
> +static int ps2_kbd_repeatstate_load(QEMUFile *f, void *opaque, int
> version_id)
> +{
> +    PS2KbdState *s = opaque;
> +    qemu_get_timer(f, s->repeat_timer);
> +    qemu_mod_timer(s->repeat_timer, qemu_get_clock_ns(vm_clock) +
> +                   muldiv64(get_ticks_per_sec(), s->repeat_period,
> 1000));
> +
> +    return 0;
>  }
>  
>  static bool ps2_keyboard_ledstate_needed(void *opaque)
> @@ -638,9 +648,12 @@ static const VMStateDescription
> vmstate_ps2_keyboard_repeatstate = {
>      .version_id = 3,
>      .minimum_version_id = 2,
>      .minimum_version_id_old = 2,
> +    .load_state_old = ps2_kbd_repeatstate_load,
>      .fields      = (VMStateField[]) {
>          VMSTATE_INT32(repeat_period, PS2KbdState),
>          VMSTATE_INT32(repeat_delay, PS2KbdState),
> +        VMSTATE_INT32(repeat_key, PS2KbdState),
> +        VMSTATE_TIMER(repeat_timer, PS2KbdState),

You can't just add fields here, they'd need to be specific to a new
version 4. Requested was to make it a subsection instead.

Andreas

>          VMSTATE_END_OF_LIST()
>      }
>  };
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  parent reply	other threads:[~2013-06-13 10:19 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 [this message]
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

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=51B99CB1.6020006@suse.de \
    --to=afaerber@suse.de \
    --cc=akong@redhat.com \
    --cc=aliguori@us.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.