All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: peter.maydell@linaro.org
Cc: agraf@suse.de, qemu-ppc@nongnu.org, pbonzini@redhat.com,
	qemu-devel@nongnu.org, Laurent Vivier <laurent@vivier.eu>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PULL 03/17] ppc64: disable gen_pause() for linux-user mode
Date: Thu, 23 Jun 2016 15:48:32 +1000	[thread overview]
Message-ID: <1466660926-1544-4-git-send-email-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <1466660926-1544-1-git-send-email-david@gibson.dropbear.id.au>

From: Laurent Vivier <laurent@vivier.eu>

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 <benh@kernel.crashing.org>
    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 <benh@kernel.crashing.org>
        Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
        Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

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 <laurent@vivier.eu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 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 df4e0a3..72b67e4 100644
--- a/target-ppc/translate.c
+++ b/target-ppc/translate.c
@@ -1394,7 +1394,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);
@@ -1482,7 +1482,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
     }
-- 
2.5.5

  parent reply	other threads:[~2016-06-23  5:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23  5:48 [Qemu-devel] [PULL 00/17] ppc-for-2.7 queue 20160623 David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 01/17] powerpc/mm: Update the WIMG check during H_ENTER David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 02/17] tests: Use '+=' to add additional tests, not '=' David Gibson
2016-06-23  5:48 ` David Gibson [this message]
2016-06-23  5:48 ` [Qemu-devel] [PULL 04/17] target-ppc: Fix rlwimi, rlwinm, rlwnm again David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 05/17] ppc: Improve emulation of THRM registers David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 06/17] memory: Add reporting of supported page sizes David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 07/17] ppc: Fix rfi/rfid/hrfi/... emulation David Gibson
2016-06-27  4:42   ` Benjamin Herrenschmidt
2016-06-27  6:43     ` Mark Cave-Ayland
2016-06-27  6:48     ` David Gibson
2016-06-27  6:52       ` Benjamin Herrenschmidt
2016-06-23  5:48 ` [Qemu-devel] [PULL 08/17] ppc: define a default LPCR value David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 09/17] ppc: fix exception model for HV mode David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 10/17] ppc: Fix POWER7 and POWER8 exception definitions David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 11/17] ppc: Fix generation if ISI/DSI vs. HV mode David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 12/17] ppc: Rework generation of priv and inval interrupts David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 13/17] ppc: Add real mode CI load/store instructions for P7 and P8 David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 14/17] ppc: Turn a bunch of booleans from int to bool David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 15/17] ppc: Move exception generation code out of line David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 16/17] ppc: Add P7/P8 Power Management instructions David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 17/17] ppc: Disable huge page support if it is not available for main RAM David Gibson
2016-06-23 11:43 ` [Qemu-devel] [PULL 00/17] ppc-for-2.7 queue 20160623 Peter Maydell

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=1466660926-1544-4-git-send-email-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.