From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrLLb-0002Zb-59 for qemu-devel@nongnu.org; Fri, 13 Dec 2013 00:31:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrLLW-0005Du-V2 for qemu-devel@nongnu.org; Fri, 13 Dec 2013 00:31:35 -0500 Received: from [222.73.24.84] (port=27539 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrLLW-0005Do-Js for qemu-devel@nongnu.org; Fri, 13 Dec 2013 00:31:30 -0500 Message-ID: <52AA9B44.9010506@cn.fujitsu.com> Date: Fri, 13 Dec 2013 13:29:40 +0800 From: Li Guang MIME-Version: 1.0 References: <1386897551-27881-1-git-send-email-lig.fnst@cn.fujitsu.com> <1386897551-27881-2-git-send-email-lig.fnst@cn.fujitsu.com> In-Reply-To: Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed Subject: Re: [Qemu-devel] [PATCH v12 1/5] vmstate: Add support for an array of ptimer_state * List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Peter Maydell , QEMU Developers , =?ISO-8859-1?Q?Andreas_F=E4rb?= =?ISO-8859-1?Q?er?= , Juan Quintela Peter Crosthwaite wrote: > On Fri, Dec 13, 2013 at 11:19 AM, liguang wrote: > >> From: Peter Maydell >> >> Add support for defining a vmstate field which is an array >> of pointers to structures, and use this to define a >> VMSTATE_PTIMER_ARRAY() which allows an array of ptimer_state* >> to be used by devices. >> >> Signed-off-by: Peter Maydell >> > If you are intending someones else patch for merge as part of your own > series, you should sign it off yourself. Considering it's only one > patch, you probably can just do this on list (just like a review) > rather than a respin. > > Ok, here's a Signed-off-by: liguang Thanks! > Regards, > Peter > > >> --- >> include/hw/ptimer.h | 4 ++++ >> include/migration/vmstate.h | 10 ++++++++++ >> 2 files changed, 14 insertions(+), 0 deletions(-) >> >> diff --git a/include/hw/ptimer.h b/include/hw/ptimer.h >> index 28fcaf1..a33edf4 100644 >> --- a/include/hw/ptimer.h >> +++ b/include/hw/ptimer.h >> @@ -36,4 +36,8 @@ extern const VMStateDescription vmstate_ptimer; >> .offset = vmstate_offset_pointer(_state, _field, ptimer_state), \ >> } >> >> +#define VMSTATE_PTIMER_ARRAY(_f, _s, _n) \ >> + VMSTATE_ARRAY_OF_POINTER_TO_STRUCT(_f, _s, _n, 0, \ >> + vmstate_ptimer, ptimer_state) >> + >> #endif >> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h >> index 9d09e60..be193ba 100644 >> --- a/include/migration/vmstate.h >> +++ b/include/migration/vmstate.h >> @@ -339,6 +339,16 @@ extern const VMStateInfo vmstate_info_bitmap; >> .offset = vmstate_offset_array(_state, _field, _type, _num), \ >> } >> >> +#define VMSTATE_ARRAY_OF_POINTER_TO_STRUCT(_f, _s, _n, _v, _vmsd, _type) { \ >> + .name = (stringify(_f)), \ >> + .version_id = (_v), \ >> + .num = (_n), \ >> + .vmsd =&(_vmsd), \ >> + .size = sizeof(_type *), \ >> + .flags = VMS_ARRAY|VMS_STRUCT|VMS_ARRAY_OF_POINTER, \ >> + .offset = vmstate_offset_array(_s, _f, _type*, _n), \ >> +} >> + >> #define VMSTATE_STRUCT_ARRAY_TEST(_field, _state, _num, _test, _version, _vmsd, _type) { \ >> .name = (stringify(_field)), \ >> .num = (_num), \ >> -- >> 1.7.2.5 >> >> >> > >