|
@@ -661,6 +661,33 @@ void qemu_plugin_register_vcpu_mem_inline_per_vcpu(
|
|
qemu_plugin_u64 entry,
|
|
qemu_plugin_u64 entry,
|
|
uint64_t imm);
|
|
uint64_t imm);
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * qemu_plugin_request_time_control() - request the ability to control time
|
|
|
|
+ *
|
|
|
|
+ * This grants the plugin the ability to control system time. Only one
|
|
|
|
+ * plugin can control time so if multiple plugins request the ability
|
|
|
|
+ * all but the first will fail.
|
|
|
|
+ *
|
|
|
|
+ * Returns an opaque handle or NULL if fails
|
|
|
|
+ */
|
|
|
|
+QEMU_PLUGIN_API
|
|
|
|
+const void *qemu_plugin_request_time_control(void);
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * qemu_plugin_update_ns() - update system emulation time
|
|
|
|
+ * @handle: opaque handle returned by qemu_plugin_request_time_control()
|
|
|
|
+ * @time: time in nanoseconds
|
|
|
|
+ *
|
|
|
|
+ * This allows an appropriately authorised plugin (i.e. holding the
|
|
|
|
+ * time control handle) to move system time forward to @time. For
|
|
|
|
+ * user-mode emulation the time is not changed by this as all reported
|
|
|
|
+ * time comes from the host kernel.
|
|
|
|
+ *
|
|
|
|
+ * Start time is 0.
|
|
|
|
+ */
|
|
|
|
+QEMU_PLUGIN_API
|
|
|
|
+void qemu_plugin_update_ns(const void *handle, int64_t time);
|
|
|
|
+
|
|
typedef void
|
|
typedef void
|
|
(*qemu_plugin_vcpu_syscall_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_index,
|
|
(*qemu_plugin_vcpu_syscall_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_index,
|
|
int64_t num, uint64_t a1, uint64_t a2,
|
|
int64_t num, uint64_t a1, uint64_t a2,
|