exec: QAPI housekeeping for user emulation
cover exec: QAPI housekeeping for user emulation
Since there is no monitor in user emulation builds, we don't generate the QAPI headers for the QMP commands.
I'm not sure when the --disable-system --disable-tools configuration started to bitrot; it might not be super important, but I'm using it to better sort SYSEMU vs USER code, so I need to get it building again.
I'm trying to split a big series in smaller ones to reduce maintainers spam.
Philippe Mathieu-Daude (2):
replay: Extract core API to 'exec/replay-core.h' tests/unit: Restrict machine-smp.c test to system emulation
Philippe Mathieu-Daudé (3):
exec: Remove unused 'qemu/timer.h' timer tcg/tcg-op-gvec: Remove unused "qemu/main-loop.h" header accel/tcg: Restrict 'qapi-commands-machine.h' to system emulation
MAINTAINERS | 1 + accel/tcg/cpu-exec.c | 91 +--------------------------- accel/tcg/hmp.c | 14 ----- accel/tcg/internal.h | 3 + accel/tcg/meson.build | 2 +- accel/tcg/monitor.c | 105 +++++++++++++++++++++++++++++++++ accel/tcg/tcg-all.c | 2 +- accel/tcg/translate-all.c | 1 - accel/tcg/translator.c | 2 +- accel/tcg/user-exec-stub.c | 2 +- cpu.c | 2 +- gdbstub/gdbstub.c | 2 +- hw/core/ptimer.c | 2 +- include/exec/gen-icount.h | 1 - include/exec/replay-core.h | 76 ++++++++++++++++++++++++ include/sysemu/cpus.h | 1 - include/sysemu/replay.h | 67 ++------------------- stubs/replay.c | 2 +- tcg/tcg-op-gvec.c | 1 - tcg/tcg.c | 1 - tests/unit/meson.build | 2 +- tests/unit/ptimer-test-stubs.c | 2 +- util/guest-random.c | 2 +- 23 files changed, 203 insertions(+), 181 deletions(-) delete mode 100644 accel/tcg/hmp.c create mode 100644 accel/tcg/monitor.c create mode 100644 include/exec/replay-core.h
Signature · 1 line
2.38.1
PATCH 1/5 exec: Remove unused 'qemu/timer.h' timer
--- accel/tcg/cpu-exec.c | 1 - accel/tcg/translate-all.c | 1 - include/exec/gen-icount.h | 1 - include/sysemu/cpus.h | 1 - tcg/tcg.c | 1 - 5 files changed, 5 deletions(-)
accel/tcg/cpu-exec.c +0 -1
@@ -29,7 +29,6 @@#include "tcg/tcg.h" #include "qemu/atomic.h" #include "qemu/compiler.h" -#include "qemu/timer.h" #include "qemu/rcu.h" #include "exec/log.h" #include "qemu/main-loop.h"
accel/tcg/translate-all.c +0 -1
@@ -49,7 +49,6 @@#include "exec/translator.h" #include "qemu/bitmap.h" #include "qemu/qemu-print.h" -#include "qemu/timer.h" #include "qemu/main-loop.h" #include "qemu/cacheinfo.h" #include "exec/log.h"
include/exec/gen-icount.h +0 -1
@@ -2,7 +2,6 @@#define GEN_ICOUNT_H #include "exec/exec-all.h" -#include "qemu/timer.h" /* Helpers for instruction counting code generation. */
include/sysemu/cpus.h +0 -1
@@ -1,7 +1,6 @@#ifndef QEMU_CPUS_H #define QEMU_CPUS_H -#include "qemu/timer.h" #include "sysemu/accel-ops.h" /* register accel-specific operations */
tcg/tcg.c +0 -1
@@ -34,7 +34,6 @@#include "qemu/cutils.h" #include "qemu/host-utils.h" #include "qemu/qemu-print.h" -#include "qemu/timer.h" #include "qemu/cacheflush.h" #include "qemu/cacheinfo.h"
Signature · 1 line
2.38.1
Re: [PATCH 1/5] exec: Remove unused 'qemu/timer.h' timer
Quoted 8 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- accel/tcg/cpu-exec.c | 1 - accel/tcg/translate-all.c | 1 - include/exec/gen-icount.h | 1 - include/sysemu/cpus.h | 1 - tcg/tcg.c | 1 - 5 files changed, 5 deletions(-)
r~
PATCH 2/5 tcg/tcg-op-gvec: Remove unused "qemu/main-loop.h" header
In reply to Philippe Mathieu-Daudé---
Added in db72581598 ("Include qemu/main-loop.h less") but now I can't see what is requiring it.
I checked 'git diff db725815985..origin/master -- tcg/tcg-op-gvec.c' to see if some code was removed without removing the header; I haven't checked individual commits.
--- tcg/tcg-op-gvec.c | 1 - 1 file changed, 1 deletion(-)
tcg/tcg-op-gvec.c +0 -1
@@ -21,7 +21,6 @@#include "tcg/tcg.h" #include "tcg/tcg-op.h" #include "tcg/tcg-op-gvec.h" -#include "qemu/main-loop.h" #include "tcg/tcg-gvec-desc.h" #define MAX_UNROLL 4
Signature · 1 line
2.38.1
Re: [PATCH 2/5] tcg/tcg-op-gvec: Remove unused "qemu/main-loop.h" header
Quoted 11 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
Added indb72581598("Includeqemu/main-loop.hless") but now I can't see what is requiring it.I checked 'git diff db725815985..origin/master --
tcg/tcg-op-gvec.c' to see if some code was removed without removing the header; I haven't checked individual commits.--- tcg/tcg-op-gvec.c | 1 - 1 file changed, 1 deletion(-)
I can only imagine that it was cut-and-paste.
r~
Quoted 13 lines
tcg/tcg-op-gvec.c +0
-1@@ -21,7 +21,6 @@#include "tcg/tcg.h" #include "tcg/tcg-op.h" #include "tcg/tcg-op-gvec.h" -#include "qemu/main-loop.h" #include "tcg/tcg-gvec-desc.h" #define MAX_UNROLL 4
PATCH 3/5 accel/tcg: Restrict 'qapi-commands-machine.h' to system emulation
In reply to Philippe Mathieu-DaudéSince commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build.
Rename 'hmp.c' as 'monitor.c' and move the QMP functions from cpu-exec.c (which is always compiled) to monitor.c (which is only compiled when system-emulation is selected).
--- accel/tcg/cpu-exec.c | 88 +---------------------------------- accel/tcg/hmp.c | 14 ------ accel/tcg/internal.h | 3 ++ accel/tcg/meson.build | 2 +- accel/tcg/monitor.c | 105 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 111 insertions(+), 101 deletions(-) delete mode 100644 accel/tcg/hmp.c create mode 100644 accel/tcg/monitor.c
accel/tcg/cpu-exec.c +2 -86
@@ -20,7 +20,6 @@#include "qemu/osdep.h" #include "qemu/qemu-print.h" #include "qapi/error.h" -#include "qapi/qapi-commands-machine.h" #include "qapi/type-helpers.h" #include "hw/core/tcg-cpu-ops.h" #include "trace.h"
@@ -64,8 +63,8 @@ typedef struct SyncClocks {#define MAX_DELAY_PRINT_RATE 2000000000LL#define MAX_NB_PRINTS 100 -static int64_t max_delay; -static int64_t max_advance; +int64_t max_delay; +int64_t max_advance;static void align_clocks (SyncClocks *sc,CPUState *cpu) {
@@ -1071,86 +1070,3 @@ void tcg_exec_unrealizefn(CPUState *cpu)tlb_destroy (cpu);g_free (cpu->tb_jmp_cache); } - -#ifndef CONFIG_USER_ONLY - -static void dump_drift_info (GString *buf) -{ -if (!icount_enabled ()) { -return ; - } - -g_string_append_printf (buf,"Host - Guest clock %" PRIi64" ms\n" , - (cpu_get_clock () -icount_get ()) /SCALE_MS ); -if (icount_align_option) { -g_string_append_printf (buf,"Max guest delay %" PRIi64" ms\n" , - -max_delay /SCALE_MS ); -g_string_append_printf (buf,"Max guest advance %" PRIi64" ms\n" , - max_advance /SCALE_MS ); - }else { -g_string_append_printf (buf,"Max guest delay NA\n" ); -g_string_append_printf (buf,"Max guest advance NA\n" ); - } -} - -HumanReadableText *qmp_x_query_jit (Error **errp) -{ -g_autoptr (GString) buf =g_string_new ("" ); - -if (!tcg_enabled ()) { -error_setg (errp,"JIT information is only available with accel=tcg" ); -return NULL ; - } - -dump_exec_info (buf); -dump_drift_info (buf); - -return human_readable_text_from_str (buf); -} - -HumanReadableText *qmp_x_query_opcount (Error **errp) -{ -g_autoptr (GString) buf =g_string_new ("" ); - -if (!tcg_enabled ()) { -error_setg (errp,"Opcode count information is only available with accel=tcg" ); -return NULL ; - } - -tcg_dump_op_count (buf); - -return human_readable_text_from_str (buf); -} - -#ifdef CONFIG_PROFILER - -int64_t dev_time; - -HumanReadableText *qmp_x_query_profile (Error **errp) -{ -g_autoptr (GString) buf =g_string_new ("" ); -static int64_t last_cpu_exec_time; -int64_t cpu_exec_time; -int64_t delta; - - cpu_exec_time =tcg_cpu_exec_time (); - delta = cpu_exec_time - last_cpu_exec_time; - -g_string_append_printf (buf,"async time %" PRId64" (%0.3f)\n" , - dev_time, dev_time / (double )NANOSECONDS_PER_SECOND ); -g_string_append_printf (buf,"qemu time %" PRId64" (%0.3f)\n" , - delta, delta / (double )NANOSECONDS_PER_SECOND ); - last_cpu_exec_time = cpu_exec_time; - dev_time =0 ; - -return human_readable_text_from_str (buf); -} -#else -HumanReadableText *qmp_x_query_profile (Error **errp) -{ -error_setg (errp,"Internal profiler not compiled" ); -return NULL ; -} -#endif - -#endif /* !CONFIG_USER_ONLY */
accel/tcg/hmp.c deleted +0 -14
@@ -1,14 +0,0 @@ -#include "qemu/osdep.h" -#include "qemu/error-report.h" -#include "qapi/error.h" -#include "qapi/qapi-commands-machine.h" -#include "exec/exec-all.h" -#include "monitor/monitor.h" - -static void hmp_tcg_register (void ) -{ -monitor_register_hmp_info_hrt ("jit" , qmp_x_query_jit); -monitor_register_hmp_info_hrt ("opcount" , qmp_x_query_opcount); -} - -type_init (hmp_tcg_register);
accel/tcg/internal.h +3 -0
@@ -64,4 +64,7 @@ static inline target_ulong log_pc(CPUState *cpu, const TranslationBlock *tb) #endif } +extern int64_t max_delay; +extern int64_t max_advance; +#endif /* ACCEL_TCG_INTERNAL_H */
accel/tcg/meson.build +1 -1
@@ -16,7 +16,7 @@ specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files( 'cputlb.c', - 'hmp.c', + 'monitor.c', )) tcg_module_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files(
accel/tcg/monitor.c new file +105 -0
105 lines not on this page · raw message
Signature · 1 line
2.38.1
Re: [PATCH 3/5] accel/tcg: Restrict 'qapi-commands-machine.h' to system emulation
Quoted 16 lines · Philippe Mathieu-Daudé
Since commit
a0e61807a3("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build.Rename '
hmp.c' as 'monitor.c' and move the QMP functions fromcpu-exec.c(which is always compiled) tomonitor.c(which is only compiled when system-emulation is selected).Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- accel/tcg/cpu-exec.c | 88 +---------------------------------- accel/tcg/hmp.c | 14 ------ accel/tcg/internal.h | 3 ++ accel/tcg/meson.build | 2 +- accel/tcg/monitor.c | 105 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 111 insertions(+), 101 deletions(-)
Quoted 2 lines
delete mode 100644
accel/tcg/hmp.c
create mode 100644accel/tcg/monitor.c
r~
PATCH 4/5 replay: Extract core API to 'exec/replay-core.h'
In reply to Philippe Mathieu-DaudéFrom: Philippe Mathieu-Daude <[email protected]>
replay API is used deeply within TCG common code (common to user and system emulation). Unfortunately "sysemu/replay.h" requires some QAPI headers for few system-specific declarations, example:
void replay_input_event(QemuConsole *src, InputEvent *evt);
Since commit c2651c0eaa ("qapi/meson: Restrict UI module to system emulation and tools") the QAPI header defining the InputEvent is not generated anymore.
To keep it simple, extract the 'core' replay prototypes to a new "exec/replay-core.h" header which we include in the TCG code that doesn't need the rest of the replay API.
--- MAINTAINERS | 1 + accel/tcg/cpu-exec.c | 2 +- accel/tcg/tcg-all.c | 2 +- accel/tcg/translator.c | 2 +- accel/tcg/user-exec-stub.c | 2 +- cpu.c | 2 +- gdbstub/gdbstub.c | 2 +- hw/core/ptimer.c | 2 +- include/exec/replay-core.h | 76 ++++++++++++++++++++++++++++++++++ include/sysemu/replay.h | 67 ++---------------------------- stubs/replay.c | 2 +- tests/unit/ptimer-test-stubs.c | 2 +- util/guest-random.c | 2 +- 13 files changed, 91 insertions(+), 73 deletions(-) create mode 100644 include/exec/replay-core.h
MAINTAINERS +1 -0
@@ -3206,6 +3206,7 @@ S: Supported F: replay/* F: block/blkreplay.c F: net/filter-replay.c +F: include/exec/replay-core.h F: include/sysemu/replay.h F: docs/devel/replay.rst F: docs/system/replay.rst
accel/tcg/cpu-exec.c +1 -1
@@ -37,7 +37,7 @@#include "sysemu/cpus.h" #include "exec/cpu-all.h" #include "sysemu/cpu-timers.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "sysemu/tcg.h" #include "exec/helper-proto.h" #include "tb-jmp-cache.h"
accel/tcg/tcg-all.c +1 -1
@@ -25,7 +25,7 @@#include "qemu/osdep.h" #include "sysemu/tcg.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "sysemu/cpu-timers.h" #include "tcg/tcg.h" #include "qapi/error.h"
accel/tcg/translator.c +1 -1
@@ -16,7 +16,7 @@#include "exec/log.h" #include "exec/translator.h" #include "exec/plugin-gen.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" /* Pairs with tcg_clear_temp_count. To be called by #TranslatorOps.{translate_insn,tb_stop} if
accel/tcg/user-exec-stub.c +1 -1
@@ -1,6 +1,6 @@#include "qemu/osdep.h" #include "hw/core/cpu.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" bool enable_cpu_pm = false;
cpu.c +1 -1
@@ -33,7 +33,7 @@#endif #include "sysemu/tcg.h" #include "sysemu/kvm.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "exec/cpu-common.h" #include "exec/exec-all.h" #include "exec/translate-all.h"
gdbstub/gdbstub.c +1 -1
@@ -48,7 +48,7 @@#include "sysemu/runstate.h" #include "semihosting/semihost.h" #include "exec/exec-all.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "internals.h"
hw/core/ptimer.c +1 -1
@@ -10,7 +10,7 @@#include "hw/ptimer.h" #include "migration/vmstate.h" #include "qemu/host-utils.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "sysemu/cpu-timers.h" #include "sysemu/qtest.h" #include "block/aio.h"
include/exec/replay-core.h new file +76 -0
76 lines not on this page · raw message
include/sysemu/replay.h +4 -63
104 lines not on this page · raw message
stubs/replay.c +1 -1
@@ -1,5 +1,5 @@#include "qemu/osdep.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" ReplayMode replay_mode;
tests/unit/ptimer-test-stubs.c +1 -1
@@ -10,7 +10,7 @@#include "qemu/osdep.h" #include "qemu/main-loop.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "migration/vmstate.h" #include "ptimer-test.h"
util/guest-random.c +1 -1
@@ -14,7 +14,7 @@#include "qapi/error.h" #include "qemu/guest-random.h" #include "crypto/random.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" static __threadGRand *thread_rand;
Signature · 1 line
2.38.1
Re: [PATCH 4/5] replay: Extract core API to 'exec/replay-core.h'
Quoted 368 lines · Philippe Mathieu-Daudé
From: Philippe Mathieu-Daude <[email protected]>
replay API is used deeply within TCG common code (common to user and system emulation). Unfortunately "
sysemu/replay.h" requires some QAPI headers for few system-specific declarations, example:void replay_input_event(QemuConsole *src, InputEvent *evt);Since commit
c2651c0eaa("qapi/meson: Restrict UI module to system emulation and tools") the QAPI header defining the InputEvent is not generated anymore.
To keep it simple, extract the 'core' replay prototypes to a new "exec/replay-core.h" header which we include in the TCG code that doesn't need the rest of the replay API.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 1 + accel/tcg/cpu-exec.c | 2 +- accel/tcg/tcg-all.c | 2 +- accel/tcg/translator.c | 2 +- accel/tcg/user-exec-stub.c | 2 +- cpu.c | 2 +- gdbstub/gdbstub.c | 2 +- hw/core/ptimer.c | 2 +- include/exec/replay-core.h | 76 ++++++++++++++++++++++++++++++++++ include/sysemu/replay.h | 67 ++---------------------------- stubs/replay.c | 2 +- tests/unit/ptimer-test-stubs.c | 2 +- util/guest-random.c | 2 +- 13 files changed, 91 insertions(+), 73 deletions(-)create mode 100644
include/exec/replay-core.hMAINTAINERS +1
-0@@ -3206,6 +3206,7 @@ S: Supported F: replay/* F: block/blkreplay.c F: net/filter-replay.c +F: include/exec/replay-core.h F: include/sysemu/replay.h F: docs/devel/replay.rst F: docs/system/replay.rstaccel/tcg/cpu-exec.c +1
-1@@ -37,7 +37,7 @@#include "sysemu/cpus.h" #include "exec/cpu-all.h" #include "sysemu/cpu-timers.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "sysemu/tcg.h" #include "exec/helper-proto.h" #include "tb-jmp-cache.h" accel/tcg/tcg-all.c +1
-1@@ -25,7 +25,7 @@#include "qemu/osdep.h" #include "sysemu/tcg.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "sysemu/cpu-timers.h" #include "tcg/tcg.h" #include "qapi/error.h" accel/tcg/translator.c +1
-1@@ -16,7 +16,7 @@#include "exec/log.h" #include "exec/translator.h" #include "exec/plugin-gen.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" /* Pairs with tcg_clear_temp_count. To be called by #TranslatorOps.{translate_insn,tb_stop} if accel/tcg/user-exec-stub.c +1
-1@@ -1,6 +1,6 @@#include "qemu/osdep.h" #include "hw/core/cpu.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" bool enable_cpu_pm = false;cpu.c +1
-1@@ -33,7 +33,7 @@#endif #include "sysemu/tcg.h" #include "sysemu/kvm.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "exec/cpu-common.h" #include "exec/exec-all.h" #include "exec/translate-all.h" gdbstub/gdbstub.c +1
-1@@ -48,7 +48,7 @@#include "sysemu/runstate.h" #include "semihosting/semihost.h" #include "exec/exec-all.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "internals.h" hw/core/ptimer.c +1
-1@@ -10,7 +10,7 @@#include "hw/ptimer.h" #include "migration/vmstate.h" #include "qemu/host-utils.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "sysemu/cpu-timers.h" #include "sysemu/qtest.h" #include "block/aio.h" include/exec/replay-core.h new file +76
-0@@ -0,0 +1,76 @@ +/* +* QEMU replay core API +* +* Copyright (c) 2010-2015 Institute for System Programming +* of the Russian Academy of Sciences. +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ + +#ifndef EXEC_REPLAY_H +#define EXEC_REPLAY_H + +#include "qapi/qapi-types-replay.h" + +extern ReplayMode replay_mode; + +/* Replay process control functions */ + +/*! Enables recording or saving event log with specified parameters */ +void replay_configure (struct QemuOpts *opts); +/*! Initializes timers used for snapshotting and enables events recording */ +void replay_start (void ); +/*! Closes replay log file and frees other resources. */ +void replay_finish (void ); +/*! Adds replay blocker with the specified error description */ +void replay_add_blocker (Error *reason); +/* Returns name of the replay log file */ +const char *replay_get_filename (void ); + +/* +* Start making one step in backward direction. +* Used by gdbstub for backwards debugging. +* Returns true on success. +*/ +bool replay_reverse_step (void ); +/* +* Start searching the last breakpoint/watchpoint. +* Used by gdbstub for backwards debugging. +* Returns true if the process successfully started. +*/ +bool replay_reverse_continue (void ); +/* +* Returns true if replay module is processing +* reverse_continue or reverse_step request +*/ +bool replay_running_debug (void ); +/* Called in reverse debugging mode to collect breakpoint information */ +void replay_breakpoint (void ); +/* Called when gdb is attached to gdbstub */ +void replay_gdb_attached (void ); + +/* Interrupts and exceptions */ + +/*! Called by exception handler to write or read +exception processing events. */ +bool replay_exception (void ); +/*! Used to determine that exception is pending. +Does not proceed to the next event in the log. */ +bool replay_has_exception (void ); +/*! Called by interrupt handlers to write or read +interrupt processing events. +\return true if interrupt should be processed */ +bool replay_interrupt (void ); +/*! Tries to read interrupt event from the file. +Returns true, when interrupt request is pending */ +bool replay_has_interrupt (void ); + +/* Processing data from random generators */ + +/* Saves the values from the random number generator */ +void replay_save_random (int ret,void *buf,size_t len); +/* Loads the saved values for the random number generator */ +int replay_read_random (void *buf,size_t len); + +#endif include/sysemu/replay.h +4
-63@@ -1,8 +1,8 @@ -#ifndef REPLAY_H -#define REPLAY_H +#ifndef SYSEMU_REPLAY_H +#define SYSEMU_REPLAY_H /* -* replay.h +* QEMU replay (system interface) * * Copyright (c) 2010-2015 Institute for System Programming * of the Russian Academy of Sciences. @@ -12,9 +12,9 @@* */ +#include "exec/replay-core.h" #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" @@ -45,8 +45,6 @@ typedef enum ReplayCheckpoint ReplayCheckpoint;typedef struct ReplayNetState ReplayNetState ; -extern ReplayMode replay_mode; -/* Name of the initial VM snapshot */ extern char *replay_snapshot;@@ -63,40 +61,6 @@ extern char *replay_snapshot;void replay_mutex_lock (void );void replay_mutex_unlock (void ); -/* Replay process control functions */ - -/*! Enables recording or saving event log with specified parameters */ -void replay_configure (struct QemuOpts *opts); -/*! Initializes timers used for snapshotting and enables events recording */ -void replay_start (void ); -/*! Closes replay log file and frees other resources. */ -void replay_finish (void ); -/*! Adds replay blocker with the specified error description */ -void replay_add_blocker (Error *reason); -/* Returns name of the replay log file */ -const char *replay_get_filename (void ); -/* -* Start making one step in backward direction. -* Used by gdbstub for backwards debugging. -* Returns true on success. -*/ -bool replay_reverse_step (void ); -/* -* Start searching the last breakpoint/watchpoint. -* Used by gdbstub for backwards debugging. -* Returns true if the process successfully started. -*/ -bool replay_reverse_continue (void ); -/* -* Returns true if replay module is processing -* reverse_continue or reverse_step request -*/ -bool replay_running_debug (void ); -/* Called in reverse debugging mode to collect breakpoint information */ -void replay_breakpoint (void ); -/* Called when gdb is attached to gdbstub */ -void replay_gdb_attached (void ); -/* Processing the instructions */ /*! Returns number of executed instructions. */ @@ -106,22 +70,6 @@ int replay_get_instructions(void);/*! Updates instructions counter in replay mode. */ void replay_account_executed_instructions (void ); -/* Interrupts and exceptions */ - -/*! Called by exception handler to write or read -exception processing events. */ -bool replay_exception (void ); -/*! Used to determine that exception is pending. -Does not proceed to the next event in the log. */ -bool replay_has_exception (void ); -/*! Called by interrupt handlers to write or read -interrupt processing events. -\return true if interrupt should be processed */ -bool replay_interrupt (void ); -/*! Tries to read interrupt event from the file. -Returns true, when interrupt request is pending */ -bool replay_has_interrupt (void ); -/* Processing clocks and other time sources */ /*! Save the specified clock */ @@ -143,13 +91,6 @@ int64_t replay_read_clock(ReplayClockKind kind, int64_t raw_icount); ?replay_save_clock ((clock), (value),icount_get_raw_locked ()) \ : (value)) -/* Processing data from random generators */ - -/* Saves the values from the random number generator */ -void replay_save_random (int ret,void *buf,size_t len); -/* Loads the saved values for the random number generator */ -int replay_read_random (void *buf,size_t len); -/* Events */ /*! Called when qemu shutdown is requested. */ stubs/replay.c +1
-1@@ -1,5 +1,5 @@#include "qemu/osdep.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" ReplayMode replay_mode;tests/unit/ptimer-test-stubs.c +1
-1@@ -10,7 +10,7 @@#include "qemu/osdep.h" #include "qemu/main-loop.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "migration/vmstate.h" #include "ptimer-test.h" util/guest-random.c +1
-1@@ -14,7 +14,7 @@#include "qapi/error.h" #include "qemu/guest-random.h" #include "crypto/random.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" static __threadGRand *thread_rand;
PATCH 5/5 tests/unit: Restrict machine-smp.c test to system emulation
In reply to Philippe Mathieu-DaudéFrom: Philippe Mathieu-Daude <[email protected]>
--- tests/unit/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/unit/meson.build +1 -1
@@ -46,7 +46,6 @@ tests = { 'test-uuid': [], 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'], 'test-qapi-util': [], - 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], 'test-interval-tree': [], }
@@ -134,6 +133,7 @@ if have_system 'test-util-sockets': ['socket-helpers.c'], 'test-base64': [], 'test-bufferiszero': [], + 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], 'test-vmstate': [migration, io], 'test-yank': ['socket-helpers.c', qom, io, chardev] }
Signature · 1 line
2.38.1
Re: [PATCH 5/5] tests/unit: Restrict machine-smp.c test to system emulation
Quoted 6 lines · Philippe Mathieu-Daudé
From: Philippe Mathieu-Daude<[email protected]>
Signed-off-by Philippe Mathieu-Daudé<[email protected]>--- tests/unit/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
r~