From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDcH4-0005l4-8f for qemu-devel@nongnu.org; Tue, 20 Jan 2015 12:07:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDcH0-0001EH-74 for qemu-devel@nongnu.org; Tue, 20 Jan 2015 12:07:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDcGz-0001Dz-Sr for qemu-devel@nongnu.org; Tue, 20 Jan 2015 12:07:26 -0500 Message-ID: <54BE8B42.7000403@redhat.com> Date: Tue, 20 Jan 2015 10:07:14 -0700 From: Eric Blake MIME-Version: 1.0 References: <20150112115944.3504.66763.stgit@PASHA-ISP> <20150112115958.3504.62352.stgit@PASHA-ISP> In-Reply-To: <20150112115958.3504.62352.stgit@PASHA-ISP> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TNOH3tcRplMOXNOJgDPEXx0bbefTm3Fte" Subject: Re: [Qemu-devel] [RFC PATCH v7 02/21] replay: global variables and function stubs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgalyuk , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, pbonzini@redhat.com, alex.bennee@linaro.org, afaerber@suse.de, fred.konrad@greensocs.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TNOH3tcRplMOXNOJgDPEXx0bbefTm3Fte Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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= =2E >=20 > Signed-off-by: Pavel Dovgalyuk > --- > +++ 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 execu= tion > +# 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 =3D REPLAY_MODE_NONE; > +/*! Stores current submode for PLAY mode */ > +ReplaySubmode play_submode =3D 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --TNOH3tcRplMOXNOJgDPEXx0bbefTm3Fte Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUvotCAAoJEKeha0olJ0NqerAIAKGmFekpxFE2EmROPD99dy6i SyeTNtPOapWB11iDNS37Nq7PWglmfbkRu4Ym3HN7CW+NydawgxwIZkksbYf6UKwU RNoCtV2EJKEC84MauBNIYOwMBUKz2jGFpYgTp7E8Q2enQO6uBOMNg/YV7WX9/c6q C97+NKAd4ZKLsjrcpOEJTjl3ZPdYuPwZctLgGWtvxhCoMC7QGsqsRCODeZY2sYR+ guN//J62Hc5V7eF+ZeOyBc0nMHoJ9IKff3S7jh5pCizvrqWcU2LAx1ZqAep9kcbJ /PDUIvgd9b/31MmUZrpB23dqWugTGhIgnG9yh3rJxhhixAQHgNkxxP8tZZVgZHs= =AzEt -----END PGP SIGNATURE----- --TNOH3tcRplMOXNOJgDPEXx0bbefTm3Fte--