diff mbox series

[05/13] qapi: introduce replay.json for record/replay-related stuff

Message ID 159316680859.10508.4570677924280388493.stgit@pasha-ThinkPad-X280
State New
Headers show
Series Reverse debugging | expand

Commit Message

Pavel Dovgalyuk June 26, 2020, 10:20 a.m. UTC
From: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>

This patch adds replay.json file. It will be
used for adding record/replay-related data structures and commands.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---
 0 files changed

Comments

Alex Bennée July 15, 2020, 11:20 a.m. UTC | #1
Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> writes:

> From: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
>
> This patch adds replay.json file. It will be
> used for adding record/replay-related data structures and commands.
>
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> ---
>  0 files changed
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 5dd86c7f94..ca5b1cf7f1 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2572,6 +2572,7 @@ F: docs/replay.txt
>  F: stubs/replay.c
>  F: tests/acceptance/replay_kernel.py
>  F: tests/acceptance/replay_linux.py
> +F: qapi/replay.json

This makes me wonder what is missing as MAINTAINERS doesn't have
replay_linux.py - which is why I was confused.

>  
>  IOVA Tree
>  M: Peter Xu <peterx@redhat.com>
> diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h
> index c9c896ae8d..e00ed2f4a5 100644
> --- a/include/sysemu/replay.h
> +++ b/include/sysemu/replay.h
> @@ -14,6 +14,7 @@
>  
>  #include "qapi/qapi-types-misc.h"
>  #include "qapi/qapi-types-run-state.h"
> +#include "qapi/qapi-types-replay.h"
>  #include "qapi/qapi-types-ui.h"
>  #include "block/aio.h"
>  
> diff --git a/qapi/Makefile.objs b/qapi/Makefile.objs
> index 4673ab7490..eff501a97d 100644
> --- a/qapi/Makefile.objs
> +++ b/qapi/Makefile.objs
> @@ -7,8 +7,8 @@ util-obj-y += qapi-util.o
>  
>  QAPI_COMMON_MODULES = audio authz block-core block char common control crypto
>  QAPI_COMMON_MODULES += dump error introspect job machine migration misc
> -QAPI_COMMON_MODULES += net pragma qdev qom rdma rocker run-state sockets tpm
> -QAPI_COMMON_MODULES += trace transaction ui
> +QAPI_COMMON_MODULES += net pragma qdev qom rdma replay rocker run-state sockets
> +QAPI_COMMON_MODULES += tpm trace transaction ui
>  QAPI_TARGET_MODULES = machine-target misc-target
>  QAPI_MODULES = $(QAPI_COMMON_MODULES) $(QAPI_TARGET_MODULES)
>  
> diff --git a/qapi/misc.json b/qapi/misc.json
> index a5a0beb902..2a7af56887 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -1493,24 +1493,6 @@
>  { 'event': 'ACPI_DEVICE_OST',
>       'data': { 'info': 'ACPIOSTInfo' } }
>  
> -##
> -# @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.5
> -##
> -{ 'enum': 'ReplayMode',
> -  'data': [ 'none', 'record', 'play' ] }
> -
>  ##
>  # @xen-load-devices-state:
>  #
> diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json
> index 43b0ba0dea..ce48897b94 100644
> --- a/qapi/qapi-schema.json
> +++ b/qapi/qapi-schema.json
> @@ -81,6 +81,7 @@
>  { 'include': 'qdev.json' }
>  { 'include': 'machine.json' }
>  { 'include': 'machine-target.json' }
> +{ 'include': 'replay.json' }
>  { 'include': 'misc.json' }
>  { 'include': 'misc-target.json' }
>  { 'include': 'audio.json' }
> diff --git a/qapi/replay.json b/qapi/replay.json
> new file mode 100644
> index 0000000000..9e13551d20
> --- /dev/null
> +++ b/qapi/replay.json
> @@ -0,0 +1,26 @@
> +# -*- Mode: Python -*-
> +#
> +
> +##
> +# = Record/replay
> +##
> +
> +{ 'include': 'common.json' }
> +
> +##
> +# @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.5
> +##
> +{ 'enum': 'ReplayMode',
> +  'data': [ 'none', 'record', 'play' ] }

