linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sandipan Das <sandipan@linux.ibm.com>
To: mpe@ellerman.id.au
Cc: ravi.bangoria@linux.ibm.com, ananth@linux.ibm.com,
	jniethe5@gmail.com, paulus@samba.org,
	naveen.n.rao@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
	dja@axtens.net
Subject: [PATCH v2 3/3] powerpc: sstep: Fix darn emulation
Date: Wed,  3 Feb 2021 12:08:41 +0530	[thread overview]
Message-ID: <20210203063841.431063-3-sandipan@linux.ibm.com> (raw)
In-Reply-To: <20210203063841.431063-1-sandipan@linux.ibm.com>

Commit 8813ff49607e ("powerpc/sstep: Check instruction
validity against ISA version before emulation") introduced
a proper way to skip unknown instructions. This makes sure
that the same is used for the darn instruction when the
range selection bits have a reserved value.

Fixes: a23987ef267a ("powerpc: sstep: Add support for darn instruction")
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
---
 arch/powerpc/lib/sstep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index 230d1ae77ef5..9ea6822f4c55 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -1916,7 +1916,7 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
 				goto compute_done;
 			}
 
-			return -1;
+			goto unknown_opcode;
 #ifdef __powerpc64__
 		case 777:	/* modsd */
 			if (!cpu_has_feature(CPU_FTR_ARCH_300))
-- 
2.25.1


  parent reply	other threads:[~2021-02-03  6:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03  6:38 [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation Sandipan Das
2021-02-03  6:38 ` [PATCH v2 2/3] powerpc: sstep: Fix store " Sandipan Das
2021-02-03  6:38 ` Sandipan Das [this message]
2021-02-03  9:49 ` [PATCH v2 1/3] powerpc: sstep: Fix load " Naveen N. Rao
2021-02-03 10:35   ` Sandipan Das
2021-02-03 11:37   ` Sandipan Das
2021-02-04  0:53     ` Michael Ellerman
2021-02-03 21:17   ` Segher Boessenkool
2021-02-04  8:27     ` Naveen N. Rao
2021-03-02  2:37       ` Segher Boessenkool
2021-03-03 16:31         ` Naveen N. Rao
2021-03-04 15:45           ` Segher Boessenkool
2021-03-04  1:06             ` Naveen N. Rao
2021-02-04 10:29     ` David Laight

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=20210203063841.431063-3-sandipan@linux.ibm.com \
    --to=sandipan@linux.ibm.com \
    --cc=ananth@linux.ibm.com \
    --cc=dja@axtens.net \
    --cc=jniethe5@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=ravi.bangoria@linux.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).