summaryrefslogtreecommitdiffstats
path: root/target/i386/hax-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/i386/hax-posix.c')
-rw-r--r--target/i386/hax-posix.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/target/i386/hax-posix.c b/target/i386/hax-posix.c
index 5f9d1b803d..6fb7867d11 100644
--- a/target/i386/hax-posix.c
+++ b/target/i386/hax-posix.c
@@ -16,6 +16,8 @@
#include "target/i386/hax-i386.h"
+#include "sysemu/cpus.h"
+
hax_fd hax_mod_open(void)
{
int fd = open("/dev/HAX", O_RDWR);
@@ -292,3 +294,13 @@ int hax_inject_interrupt(CPUArchState *env, int vector)
return ioctl(fd, HAX_VCPU_IOCTL_INTERRUPT, &vector);
}
+
+void hax_kick_vcpu_thread(CPUState *cpu)
+{
+ /*
+ * FIXME: race condition with the exit_request check in
+ * hax_vcpu_hax_exec
+ */
+ cpu->exit_request = 1;
+ cpus_kick_thread(cpu);
+}