From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7q6m-0002t3-RY for qemu-devel@nongnu.org; Wed, 24 Jun 2015 15:13:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7q6i-0005Kf-Bk for qemu-devel@nongnu.org; Wed, 24 Jun 2015 15:13:16 -0400 Received: from mail-vn0-f42.google.com ([209.85.216.42]:33272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7q6i-0005KY-7q for qemu-devel@nongnu.org; Wed, 24 Jun 2015 15:13:12 -0400 Received: by vnbf190 with SMTP id f190so7777417vnb.0 for ; Wed, 24 Jun 2015 12:13:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87y4j9xbxh.fsf@linaro.org> References: <1435160084-938-1-git-send-email-alex.bennee@linaro.org> <558AD458.4000905@redhat.com> <87y4j9xbxh.fsf@linaro.org> From: Peter Maydell Date: Wed, 24 Jun 2015 20:12:52 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH] target-arm/psci.c: wake up sleeping CPUs (MTTCG) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QWxleCBCZW5uw6ll?= Cc: mttcg@greensocs.com, Alexander Spyridakis , Mark Burton , QEMU Developers , Paolo Bonzini , =?UTF-8?B?S09OUkFEIEZyw6lkw6lyaWM=?= On 24 June 2015 at 18:18, Alex Benn=C3=A9e wrote: > > Paolo Bonzini writes: > >> On 24/06/2015 17:34, Alex Benn=C3=A9e wrote: >>> Testing with Alexander's bare metal syncronisation tests fails in MTTCG >>> leaving one CPU spinning forever waiting for the second CPU to wake up. >>> We simply need to poke the halt_cond once we have processed the PSCI >>> power on call. >>> >>> Tested-by: Alex Benn=C3=A9e >>> CC: Alexander Spyridakis >>> >>> --- >>> TODO >>> - exactly how does the vexpress wake up it's sleeping CPUs? >>> --- >>> target-arm/psci.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/target-arm/psci.c b/target-arm/psci.c >>> index d8fafab..661ff28 100644 >>> --- a/target-arm/psci.c >>> +++ b/target-arm/psci.c >>> @@ -196,6 +196,8 @@ void arm_handle_psci_call(ARMCPU *cpu) >>> } >>> target_cpu_class->set_pc(target_cpu_state, entry); >>> >>> + qemu_cond_signal(target_cpu_state->halt_cond); >> >> That's called qemu_cpu_kick(target_cpu_state). :) The patch should be >> acceptable now upstream, I think. > > Oh so this might well fail in KVM too? In KVM we won't use target-arm/psci.c because PSCI calls are handled in the kernel. -- PMM