All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Pavel Dovgalyuk <dovgaluk@ispras.ru>
Cc: 'Pavel Dovgalyuk' <Pavel.Dovgaluk@ispras.ru>,
	qemu-devel@nongnu.org, mst@redhat.com, dgilbert@redhat.com,
	maria.klimushenkova@ispras.ru, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] hpet: recover timer offset correctly
Date: Wed, 10 Jan 2018 10:50:58 +0100	[thread overview]
Message-ID: <87d12iyrct.fsf@secure.laptop> (raw)
In-Reply-To: <001601d389f6$0816d2f0$184478d0$@ru> (Pavel Dovgalyuk's message of "Wed, 10 Jan 2018 12:33:11 +0300")

"Pavel Dovgalyuk" <dovgaluk@ispras.ru> wrote:
>> From: Juan Quintela [mailto:quintela@redhat.com]
>> "Pavel Dovgalyuk" <dovgaluk@ispras.ru> wrote:
>> >> From: Juan Quintela [mailto:quintela@redhat.com]
>> If you *don't* use a needed function then please just increase the
>> version.  You are just breaking compatibility anyways.  The whole point
>> of subsections is that they are optional.  If they are mandatory (this
>> case), then they bring no advantage at all.
>
> Thanks, I thought that the sections are skipped automatically when
> there is no code for loading
> them.
>
>> What dave is asked for your previous version is that you disable the
>> section for old machine types.  Look at how to use DEFINE_PROP_* for
>> this use case.
>
> How do you like this one?

Much better, thanks.

> +static bool hpet_offset_needed(void *opaque)
> +{
> +    HPETState *s = opaque;
> +
> +    return s->hpet_offset_saved;
> +}
> +

If this is only one optimization, this test is ok.  If it makes things
go worse, you can add something there like && hpet_enabled() or
whatever.  Remember that I don't understand HPET.


> diff --git a/include/hw/compat.h b/include/hw/compat.h
> index 263de97..8897302 100644
> --- a/include/hw/compat.h
> +++ b/include/hw/compat.h
> @@ -13,6 +13,10 @@
>          .driver   = "virtio-tablet-device",\
>          .property = "wheel-axis",\
>          .value    = "false",\
> +    },{\
> +        .driver   = "hpet",\
> +        .property = "hpet-offset-saved",\
> +        .value    = "off",\
>      },
>  
>  #define HW_COMPAT_2_9 \

This should be on 2_11 not 2_10 O:-)

But for the vmstate bits:

Reviewed-by: Juan Quintela <quintela@redhat.com>

  reply	other threads:[~2018-01-10  9:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20 10:02 [Qemu-devel] [PATCH v2] hpet: recover timer offset correctly Pavel Dovgalyuk
2018-01-09  8:23 ` Pavel Dovgalyuk
2018-01-09 11:26   ` Juan Quintela
2018-01-09 11:52     ` Pavel Dovgalyuk
2018-01-09 13:08       ` Juan Quintela
2018-01-10  9:33         ` Pavel Dovgalyuk
2018-01-10  9:50           ` Juan Quintela [this message]
2018-01-10 10:10             ` Pavel Dovgalyuk

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=87d12iyrct.fsf@secure.laptop \
    --to=quintela@redhat.com \
    --cc=Pavel.Dovgaluk@ispras.ru \
    --cc=dgilbert@redhat.com \
    --cc=dovgaluk@ispras.ru \
    --cc=maria.klimushenkova@ispras.ru \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --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.