summaryrefslogtreecommitdiffstats
path: root/include/sysemu/kvm.h
diff options
context:
space:
mode:
authorAlex Bennée2022-09-29 13:42:26 +0200
committerAlex Bennée2022-10-06 12:53:41 +0200
commitc7f1c5373507de48250dcff3487787a674a0ac5e (patch)
tree304c9b0bfd1b1dbe28eb42c30919ebe0e53553d4 /include/sysemu/kvm.h
parentgdbstub: move guest debug support check to ops (diff)
downloadqemu-c7f1c5373507de48250dcff3487787a674a0ac5e.tar.gz
qemu-c7f1c5373507de48250dcff3487787a674a0ac5e.tar.xz
qemu-c7f1c5373507de48250dcff3487787a674a0ac5e.zip
accel/kvm: move kvm_update_guest_debug to inline stub
Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220929114231.583801-47-alex.bennee@linaro.org>
Diffstat (limited to 'include/sysemu/kvm.h')
-rw-r--r--include/sysemu/kvm.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 6e1bd01725..790d35ef78 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -247,7 +247,23 @@ int kvm_on_sigbus(int code, void *addr);
void kvm_flush_coalesced_mmio_buffer(void);
+/**
+ * kvm_update_guest_debug(): ensure KVM debug structures updated
+ * @cs: the CPUState for this cpu
+ * @reinject_trap: KVM trap injection control
+ *
+ * There are usually per-arch specifics which will be handled by
+ * calling down to kvm_arch_update_guest_debug after the generic
+ * fields have been set.
+ */
+#ifdef KVM_CAP_SET_GUEST_DEBUG
int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap);
+#else
+static inline int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap)
+{
+ return -EINVAL;
+}
+#endif
/* internal API */