[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v3 4/6] cpus: Fix CPU unplug for MTTCG
From: |
Nikunj A Dadhania |
Subject: |
[Qemu-ppc] [PATCH v3 4/6] cpus: Fix CPU unplug for MTTCG |
Date: |
Thu, 27 Apr 2017 10:48:22 +0530 |
From: Bharata B Rao <address@hidden>
Ensure that the unplugged CPU thread is destroyed and the waiting
thread is notified about it. This is needed for CPU unplug to work
correctly in MTTCG mode.
Signed-off-by: Bharata B Rao <address@hidden>
Signed-off-by: Nikunj A Dadhania <address@hidden>
---
cpus.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/cpus.c b/cpus.c
index 740b8dc..79f780b 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1483,6 +1483,12 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
/* Ignore everything else? */
break;
}
+ } else if (cpu->unplug) {
+ qemu_tcg_destroy_vcpu(cpu);
+ cpu->created = false;
+ qemu_cond_signal(&qemu_cpu_cond);
+ qemu_mutex_unlock_iothread();
+ return NULL;
}
atomic_mb_set(&cpu->exit_request, 0);
--
2.9.3
- [Qemu-ppc] [PATCH v3 0/6] The series enables Multi-Threaded TCG on PPC64, Nikunj A Dadhania, 2017/04/27
- [Qemu-ppc] [PATCH v3 1/6] target/ppc: Emulate LL/SC using cmpxchg helpers, Nikunj A Dadhania, 2017/04/27
- [Qemu-ppc] [PATCH v3 2/6] cputlb: handle first atomic write to the page, Nikunj A Dadhania, 2017/04/27
- [Qemu-ppc] [PATCH v3 3/6] target/ppc: Generate fence operations, Nikunj A Dadhania, 2017/04/27
- [Qemu-ppc] [PATCH v3 4/6] cpus: Fix CPU unplug for MTTCG,
Nikunj A Dadhania <=
- [Qemu-ppc] [PATCH v3 5/6] tcg: enable MTTCG by default for PPC64 on x86, Nikunj A Dadhania, 2017/04/27
- [Qemu-ppc] [PATCH v3 6/6] target/ppc: do not reset reserve_addr in exec_enter, Nikunj A Dadhania, 2017/04/27