On 01/12/2015 04:59 AM, Pavel Dovgalyuk wrote: > This patch adds global variables, defines, functions declarations, > and function stubs for deterministic VM replay used by external modules. > > Signed-off-by: Pavel Dovgalyuk <pavel.dovga...@ispras.ru> > ---
> +++ b/qapi-schema.json > @@ -3515,3 +3515,35 @@ > # Since: 2.1 > ## > { 'command': 'rtc-reset-reinjection' } > + > +## > +# ReplayMode: > +# > +# Mode of the replay subsystem. > +# > +# @none: normal execution mode. Replay or record are not enabled. > +# > +# @record: record mode. All non-deterministic data is written into the > +# replay log. > +# > +# @play: replay mode. Non-deterministic data required for system execution > +# is read from the log. > +# > +# Since: 2.3 > +## > +{ 'enum': 'ReplayMode', > + 'data': [ 'none', 'record', 'play' ] } > + > +## > +# ReplaySubmode: > +# > +# Submode of the replay subsystem. > +# > +# @unknown: used for modes different from play. > +# > +# @normal: normal replay mode. > +# > +# Since: 2.3 > +## > +{ 'enum': 'ReplaySubmode', > + 'data': [ 'unknown', 'normal' ] } I'm still not sure how ReplaySubmode fits in, as nothing in this patch is using either new type in the QAPI. > +++ b/replay/replay.c > @@ -0,0 +1,25 @@ > +/* > + * replay.c > + * > + * Copyright (c) 2010-2014 Institute for System Programming > + * of the Russian Academy of Sciences. Now that your series revision work is continuing in 2015, you may want to update the years. > + * > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > + * See the COPYING file in the top-level directory. > + * > + */ > + > +#include "replay.h" > + > +ReplayMode replay_mode = REPLAY_MODE_NONE; > +/*! Stores current submode for PLAY mode */ > +ReplaySubmode play_submode = REPLAY_SUBMODE_UNKNOWN; It sounds like the submode will always be 'unknown' when not in play mode, and only 'normal' when in play mode? If so, there's no point in having it. If a later patch introduces separate play modes, then that would be the point where it makes more sense to introduce an optional submode designator. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature