Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1697009

Re: Qemu problems in -next with 's390/spinlock: add niai spinlock hints'

From Martin Schwidefsky <schwidefsky@de.ibm.com>
Newsgroups linux.kernel
Subject Re: Qemu problems in -next with 's390/spinlock: add niai spinlock hints'
Date 2017-07-26 13:50 +0200
Message-ID <u7sZc-8do-7@gated-at.bofh.it> (permalink)
References <u7j9v-22G-5@gated-at.bofh.it> <u7mK5-4sM-5@gated-at.bofh.it> <u7nmN-4H4-13@gated-at.bofh.it> <u7r73-72n-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 26 Jul 2017 11:40:14 +0200
Cornelia Huck <cohuck@redhat.com> wrote:

> 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.
 
A kernel compiled for ZEC12 or later will check STFLE bit 49 at boot time
and crash if the bit is not set.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Qemu problems in -next with 's390/spinlock: add niai spinlock hints' Guenter Roeck <linux@roeck-us.net> - 2017-07-26 03:20 +0200
  Re: Qemu problems in -next with 's390/spinlock: add niai spinlock  hints' Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-07-26 07:10 +0200
    Re: Qemu problems in -next with 's390/spinlock: add niai spinlock  hints' Martin Schwidefsky <schwidefsky@de.ibm.com> - 2017-07-26 07:50 +0200
      Re: Qemu problems in -next with 's390/spinlock: add niai spinlock  hints' Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-07-26 08:10 +0200
        Re: Qemu problems in -next with 's390/spinlock: add niai spinlock  hints' Martin Schwidefsky <schwidefsky@de.ibm.com> - 2017-07-26 08:40 +0200
          Re: Qemu problems in -next with 's390/spinlock: add niai spinlock  hints' Heiko Carstens <heiko.carstens@de.ibm.com> - 2017-07-26 09:30 +0200
      Re: Qemu problems in -next with 's390/spinlock: add niai spinlock  hints' Cornelia Huck <cohuck@redhat.com> - 2017-07-26 11:50 +0200
        Re: Qemu problems in -next with 's390/spinlock: add niai spinlock  hints' Martin Schwidefsky <schwidefsky@de.ibm.com> - 2017-07-26 13:50 +0200

csiph-web