[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 09/12] plugins: add migration blocker
From: |
Alex Bennée |
Subject: |
[PATCH v2 09/12] plugins: add migration blocker |
Date: |
Thu, 20 Jun 2024 16:22:17 +0100 |
If the plugin in controlling time there is some state that might be
missing from the plugin tracking it. Migration is unlikely to work in
this case so lets put a migration blocker in to let the user know if
they try.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Suggested-by: "Dr. David Alan Gilbert" <dave@treblig.org>
---
plugins/api.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/plugins/api.c b/plugins/api.c
index 4431a0ea7e..c4239153af 100644
--- a/plugins/api.c
+++ b/plugins/api.c
@@ -47,6 +47,8 @@
#include "disas/disas.h"
#include "plugin.h"
#ifndef CONFIG_USER_ONLY
+#include "qapi/error.h"
+#include "migration/blocker.h"
#include "exec/ram_addr.h"
#include "qemu/plugin-memory.h"
#include "hw/boards.h"
@@ -589,11 +591,17 @@ uint64_t qemu_plugin_u64_sum(qemu_plugin_u64 entry)
* Time control
*/
static bool has_control;
+Error *migration_blocker;
const void *qemu_plugin_request_time_control(void)
{
if (!has_control) {
has_control = true;
+#ifdef CONFIG_SOFTMMU
+ error_setg(&migration_blocker,
+ "TCG plugin time control does not support migration");
+ migrate_add_blocker(&migration_blocker, NULL);
+#endif
return &has_control;
}
return NULL;
--
2.39.2
- [PATCH v2 01/12] include/exec: add missing include guard comment, (continued)
- [PATCH v2 01/12] include/exec: add missing include guard comment, Alex Bennée, 2024/06/20
- [PATCH v2 02/12] gdbstub: move enums into separate header, Alex Bennée, 2024/06/20
- [PATCH v2 04/12] sysemu: add set_virtual_time to accel ops, Alex Bennée, 2024/06/20
- [PATCH v2 06/12] sysemu: generalise qtest_warp_clock as qemu_clock_advance_virtual_time, Alex Bennée, 2024/06/20
- [PATCH v2 03/12] plugins: Ensure register handles are not NULL, Alex Bennée, 2024/06/20
- [PATCH v2 07/12] qtest: move qtest_{get, set}_virtual_clock to accel/qtest/qtest.c, Alex Bennée, 2024/06/20
- [PATCH v2 05/12] qtest: use cpu interface in qtest_clock_warp, Alex Bennée, 2024/06/20
- [PATCH v2 08/12] plugins: add time control API, Alex Bennée, 2024/06/20
- [PATCH v2 09/12] plugins: add migration blocker,
Alex Bennée <=
- [PATCH v2 10/12] contrib/plugins: add Instructions Per Second (IPS) example for cost modeling, Alex Bennée, 2024/06/20
- [PATCH v2 12/12] accel/tcg: Avoid unnecessary call overhead from qemu_plugin_vcpu_mem_cb, Alex Bennée, 2024/06/20
- [PATCH v2 11/12] plugins: fix inject_mem_cb rw masking, Alex Bennée, 2024/06/20