From: Nicholas Piggin <npiggin@au1.ibm.com>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: Michael Ellerman <michael@ellerman.id.au>,
linuxppc-dev@ozlabs.org,
Markus Trippelsdorf <markus@trippelsdorf.de>
Subject: Re: [PATCH] powerpc: Fix check for copy/paste instructions in alignment handler
Date: Thu, 26 Oct 2017 15:19:20 +1000 [thread overview]
Message-ID: <20171026151920.748762d8@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <OFE75272CA.7B26179F-ON002581C4.007CAB23@notes.na.collabserv.com>
On Thu, 26 Oct 2017 09:41:32 +1100
Paul Mackerras <paulus@ozlabs.org> wrote:
> On Thu, Oct 26, 2017 at 01:22:37AM +1000, Nicholas Piggin wrote:
> > On Wed, 25 Oct 2017 18:16:53 +1100
> > Paul Mackerras <paulus@ozlabs.org> wrote:
> >
> > > Commit 07d2a628bc00 ("powerpc/64s: Avoid cpabort in context switch
> > > when possible", 2017-06-09) changed the definition of PPC_INST_COPY
> > > and in so doing inadvertently broke the check for copy/paste
> > > instructions in the alignment fault handler. The check currently
> > > matches no instructions.
> > >
> > > This fixes it by ANDing both sides of the comparison with the mask.
> >
> > Thanks for fixing it. Any reason not to change the mask to 0xfc2006fe
> > to include the 'last' bit that is now mandatory?
>
> What does real hardware do if you execute the instruction without that
> bit set? Does it take the alignment interrupt, or does it take an
> illegal instruction interrupt (i.e. HEAI)? We need to catch all the
> variants that take an alignment interrupt. If P9 hardware takes a
> HEAI when that bit isn't set, then I'm fine with changing the mask.
Just tested. Copy without the bit results in an illegal instruction.
Even the valid paste variant causes a sigill because it's set to use
HEA to avoid the thread reconfig problem.
Thanks,
Nick
next prev parent reply other threads:[~2017-10-26 5:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <OFF18C8ACF.135B0A8D-ON002581C4.002803F5@notes.na.collabserv.com>
2017-10-25 15:22 ` [PATCH] powerpc: Fix check for copy/paste instructions in alignment handler Nicholas Piggin
2017-10-25 22:41 ` Paul Mackerras
[not found] ` <OFE75272CA.7B26179F-ON002581C4.007CAB23@notes.na.collabserv.com>
2017-10-26 5:19 ` Nicholas Piggin [this message]
2017-10-25 7:16 Paul Mackerras
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=20171026151920.748762d8@roar.ozlabs.ibm.com \
--to=npiggin@au1.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=markus@trippelsdorf.de \
--cc=michael@ellerman.id.au \
--cc=paulus@ozlabs.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 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).