[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/8] hvf: Use OS provided vcpu kick function
From: |
Alexander Graf |
Subject: |
[PATCH 6/8] hvf: Use OS provided vcpu kick function |
Date: |
Thu, 26 Nov 2020 22:50:15 +0100 |
When kicking another vCPU, we get an OS function that explicitly does that for
us
on Apple Silicon. That works better than the current signaling logic, let's make
use of it there.
Signed-off-by: Alexander Graf <agraf@csgraf.de>
---
accel/hvf/hvf-cpus.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/accel/hvf/hvf-cpus.c b/accel/hvf/hvf-cpus.c
index b9f674478d..74a272d2e8 100644
--- a/accel/hvf/hvf-cpus.c
+++ b/accel/hvf/hvf-cpus.c
@@ -418,8 +418,20 @@ static void hvf_start_vcpu_thread(CPUState *cpu)
cpu, QEMU_THREAD_JOINABLE);
}
+#ifdef __aarch64__
+static void hvf_kick_vcpu_thread(CPUState *cpu)
+{
+ if (!qemu_cpu_is_self(cpu)) {
+ hv_vcpus_exit(&cpu->hvf_fd, 1);
+ }
+}
+#endif
+
static const CpusAccel hvf_cpus = {
.create_vcpu_thread = hvf_start_vcpu_thread,
+#ifdef __aarch64__
+ .kick_vcpu_thread = hvf_kick_vcpu_thread,
+#endif
.synchronize_post_reset = hvf_cpu_synchronize_post_reset,
.synchronize_post_init = hvf_cpu_synchronize_post_init,
--
2.24.3 (Apple Git-128)
- [PATCH 0/8] hvf: Implement Apple Silicon Support, Alexander Graf, 2020/11/26
- [PATCH 2/8] hvf: Move common code out, Alexander Graf, 2020/11/26
- Re: [PATCH 2/8] hvf: Move common code out, Roman Bolshakov, 2020/11/27
- Re: [PATCH 2/8] hvf: Move common code out, Alexander Graf, 2020/11/27
- Re: [PATCH 2/8] hvf: Move common code out, Frank Yang, 2020/11/27
- Re: [PATCH 2/8] hvf: Move common code out, Frank Yang, 2020/11/30
- Re: [PATCH 2/8] hvf: Move common code out, Alexander Graf, 2020/11/30
- Re: [PATCH 2/8] hvf: Move common code out, Frank Yang, 2020/11/30