From patchwork Sun Jun 19 19:19:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 9186231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ACD2B6075E for ; Sun, 19 Jun 2016 19:20:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33CEA209CD for ; Sun, 19 Jun 2016 19:20:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24F6C212DB; Sun, 19 Jun 2016 19:20:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8DDD2209CD for ; Sun, 19 Jun 2016 19:20:10 +0000 (UTC) Received: from localhost ([::1]:39806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEiGP-0006lA-7Y for patchwork-qemu-devel@patchwork.kernel.org; Sun, 19 Jun 2016 15:20:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEiG1-0006ks-6z for qemu-devel@nongnu.org; Sun, 19 Jun 2016 15:19:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEiFw-0006z3-Vh for qemu-devel@nongnu.org; Sun, 19 Jun 2016 15:19:44 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:64515) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEiFw-0006ym-Kz; Sun, 19 Jun 2016 15:19:40 -0400 Received: from Quad.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue002) with ESMTPSA (Nemesis) id 0LvN23-1bN04r3YMV-010aLp; Sun, 19 Jun 2016 21:19:35 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Sun, 19 Jun 2016 21:19:24 +0200 Message-Id: <1466363964-21378-1-git-send-email-laurent@vivier.eu> X-Mailer: git-send-email 2.5.5 X-Provags-ID: V03:K0:x17HA0e0MzyWJX9mXC9NqKMqsBAuT9r4kPs/HJ+eOcn3Iu6ceTj d4ahrvZXZJUf0izrdYKKSEgX74hFWoJGXc6cPwZ1h8WKQ+cSg1CbEddsspforfjE0vHcpnt Lmi3muviyVk7UguCvsEetgr3pJ5yBohmF6NJbh1EIzr+p9y2qCyJTcL5iR/TlEsINGah/rg jIaUmQG76zfYC1fo9uZRg== X-UI-Out-Filterresults: notjunk:1; V01:K0:91/2mmKTbl4=:poBT5Hvaf0760lFQw/Y7Bc RDmNcVgLm/X63d2RMc1nE+M03cE6oFg40pHxQYRlN3lttUcqfsg7Qi5PbiappAmixyugrzPfI U4rAV0r2J5gkteRdnsHXP89bpJ2p3obLfmTRQjP3zpdpjp8U4IFRcg48C1/OpttTVpMomOk+K xU+tboK5wc4FMwUWFFXhifoqBZvc5cluPVgnFrM7CBqBWagkKC4jR/tfHxSm4Ic3WNKyoqsn6 K3DdEOeOoBbR764/fsiukFNGaipCkAH9CQmH/kLsC9zVl7Mp0MYlP261xruP8JFzv3NsBJb2m hcwXU+sLGazloK1A063LSveSHB5bt+0fHHT6a29OfmcJFZwpga/AxjkpP3NHJKzWqm0+V/rwP r7QiQFSW4YraW2K6eiz6ylNwUGGiIrzBQ25nzYFIiAp5GcDxhBaspG/uvTaTbGYP+7SL8PTwU 4e41bsS2zPKNWntfzOU6khxLgO0NhXpR9lFA9RiG5dvC2VRJ7Ppkf2/MCiE9+LpWOIPo+W7M3 JtzLZm6K4moPYHYe8XP39EJ3HZa8Mj5z/Mj+ZBbxOIi/Fq8+cOqi2xMOf+6FqF35ZjCde6yKs Q3ouhbFKYEauhdrimOojkdHtMC6iNwG2TurCFJ/164XpLkaVrfbIH75e9HBuR0RhR/3gEXC95 /UihUKK4RQvycu2ETE3xquDDLDN3L3+tNONAQrNBEeRJ0HMRYBJgoDiQgOBoy0/Uh9cg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.130 Subject: [Qemu-devel] [PATCH] ppc64: disable gen_pause() for linux-user mode X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, Laurent Vivier , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP While trying to install a fedora container with "lxc-create -t fedora -- -I qemu-ppc64" the installation abort with the following error: qemu: fatal: Unknown exception 0x65537. Aborting NIP 0000004000927924 LR 00000040009e325c CTR 0000004000927480 XER 0000000000000000 CPU#0 MSR 9000000102806000 HID0 0000000000000000 HF 9000000002806000 iidx 3 didx 3 TB 00248932 1069155773327487 GPR00 00000040009e325c 00000040007ff800 0000004000aba098 0000000000000000 GPR04 00000040007ff878 0000004000dcb588 0000004000dcb830 0000004000a7a098 GPR08 0000000000000000 0000000000000000 00000040007ff878 0000004000927960 GPR12 0000000022022448 0000004000e2aef0 0000000000000000 0000000000000000 GPR16 0000000000000000 0000000000000000 0000000000000002 0000000000000001 GPR20 0000000000000000 0000000000000000 0000000000000000 0000004000800699 GPR24 0000004000e13320 0000000000000000 0000004000ac9ad8 0000004000ac9ae0 GPR28 0000000000000001 00000000100210a0 0000000000000000 0000000000000038 CR 22022442 [ E E - E E G G E ] RES ffffffffffffffff FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPSCR 0000000000000000 /usr/share/lxc/templates/lxc-fedora: line 487: 26661 Aborted (core dumped) chroot . yum -y --nogpgcheck --installroot /run/install install python rpm yum I've bisected until the commit: commit b68e60e6f0d2865e961a800fb8db96a7fc6494c4 Author: Benjamin Herrenschmidt Date: Tue May 3 18:03:33 2016 +0200 ppc: Get out of emulation on SMT "OR" ops Otherwise tight loops at smt_low for example, which OPAL does, eat so much CPU that we can't boot a kernel anymore. With that, I can boot 8 CPUs just fine with powernv. Signed-off-by: Benjamin Herrenschmidt Reviewed-by: David Gibson Signed-off-by: David Gibson We can fix that by preventing to send EXCP_HLT in the case of linux-user mode, as the main loop doesn't know how to manage it. Signed-off-by: Laurent Vivier --- target-ppc/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 30dc76a..07b7e64 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -1393,7 +1393,7 @@ GEN_LOGICAL2(nand, tcg_gen_nand_tl, 0x0E, PPC_INTEGER); /* nor & nor. */ GEN_LOGICAL2(nor, tcg_gen_nor_tl, 0x03, PPC_INTEGER); -#if defined(TARGET_PPC64) +#if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY) static void gen_pause(DisasContext *ctx) { TCGv_i32 t0 = tcg_const_i32(0); @@ -1481,7 +1481,9 @@ static void gen_or(DisasContext *ctx) /* Pause us out of TCG otherwise spin loops with smt_low * eat too much CPU and the kernel hangs */ +#if !defined(CONFIG_USER_ONLY) gen_pause(ctx); +#endif } #endif }