From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXrqV-0003e9-6g for qemu-devel@nongnu.org; Thu, 11 Aug 2016 11:24:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXrqT-0006ak-2d for qemu-devel@nongnu.org; Thu, 11 Aug 2016 11:24:35 -0400 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:37285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXrqS-0006aV-Sd for qemu-devel@nongnu.org; Thu, 11 Aug 2016 11:24:33 -0400 Received: by mail-wm0-x22d.google.com with SMTP id i5so3240537wmg.0 for ; Thu, 11 Aug 2016 08:24:32 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Thu, 11 Aug 2016 16:24:06 +0100 Message-Id: <1470929064-4092-11-git-send-email-alex.bennee@linaro.org> In-Reply-To: <1470929064-4092-1-git-send-email-alex.bennee@linaro.org> References: <1470929064-4092-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [RFC v4 10/28] target-arm/arm-powerctl: wake up sleeping CPUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mttcg@listserver.greensocs.com, qemu-devel@nongnu.org, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, cota@braap.org, bobby.prani@gmail.com, nikunj@linux.vnet.ibm.com Cc: mark.burton@greensocs.com, pbonzini@redhat.com, jan.kiszka@siemens.com, serge.fdrv@gmail.com, rth@twiddle.net, peter.maydell@linaro.org, claudio.fontana@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alexander Spyridakis , "open list:ARM" 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 kick the vCPU once we have processed the PSCI power on call. As the power control API is for system emulation only as is the qemu_kick_cpu function we also ensure we only build arm-powerctl for SoftMMU builds. Tested-by: Alex Bennée CC: Alexander Spyridakis Message-Id: <1439220437-23957-20-git-send-email-fred.konrad@greensocs.com> Signed-off-by: Alex Bennée Signed-off-by: Paolo Bonzini --- v3 - re-base caught arm_powerctl re-factor - include cpu.h header for kick definition - fix Makefile.objs to only build for softmmu --- target-arm/Makefile.objs | 2 +- target-arm/arm-powerctl.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target-arm/Makefile.objs b/target-arm/Makefile.objs index f206411..847fb52 100644 --- a/target-arm/Makefile.objs +++ b/target-arm/Makefile.objs @@ -9,4 +9,4 @@ obj-y += neon_helper.o iwmmxt_helper.o obj-y += gdbstub.o obj-$(TARGET_AARCH64) += cpu64.o translate-a64.o helper-a64.o gdbstub64.o obj-y += crypto_helper.o -obj-y += arm-powerctl.o +obj-$(CONFIG_SOFTMMU) += arm-powerctl.o diff --git a/target-arm/arm-powerctl.c b/target-arm/arm-powerctl.c index 6519d52..fbb7a15 100644 --- a/target-arm/arm-powerctl.c +++ b/target-arm/arm-powerctl.c @@ -166,6 +166,8 @@ int arm_set_cpu_on(uint64_t cpuid, uint64_t entry, uint64_t context_id, /* Start the new CPU at the requested address */ cpu_set_pc(target_cpu_state, entry); + qemu_cpu_kick(target_cpu_state); + /* We are good to go */ return QEMU_ARM_POWERCTL_RET_SUCCESS; } -- 2.7.4