linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: Qemu problems in -next with 's390/spinlock: add niai spinlock hints'
Date: Wed, 26 Jul 2017 11:40:14 +0200	[thread overview]
Message-ID: <20170726114014.1f3cc5d6@gondolin> (raw)
In-Reply-To: <20170726074044.41bdc796@mschwideX1>

On Wed, 26 Jul 2017 07:40:44 +0200
Martin Schwidefsky <schwidefsky@de.ibm.com> wrote:

> On Wed, 26 Jul 2017 07:00:33 +0200
> Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> 
> > On Tue, Jul 25, 2017 at 06:14:51PM -0700, Guenter Roeck wrote:  
> > > Hi Martin,
> > > 
> > > my s390 qemu tests in linux-next stopped working a few days ago.
> > > Bisect points to commit 's390/spinlock: add niai spinlock hints'.
> > > 
> > > Looking at the patch, this isn't really surprising; at least to me it looks
> > > like the patch is making instructions mandatory which are only available in
> > > Z14 CPUs. Does this mean that older s390 CPUs (such as the Z900 used in my
> > > qemu tests) are no longer going to be supported in Linux ?    
> > 
> > No, that means that the patch has a bug. The NIAI instruction is only
> > available if the execution-hint facility is installed. That facility came
> > with zEC12. Luckily it uses the same facility indicator bit like the
> > miscellaneous-instruction-extensions facility, which we already use anyway
> > if the kernel gets compiled for zEC12. In that case we have early code
> > which verifies if all required facilities to run the kernel are installed,
> > and if not it will print a message to the console and stop the machine.
> > 
> > So the easiest fix would be to generate the NIAI instruction only if the
> > kernel gets compiled for zEC12 or newer.  
> 
> Hmm, I though that NIAI is a NOP on older machines.

FWIW, the upcoming qemu 2.11 (in tcg mode) will support to activate
stfle bit 49 and generate NOPs for NIAI and friends.

If I read the PoP correctly, the only correct way is to check for stfle
bit 49 before trying to use NIAI. While a real zEC12 or later probably
will have the facility, you can withdraw the feature bit via the cpu
model when running under qemu.

  parent reply	other threads:[~2017-07-26  9:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-26  1:14 Qemu problems in -next with 's390/spinlock: add niai spinlock hints' Guenter Roeck
2017-07-26  5:00 ` Heiko Carstens
2017-07-26  5:40   ` Martin Schwidefsky
2017-07-26  6:05     ` Heiko Carstens
2017-07-26  6:31       ` Martin Schwidefsky
2017-07-26  7:26         ` Heiko Carstens
2017-07-26  9:40     ` Cornelia Huck [this message]
2017-07-26 11:48       ` Martin Schwidefsky

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=20170726114014.1f3cc5d6@gondolin \
    --to=cohuck@redhat.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=schwidefsky@de.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).