From: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
To: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au
Cc: qemu-devel@nongnu.org, rth@twiddle.net, alex.bennee@linaro.org,
nikunj@linux.vnet.ibm.com, bharata@linux.vnet.ibm.com
Subject: [Qemu-devel] [PATCH v3 4/6] cpus: Fix CPU unplug for MTTCG
Date: Thu, 27 Apr 2017 10:48:22 +0530 [thread overview]
Message-ID: <20170427051824.30194-5-nikunj@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170427051824.30194-1-nikunj@linux.vnet.ibm.com>
From: Bharata B Rao <bharata@linux.vnet.ibm.com>
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 <bharata@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
---
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
next prev parent reply other threads:[~2017-04-27 5:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 5:18 [Qemu-devel] [PATCH v3 0/6] The series enables Multi-Threaded TCG on PPC64 Nikunj A Dadhania
2017-04-27 5:18 ` [Qemu-devel] [PATCH v3 1/6] target/ppc: Emulate LL/SC using cmpxchg helpers Nikunj A Dadhania
2017-04-27 5:18 ` [Qemu-devel] [PATCH v3 2/6] cputlb: handle first atomic write to the page Nikunj A Dadhania
2017-04-27 5:18 ` [Qemu-devel] [PATCH v3 3/6] target/ppc: Generate fence operations Nikunj A Dadhania
2017-04-27 5:18 ` Nikunj A Dadhania [this message]
2017-04-27 5:18 ` [Qemu-devel] [PATCH v3 5/6] tcg: enable MTTCG by default for PPC64 on x86 Nikunj A Dadhania
2017-04-27 5:18 ` [Qemu-devel] [PATCH v3 6/6] target/ppc: do not reset reserve_addr in exec_enter Nikunj A Dadhania
2017-05-01 6:08 ` [Qemu-devel] [PATCH v3 0/6] The series enables Multi-Threaded TCG on PPC64 David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170427051824.30194-5-nikunj@linux.vnet.ibm.com \
--to=nikunj@linux.vnet.ibm.com \
--cc=alex.bennee@linaro.org \
--cc=bharata@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).