otherwise:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Pavel Dovgalyuk July 16, 2020, 6 a.m. UTC | #2
On 15.07.2020 14:20, Alex Bennée wrote:
> 
> Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> writes:
> 
>> From: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
>>
>> This patch adds replay.json file. It will be
>> used for adding record/replay-related data structures and commands.
>>
>> Signed-off-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
>> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>> ---
>>   0 files changed
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 5dd86c7f94..ca5b1cf7f1 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -2572,6 +2572,7 @@ F: docs/replay.txt
>>   F: stubs/replay.c
>>   F: tests/acceptance/replay_kernel.py
>>   F: tests/acceptance/replay_linux.py
>> +F: qapi/replay.json
> 
> This makes me wonder what is missing as MAINTAINERS doesn't have
> replay_linux.py - which is why I was confused.

Right, this is my fault.
I missed, that replay_linux test was not upstreamed.


Pavel Dovgalyuk
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 5dd86c7f94..ca5b1cf7f1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2572,6 +2572,7 @@  F: docs/replay.txt
 F: stubs/replay.c
 F: tests/acceptance/replay_kernel.py
 F: tests/acceptance/replay_linux.py
+F: qapi/replay.json
 
 IOVA Tree
 M: Peter Xu <peterx@redhat.com>
diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h
index c9c896ae8d..e00ed2f4a5 100644
--- a/include/sysemu/replay.h
+++ b/include/sysemu/replay.h
@@ -14,6 +14,7 @@ 
 
 #include "qapi/qapi-types-misc.h"
 #include "qapi/qapi-types-run-state.h"
+#include "qapi/qapi-types-replay.h"
 #include "qapi/qapi-types-ui.h"
 #include "block/aio.h"
 
diff --git a/qapi/Makefile.objs b/qapi/Makefile.objs
index 4673ab7490..eff501a97d 100644
--- a/qapi/Makefile.objs
+++ b/qapi/Makefile.objs
@@ -7,8 +7,8 @@  util-obj-y += qapi-util.o
 
 QAPI_COMMON_MODULES = audio authz block-core block char common control crypto
 QAPI_COMMON_MODULES += dump error introspect job machine migration misc
-QAPI_COMMON_MODULES += net pragma qdev qom rdma rocker run-state sockets tpm
-QAPI_COMMON_MODULES += trace transaction ui
+QAPI_COMMON_MODULES += net pragma qdev qom rdma replay rocker run-state sockets
+QAPI_COMMON_MODULES += tpm trace transaction ui
 QAPI_TARGET_MODULES = machine-target misc-target
 QAPI_MODULES = $(QAPI_COMMON_MODULES) $(QAPI_TARGET_MODULES)
 
diff --git a/qapi/misc.json b/qapi/misc.json
index a5a0beb902..2a7af56887 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -1493,24 +1493,6 @@ 
 { 'event': 'ACPI_DEVICE_OST',
      'data': { 'info': 'ACPIOSTInfo' } }
 
-##
-# @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.5
-##
-{ 'enum': 'ReplayMode',
-  'data': [ 'none', 'record', 'play' ] }
-
 ##
 # @xen-load-devices-state:
 #
diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json
index 43b0ba0dea..ce48897b94 100644
--- a/qapi/qapi-schema.json
+++ b/qapi/qapi-schema.json
@@ -81,6 +81,7 @@ 
 { 'include': 'qdev.json' }
 { 'include': 'machine.json' }
 { 'include': 'machine-target.json' }
+{ 'include': 'replay.json' }
 { 'include': 'misc.json' }
 { 'include': 'misc-target.json' }
 { 'include': 'audio.json' }
diff --git a/qapi/replay.json b/qapi/replay.json
new file mode 100644
index 0000000000..9e13551d20
--- /dev/null
+++ b/qapi/replay.json
@@ -0,0 +1,26 @@ 
+# -*- Mode: Python -*-
+#
+
+##
+# = Record/replay
+##
+
+{ 'include': 'common.json' }
+
+##
+# @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.5
+##
+{ 'enum': 'ReplayMode',
+  'data': [ 'none', 'record', 'play' ] }