[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/4] vmstate: accept QEMUTimer in VMSTATE_TIMER*
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] vmstate: accept QEMUTimer in VMSTATE_TIMER*, add VMSTATE_TIMER_PTR* |
Date: |
Thu, 15 Jan 2015 10:14:54 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 15/01/2015 10:04, Amit Shah wrote:
>
>> > diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
>> > index e45fc49..55ba584 100644
>> > --- a/include/migration/vmstate.h
>> > +++ b/include/migration/vmstate.h
>> > @@ -642,17 +642,29 @@ extern const VMStateInfo vmstate_info_bitmap;
>> > #define VMSTATE_FLOAT64(_f, _s) \
>> > VMSTATE_FLOAT64_V(_f, _s, 0)
>> >
>> > -#define VMSTATE_TIMER_TEST(_f, _s, _test) \
>> > +#define VMSTATE_TIMER_PTR_TEST(_f, _s, _test)
>> > \
>> > VMSTATE_POINTER_TEST(_f, _s, _test, vmstate_info_timer, QEMUTimer *)
>> >
>> > -#define VMSTATE_TIMER_V(_f, _s, _v) \
>> > +#define VMSTATE_TIMER_PTR_V(_f, _s, _v)
>> > \
>> > VMSTATE_POINTER(_f, _s, _v, vmstate_info_timer, QEMUTimer *)
>> >
>> > +#define VMSTATE_TIMER_PTR(_f, _s)
>> > \
>> > + VMSTATE_TIMER_PTR_V(_f, _s, 0)
>> > +
>> > +#define VMSTATE_TIMER_PTR_ARRAY(_f, _s, _n) \
>> > + VMSTATE_ARRAY_OF_POINTER(_f, _s, _n, 0, vmstate_info_timer, QEMUTimer
>> > *)
>> > +
>> > +#define VMSTATE_TIMER_TEST(_f, _s, _test) \
>> > + VMSTATE_SINGLE_TEST(_f, _s, _test, 0, vmstate_info_timer, QEMUTimer)
>> > +
>> > +#define VMSTATE_TIMER_V(_f, _s, _v) \
>> > + VMSTATE_SINGLE(_f, _s, _v, vmstate_info_timer, QEMUTimer)
>> > +
>> > #define VMSTATE_TIMER(_f, _s) \
>> > VMSTATE_TIMER_V(_f, _s, 0)
> Why leave this around?
Because further changes down the line will convert QEMUTimer* to
QEMUTimer and thus go back to VMSTATE_TIMER. Having both around avoids
having a single patch with -1000/+1000 diffstat.
Paolo
- [Qemu-devel] [PATCH 0/4] qemu-timer: introduce usable pointer-free API, Paolo Bonzini, 2015/01/08
- [Qemu-devel] [PATCH 4/4] vmstate: accept QEMUTimer in VMSTATE_TIMER*, add VMSTATE_TIMER_PTR*, Paolo Bonzini, 2015/01/08
- [Qemu-devel] [PATCH 1/4] qemu-timer: rename timer_init to timer_init_tl, Paolo Bonzini, 2015/01/08
- [Qemu-devel] [PATCH 2/4] qemu-timer: add timer_init and timer_init_ns/us/ms, Paolo Bonzini, 2015/01/08
- [Qemu-devel] [PATCH 3/4] qemu-timer: introduce timer_deinit, Paolo Bonzini, 2015/01/08
- Re: [Qemu-devel] [PATCH 0/4] qemu-timer: introduce usable pointer-free API, Fam Zheng, 2015/01/08