From nobody Sun May 12 08:18:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1602617071; cv=none; d=zohomail.com; s=zohoarc; b=Q60heYb40XW6+MJS3vfYPkVh9aH+mc18vuFdiOKY7NfhWmMwd2+pdd10EWEHZCYffBCKlwooE8mfnM3PQeul+8HWqydR72U7MOVoYuhabaIByNpZbUHprpB/9X+KjqPvngsSYsXnKRhg3OTjV7eN7iPm/evWIE6Cdb3YduuP6pM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602617071; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2cehfRM80z2SH23ja5pVvuDhbB5BaNIGCInamjNyA+w=; b=HdCahEwSi53Hn7kJwNYOZGM/QBn53Qx7aonaQs3xof/jrNsQ7GLjixSTvGRK/kqxk4eF7WB+DxgOpUvaxKWF4KeaKv4MtnmNyBJQcM2I+U+Q8ki7Xz219uWCLqYcCovT7QqW3VoHpSuIt9ewCblUBBXtlcn3ookjZB3tULrBVfE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602617071229442.9689588470533; Tue, 13 Oct 2020 12:24:31 -0700 (PDT) Received: from localhost ([::1]:44420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSPuQ-0002Pd-4u for importer@patchew.org; Tue, 13 Oct 2020 15:24:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSPrg-0007N6-EG for qemu-devel@nongnu.org; Tue, 13 Oct 2020 15:21:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:39564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSPrU-0008Ez-FY for qemu-devel@nongnu.org; Tue, 13 Oct 2020 15:21:40 -0400 Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 421D1B240; Tue, 13 Oct 2020 19:21:26 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Claudio Fontana To: Paolo Bonzini Subject: [PATCH v4 1/3] tests/Makefile.include: unbreak non-tcg builds Date: Tue, 13 Oct 2020 21:21:21 +0200 Message-Id: <20201013192123.22632-2-cfontana@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201013192123.22632-1-cfontana@suse.de> References: <20201013192123.22632-1-cfontana@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=195.135.220.15; envelope-from=cfontana@suse.de; helo=mx2.suse.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/12 01:21:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Pavel Dovgalyuk , Claudio Fontana , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Paolo Bonzini remove dependency of check-block from non-native archs Signed-off-by: Claudio Fontana --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 5aca98e60c..4037490b69 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -140,7 +140,7 @@ QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) =3D tests/qemu-iot= ests/socket_scm_helper$(EXE check: check-block check-block: $(SRC_PATH)/tests/check-block.sh qemu-img$(EXESUF) \ qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \ - $(patsubst %-softmmu,qemu-system-%,$(filter %-softmmu,$(TARGET_DIRS))) + $(filter qemu-system-%, $(ninja-targets-c_LINKER) $(ninja-targets-cpp_LI= NKER)) @$< endif =20 --=20 2.26.2 From nobody Sun May 12 08:18:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1602616969; cv=none; d=zohomail.com; s=zohoarc; b=dqocNeBg5uP+vzIG8FdnhFw7hQQkSSQYfPK2LeeuLLvKTb76b2XzRp9xRHfX2O/Y4KnS2WBZqWZ3Qq11x956i/TEgu0jVlL5s0O9JrKMSNUfVTmQGIZJvHTp9qXjpvbFS8JEQCE4Jud+uWxl8buJVru1CW9Xc8CpaCvjYMoWnDQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602616969; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/yjHsteUpHw9OIwsPlijQCsz+w+oxBR0k89tlK1q5xw=; b=byXE8pewWHr07CrvTg+ZIaGFuHpCxlE0MiH0NPjQAqUfgbhPgcWJ+SQIeqWzm6iB/LT96HQsOW4X3G4Z6pgPMH0vypnp3R2fmlfD3IeuvEbMLKEtHWS9RSaoTKicG+TRfvCL7rq0R1usRUzlFik7rrvUxSODLvOYX6MHRqne/Ok= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602616969240536.7109169511576; Tue, 13 Oct 2020 12:22:49 -0700 (PDT) Received: from localhost ([::1]:38358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSPsm-0008NB-6F for importer@patchew.org; Tue, 13 Oct 2020 15:22:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSPrc-0007Mc-Iv for qemu-devel@nongnu.org; Tue, 13 Oct 2020 15:21:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:39580) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSPrU-0008F1-Fu for qemu-devel@nongnu.org; Tue, 13 Oct 2020 15:21:36 -0400 Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 8978AB234; Tue, 13 Oct 2020 19:21:26 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Claudio Fontana To: Paolo Bonzini Subject: [PATCH v4 2/3] qtest: unbreak non-TCG builds in bios-tables-test Date: Tue, 13 Oct 2020 21:21:22 +0200 Message-Id: <20201013192123.22632-3-cfontana@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201013192123.22632-1-cfontana@suse.de> References: <20201013192123.22632-1-cfontana@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=195.135.220.15; envelope-from=cfontana@suse.de; helo=mx2.suse.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/12 01:21:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Pavel Dovgalyuk , Claudio Fontana , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" the tests assume TCG is available, thus breaking for TCG-only tests, where only the TCG accelerator option is passed to the QEMU binary. Suggested-by: Paolo Bonzini Acked-by: Paolo Bonzini Signed-off-by: Claudio Fontana --- tests/qtest/bios-tables-test.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 5647624492..18f535d4e8 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -127,6 +127,9 @@ static void free_test_data(test_data *data) { int i; =20 + if (!data->tables) { + return; + } for (i =3D 0; i < data->tables->len; ++i) { cleanup_table_descriptor(&g_array_index(data->tables, AcpiSdtTable= , i)); } @@ -656,6 +659,13 @@ static void test_acpi_one(const char *params, test_dat= a *data) char *args; bool use_uefi =3D data->uefi_fl1 && data->uefi_fl2; =20 +#ifndef CONFIG_TCG + if (data->tcg_only) { + g_test_skip("TCG disabled, skipping ACPI tcg_only test"); + return; + } +#endif /* CONFIG_TCG */ + if (use_uefi) { /* * TODO: convert '-drive if=3Dpflash' to new syntax (see e33763be7= cd3) --=20 2.26.2 From nobody Sun May 12 08:18:20 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1602617071; cv=none; d=zohomail.com; s=zohoarc; b=ljeN5DTyB42zAo2HsOaCK0QeTJakDXtzzr4Ll/s7B+c8RrAcT1SVFEkyPnYabYqSFmbFcAM58Ku1p+EQeKFmva4/s15gAMTsO7YTwGDNKjbY7jzi88Ocn/RRaKwUj4GKn7ZW0Gg30/eOUYTlmfTVXl6VJAPPtmFbhAiH3DbyzSM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602617071; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=v7SknfNs+vc0smZyYsSuo/TyJYqvdRCJvKK+dtfrG4o=; b=Nw9lqZ/eMixazP29CytUcFKNV6NbmNFS+pBdSZjQJs/Usm6JvS2Hfwcuadqolm1FOTnx51AW0ka3a4FxhLfitGnwgr71d14MYi0cOAfFHk5tdlKb/gsz3QifQulVrw+AFeX0EfOyf+vH9vNFcx73eMKq+V/5Kfqnc+gEmenGWcs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1602617071394369.567959868568; Tue, 13 Oct 2020 12:24:31 -0700 (PDT) Received: from localhost ([::1]:44410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSPuQ-0002PV-8m for importer@patchew.org; Tue, 13 Oct 2020 15:24:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSPri-0007OF-O5 for qemu-devel@nongnu.org; Tue, 13 Oct 2020 15:21:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:39602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSPrU-0008F6-Fw for qemu-devel@nongnu.org; Tue, 13 Oct 2020 15:21:42 -0400 Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DC345B236; Tue, 13 Oct 2020 19:21:26 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Claudio Fontana To: Paolo Bonzini Subject: [PATCH v4 3/3] replay: do not build if TCG is not available Date: Tue, 13 Oct 2020 21:21:23 +0200 Message-Id: <20201013192123.22632-4-cfontana@suse.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201013192123.22632-1-cfontana@suse.de> References: <20201013192123.22632-1-cfontana@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=195.135.220.15; envelope-from=cfontana@suse.de; helo=mx2.suse.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/12 01:21:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Pavel Dovgalyuk , Claudio Fontana , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" this fixes non-TCG builds broken recently by replay reverse debugging. stub the needed functions in stub/, including errors for hmp and qmp. This includes duplicating some code in replay/, and puts the logic for non-replay related events in the replay/ module (+ the stubs), so this should be revisited in the future. Surprisingly, only _one_ qtest was affected by this, ide-test.c, which resulted in a buzz as the bh events were never delivered, and the bh never executed. Many other subsystems _should_ have been affected. This fixes the immediate issue, however a better way to group replay functionality to TCG-only code could be developed in the long term. Signed-off-by: Claudio Fontana --- block/meson.build | 3 +- migration/savevm.c | 11 +++-- net/meson.build | 3 +- replay/meson.build | 2 +- replay/replay-input.c | 4 +- stubs/meson.build | 1 - stubs/replay-user.c | 9 ---- stubs/replay.c | 98 ++++++++++++++++++++++++++++++++++++++ tests/ptimer-test-stubs.c | 5 -- tests/qtest/qmp-cmd-test.c | 3 ++ ui/input.c | 12 ++++- 11 files changed, 125 insertions(+), 26 deletions(-) delete mode 100644 stubs/replay-user.c diff --git a/block/meson.build b/block/meson.build index 78e8b25232..01fe6f84d2 100644 --- a/block/meson.build +++ b/block/meson.build @@ -7,7 +7,6 @@ block_ss.add(files( 'backup-top.c', 'blkdebug.c', 'blklogwrites.c', - 'blkreplay.c', 'blkverify.c', 'block-backend.c', 'block-copy.c', @@ -42,6 +41,8 @@ block_ss.add(files( 'write-threshold.c', ), zstd, zlib) =20 +block_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c')) + block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c')) block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c')) block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c')) diff --git a/migration/savevm.c b/migration/savevm.c index d2e141f7b1..d9181ca520 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -63,6 +63,7 @@ #include "migration/colo.h" #include "qemu/bitmap.h" #include "net/announce.h" +#include "sysemu/tcg.h" =20 const unsigned int postcopy_ram_discard_version =3D 0; =20 @@ -2674,10 +2675,12 @@ int save_snapshot(const char *name, Error **errp) return ret; } =20 - if (!replay_can_snapshot()) { - error_setg(errp, "Record/replay does not allow making snapshot " - "right now. Try once more later."); - return ret; + if (tcg_enabled()) { + if (!replay_can_snapshot()) { + error_setg(errp, "Record/replay does not allow making snapshot= " + "right now. Try once more later."); + return ret; + } } =20 if (!bdrv_all_can_snapshot(&bs)) { diff --git a/net/meson.build b/net/meson.build index 1c7e3a3cb9..1076b0a7ab 100644 --- a/net/meson.build +++ b/net/meson.build @@ -7,7 +7,6 @@ softmmu_ss.add(files( 'eth.c', 'filter-buffer.c', 'filter-mirror.c', - 'filter-replay.c', 'filter-rewriter.c', 'filter.c', 'hub.c', @@ -17,6 +16,8 @@ softmmu_ss.add(files( 'util.c', )) =20 +softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c')) + softmmu_ss.add(when: 'CONFIG_L2TPV3', if_true: files('l2tpv3.c')) softmmu_ss.add(when: slirp, if_true: files('slirp.c')) softmmu_ss.add(when: ['CONFIG_VDE', vde], if_true: files('vde.c')) diff --git a/replay/meson.build b/replay/meson.build index f91163fb1e..cb3207740a 100644 --- a/replay/meson.build +++ b/replay/meson.build @@ -1,4 +1,4 @@ -softmmu_ss.add(files( +softmmu_ss.add(when: 'CONFIG_TCG', if_true: files( 'replay.c', 'replay-internal.c', 'replay-events.c', diff --git a/replay/replay-input.c b/replay/replay-input.c index 1147e3d34e..5d1fd92e79 100644 --- a/replay/replay-input.c +++ b/replay/replay-input.c @@ -124,7 +124,7 @@ void replay_input_event(QemuConsole *src, InputEvent *e= vt) } else if (replay_mode =3D=3D REPLAY_MODE_RECORD) { replay_add_input_event(QAPI_CLONE(InputEvent, evt)); } else { - qemu_input_event_send_impl(src, evt); + g_assert_not_reached(); } } =20 @@ -135,6 +135,6 @@ void replay_input_sync_event(void) } else if (replay_mode =3D=3D REPLAY_MODE_RECORD) { replay_add_input_sync_event(); } else { - qemu_input_event_sync_impl(); + g_assert_not_reached(); } } diff --git a/stubs/meson.build b/stubs/meson.build index 67f2a8c069..bbd2230d69 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -32,7 +32,6 @@ stub_ss.add(files('qtest.c')) stub_ss.add(files('ram-block.c')) stub_ss.add(files('ramfb.c')) stub_ss.add(files('replay.c')) -stub_ss.add(files('replay-user.c')) stub_ss.add(files('runstate-check.c')) stub_ss.add(files('set-fd-handler.c')) stub_ss.add(files('sysbus.c')) diff --git a/stubs/replay-user.c b/stubs/replay-user.c deleted file mode 100644 index 2ad9e27203..0000000000 --- a/stubs/replay-user.c +++ /dev/null @@ -1,9 +0,0 @@ -#include "qemu/osdep.h" -#include "sysemu/replay.h" -#include "sysemu/sysemu.h" - -void replay_bh_schedule_oneshot_event(AioContext *ctx, - QEMUBHFunc *cb, void *opaque) -{ - aio_bh_schedule_oneshot(ctx, cb, opaque); -} diff --git a/stubs/replay.c b/stubs/replay.c index 45ebe77fb9..34b7975b2d 100644 --- a/stubs/replay.c +++ b/stubs/replay.c @@ -103,3 +103,101 @@ bool replay_reverse_continue(void) { return false; } + +void replay_input_event(QemuConsole *src, InputEvent *evt) +{ +} +void replay_input_sync_event(void) +{ +} +void replay_bh_schedule_event(QEMUBH *bh) +{ + qemu_bh_schedule(bh); +} +void replay_bh_schedule_oneshot_event(AioContext *ctx, + QEMUBHFunc *cb, void *opaque) +{ + aio_bh_schedule_oneshot(ctx, cb, opaque); +} +void replay_add_blocker(Error *reason) +{ +} +void replay_audio_in(size_t *recorded, void *samples, size_t *wpos, size_t= size) +{ +} +void replay_audio_out(size_t *played) +{ +} +void replay_breakpoint(void) +{ +} +bool replay_can_snapshot(void) +{ + return false; +} +void replay_configure(struct QemuOpts *opts) +{ +} +void replay_flush_events(void) +{ +} +void replay_gdb_attached(void) +{ +} +bool replay_running_debug(void) +{ + return false; +} +void replay_shutdown_request(ShutdownCause cause) +{ +} +void replay_start(void) +{ +} +void replay_vmstate_init(void) +{ +} + +#include "monitor/monitor.h" +#include "monitor/hmp.h" +#include "qapi/qapi-commands-replay.h" +#include "qapi/error.h" +#include "qemu/error-report.h" + +void hmp_info_replay(Monitor *mon, const QDict *qdict) +{ + error_report("replay support not available"); +} +void hmp_replay_break(Monitor *mon, const QDict *qdict) +{ + error_report("replay support not available"); +} +void hmp_replay_delete_break(Monitor *mon, const QDict *qdict) +{ + error_report("replay support not available"); +} +void hmp_replay_seek(Monitor *mon, const QDict *qdict) +{ + error_report("replay support not available"); +} +ReplayInfo *qmp_query_replay(Error **errp) +{ + error_set(errp, ERROR_CLASS_COMMAND_NOT_FOUND, + "replay support not available"); + return NULL; +} +void qmp_replay_break(int64_t icount, Error **errp) +{ + error_set(errp, ERROR_CLASS_COMMAND_NOT_FOUND, + "replay support not available"); +} +void qmp_replay_delete_break(Error **errp) +{ + error_set(errp, ERROR_CLASS_COMMAND_NOT_FOUND, + "replay support not available"); +} +void qmp_replay_seek(int64_t icount, Error **errp) +{ + error_set(errp, ERROR_CLASS_COMMAND_NOT_FOUND, + "replay support not available"); +} diff --git a/tests/ptimer-test-stubs.c b/tests/ptimer-test-stubs.c index e935a1395e..7f801a4d09 100644 --- a/tests/ptimer-test-stubs.c +++ b/tests/ptimer-test-stubs.c @@ -122,8 +122,3 @@ void qemu_bh_delete(QEMUBH *bh) { g_free(bh); } - -void replay_bh_schedule_event(QEMUBH *bh) -{ - bh->cb(bh->opaque); -} diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c index 8a4c570e83..1c7186e53c 100644 --- a/tests/qtest/qmp-cmd-test.c +++ b/tests/qtest/qmp-cmd-test.c @@ -31,6 +31,9 @@ static int query_error_class(const char *cmd) #ifndef CONFIG_SPICE { "query-spice", ERROR_CLASS_COMMAND_NOT_FOUND }, #endif +#ifndef CONFIG_TCG + { "query-replay", ERROR_CLASS_COMMAND_NOT_FOUND }, +#endif #ifndef CONFIG_VNC { "query-vnc", ERROR_CLASS_GENERIC_ERROR }, { "query-vnc-servers", ERROR_CLASS_GENERIC_ERROR }, diff --git a/ui/input.c b/ui/input.c index 4791b089c7..8675e8ad09 100644 --- a/ui/input.c +++ b/ui/input.c @@ -375,7 +375,11 @@ void qemu_input_event_send(QemuConsole *src, InputEven= t *evt) return; } =20 - replay_input_event(src, evt); + if (replay_events_enabled()) { + replay_input_event(src, evt); + } else { + qemu_input_event_send_impl(src, evt); + } } =20 void qemu_input_event_sync_impl(void) @@ -401,7 +405,11 @@ void qemu_input_event_sync(void) return; } =20 - replay_input_sync_event(); + if (replay_events_enabled()) { + replay_input_sync_event(); + } else { + qemu_input_event_sync_impl(); + } } =20 static InputEvent *qemu_input_event_new_key(KeyValue *key, bool down) --=20 2.26.2