From patchwork Fri Jun 29 06:20:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jitindar Singh X-Patchwork-Id: 10495639 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 DEF8760325 for ; Fri, 29 Jun 2018 06:21:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBE432914A for ; Fri, 29 Jun 2018 06:21:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CA00829480; Fri, 29 Jun 2018 06:21:47 +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=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 649342914A for ; Fri, 29 Jun 2018 06:21:47 +0000 (UTC) Received: from localhost ([::1]:40155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYmmv-0007wL-UW for patchwork-qemu-devel@patchwork.kernel.org; Fri, 29 Jun 2018 02:21:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYmmE-0007Z8-HF for qemu-devel@nongnu.org; Fri, 29 Jun 2018 02:21:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYmmD-0006NH-M6 for qemu-devel@nongnu.org; Fri, 29 Jun 2018 02:21:02 -0400 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:35563) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYmm9-0006Fp-8y; Fri, 29 Jun 2018 02:20:57 -0400 Received: by mail-pg0-x244.google.com with SMTP id i7-v6so3543220pgp.2; Thu, 28 Jun 2018 23:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=YjfRNCSEfWFHzlFSwDbJxIeF3Kd1aFw60K0MVslJFd0=; b=JZ4hg/ganXSmcLy48QGzc+tSHO7X3Lx6lmUgcVRwDSw3VcMJPOG88ibWsax5X0Nnuu B23SKqFV1NLoFHw67QP+jros/Jx4dvFZKhn96VM9BTgEHomJDlRPehn2/3Am12gkkJpp e5OWRbDVk+49JTELawVxnpRRerOlWdLAPm6Oqls+Er5mOVxFSIw/Q+2J8RJdUC2AXXmi XiyIkWJ8cveDu7wEezmZuhXk+4ITZzQvuVFsh0bTZ78ahHjjRP/43+w2gBAqSq0YiWMT RXphbyqV8rl/YksIGIrUVXjDGoS5czc9ezerNjojf3QGhIQcYOuzPQeV2wMWYEXf8z9e fjxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YjfRNCSEfWFHzlFSwDbJxIeF3Kd1aFw60K0MVslJFd0=; b=X11+RWLB51DwV47a2spmtV7DAfiPsF6lqchq78m88qA0f5zAIDOYVIecbqEM8lyD1o 8sfJrCH7JufiG6NLbLBzKtZV/e/qeSZqYH5alpgZ/Qd4KNUE7dfPojWz0TVw8XZb8AxM BvGnqsLg2wobhWTbAeIX5Cm/gPrCqwar3a3CPTH8sjhV/34ZeGXS4lEjnu43+9Jrvurq c4OtiVlFdPLvi2+YiTYiAViFcactesjOi2KrxUpT0o5B539J1MxOXoVK5fqpPfhaSfQN vvBWn0QSJGsUB+B5XgVMSoEKxibCNUfjzvl1ybA/CAcC1nGEASbwB0l7n4azpWWj/YkM 9cEA== X-Gm-Message-State: APt69E3WqmTyyihBWpTSMcnT1kYzzkRx5/50S9Ap8jRbSlP3cbCN53eR Jt3ATsTkfE8ipwF8YoodA7QemGib X-Google-Smtp-Source: AAOMgpcQyT4YWIvhCnTHf+y2Bi+kxHZaawRU1cuRjqcDjPCSFRpF1po5gfpb1moscU3dC5yJQTJDcw== X-Received: by 2002:aa7:864d:: with SMTP id a13-v6mr12972242pfo.247.1530253255801; Thu, 28 Jun 2018 23:20:55 -0700 (PDT) Received: from localhost.au.ibm.com ([1.129.129.106]) by smtp.gmail.com with ESMTPSA id k10-v6sm22023135pfj.29.2018.06.28.23.20.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:20:55 -0700 (PDT) From: Suraj Jitindar Singh To: qemu-ppc@nongnu.org Date: Fri, 29 Jun 2018 16:20:24 +1000 Message-Id: <20180629062024.20477-1-sjitindarsingh@gmail.com> X-Mailer: git-send-email 2.13.6 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::244 Subject: [Qemu-devel] [QEMU-PPC] [PATCH] ppc/tcg: Ignore bit 6 in the eieio instruction 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-devel@nongnu.org, Suraj Jitindar Singh , david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The kernel patch "powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit" adds an eieio barrier instruction to kernel entry and exit points on the POWER9 platform. The eieio instruction form used has bit 6 set. This bit is ignored by hardware however under tcg it causes an illegal instruction. To allow these kernels to run under tcg, modify the eieio instruction to ignore bit 6. Signed-off-by: Suraj Jitindar Singh --- target/ppc/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 3457d29f8e..b1ad1e2a22 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -6496,7 +6496,7 @@ GEN_HANDLER(lswi, 0x1F, 0x15, 0x12, 0x00000001, PPC_STRING), GEN_HANDLER(lswx, 0x1F, 0x15, 0x10, 0x00000001, PPC_STRING), GEN_HANDLER(stswi, 0x1F, 0x15, 0x16, 0x00000001, PPC_STRING), GEN_HANDLER(stswx, 0x1F, 0x15, 0x14, 0x00000001, PPC_STRING), -GEN_HANDLER(eieio, 0x1F, 0x16, 0x1A, 0x03FFF801, PPC_MEM_EIEIO), +GEN_HANDLER(eieio, 0x1F, 0x16, 0x1A, 0x01FFF801, PPC_MEM_EIEIO), GEN_HANDLER(isync, 0x13, 0x16, 0x04, 0x03FFF801, PPC_MEM), GEN_HANDLER_E(lbarx, 0x1F, 0x14, 0x01, 0, PPC_NONE, PPC2_ATOMIC_ISA206), GEN_HANDLER_E(lharx, 0x1F, 0x14, 0x03, 0, PPC_NONE, PPC2_ATOMIC_ISA206),