From patchwork Tue Jul 6 05:13:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 12359747 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71756C07E96 for ; Tue, 6 Jul 2021 05:14:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0072961283 for ; Tue, 6 Jul 2021 05:14:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0072961283 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0dPh-00045p-Ud for qemu-devel@archiver.kernel.org; Tue, 06 Jul 2021 01:14:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0dOu-0003GN-My; Tue, 06 Jul 2021 01:13:40 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:34716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0dOp-0005Os-J3; Tue, 06 Jul 2021 01:13:40 -0400 Received: by mail-pj1-x102f.google.com with SMTP id g6-20020a17090adac6b029015d1a9a6f1aso1004092pjx.1; Mon, 05 Jul 2021 22:13:33 -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:mime-version :content-transfer-encoding; bh=0Fu3++mMjNV9I44zT406SHDo87putMPRAkZS5u6QnHQ=; b=nbEnheEpQrgntXDJhhtsftgILDtbvnmyHpIcyGNWDQvxkgT3+mGbLavoy+9mQJePHF uWHsGJ4ffQLGPDUHTgZX0lJoSaudYC6g+V0L/hxEVY4QtBwAxs86e0AKIkWQrBkZ8Vju pSWvJpZ2/iH03yk5q02TeaDzz61AL31/ClQHgnP7wpqAU4/n9j11wL7+uoxUpstRKpHb 81GWQFu6z9C9cxDEglfKVmq4jS0Eak88+hBq+XvOKJekMass7MxFgPrJ+EUFxyhEWc6z 5BP+NDQOUBa70Q/bOGJvVXtfMH40NJivaPXlxfd3L63YlJoX4s/8bhmIVQIHs0vU5Z/z oU1Q== 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:mime-version :content-transfer-encoding; bh=0Fu3++mMjNV9I44zT406SHDo87putMPRAkZS5u6QnHQ=; b=LAPGg2WebuVIncrBDuCrYYxcvYIB2685NLOZR2IRk0O8NTVQzM4vj5B7RfAPecFzhJ JUBUYlV2OV9cH1i31HkA0s8zzdBYduRS1DIgipKFFMjMOlFRR6NsBFcOiUrYta/kF3QG XhjKN6bKjKqYVPbkmNIkAXLDpLVMbw3q+BCjQ88ekkr41dDBJNxSKOXV1isBE1jMjJk3 ZxlCHoqGPoJg6paj0Di23kPrXRo4QK2SmZdKIiVkP0TcePGharbyUtbGFhf+32iDSL0e fJzZYFjHOJj3YhZePMkto1bRKUsQjpWGJil5I3EHixkUoVa17ethVwG8YWXAPlxYfp8a cWsQ== X-Gm-Message-State: AOAM532/dy91gN2pYRq78DQaOvlEQERYK6kEzYXpkRUMUeulM6S3/T3R TGt7HwtMq5zfT3P+wfOHY0NALWEY9ogW6w== X-Google-Smtp-Source: ABdhPJzx1ovIAtodvJokt7ph9BbtZnUg5x1SpqhxCFipwV4JwSvvLRsYLP+RIUsld57pOYQLASE28Q== X-Received: by 2002:a17:902:c38c:b029:128:fd55:f54b with SMTP id g12-20020a170902c38cb0290128fd55f54bmr15365069plg.24.1625548408079; Mon, 05 Jul 2021 22:13:28 -0700 (PDT) Received: from bobo.ozlabs.ibm.com ([202.168.10.200]) by smtp.gmail.com with ESMTPSA id y7sm14068095pfi.204.2021.07.05.22.13.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 22:13:27 -0700 (PDT) From: Nicholas Piggin To: qemu-ppc@nongnu.org Subject: [PATCH] target/ppc: mtmsrd is an illegal instruction on BookE Date: Tue, 6 Jul 2021 15:13:21 +1000 Message-Id: <20210706051321.609046-1-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=npiggin@gmail.com; helo=mail-pj1-x102f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christian Zigotzky , qemu-devel@nongnu.org, Nicholas Piggin , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" MSR is a 32-bit register in BookE and there is no mtmsrd instruction. Cc: Christian Zigotzky Signed-off-by: Nicholas Piggin --- target/ppc/translate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/ppc/translate.c b/target/ppc/translate.c index f65d1e81ea..d1f482b0f3 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -4940,6 +4940,11 @@ static void gen_mtcrf(DisasContext *ctx) #if defined(TARGET_PPC64) static void gen_mtmsrd(DisasContext *ctx) { + if (unlikely(!is_book3s_arch2x(ctx))) { + gen_invalid(ctx); + return; + } + CHK_SV; #if !defined(CONFIG_USER_ONLY)