qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v7 02/21] replay: global variables and funct


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC PATCH v7 02/21] replay: global variables and function stubs
Date: Tue, 20 Jan 2015 10:07:14 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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 <address@hidden>
> ---

> +++ 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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]