s390x: sigp: Force Set Architecture to return Invalid Parameter
commit998eb7448c75b432a13257d019f6866e604ce43c
authorEric Farman <farman@linux.ibm.com>
Fri, 8 Oct 2021 20:38:10 +0000 (8 22:38 +0200)
committerThomas Huth <thuth@redhat.com>
Wed, 13 Oct 2021 14:20:55 +0000 (13 16:20 +0200)
treeb6c7033c9f60be1fc0477bdb4ae9472c6653714e
parentf1420101023c7d170d802efc8daab686189ed1bf
s390x: sigp: Force Set Architecture to return Invalid Parameter

According to the Principles of Operation, the SIGP Set Architecture
order will return Incorrect State if some CPUs are not stopped, but
only if the CZAM facility is not present. If it is, the order will
return Invalid Parameter because the architecture mode cannot be
changed.

Since CZAM always exists when S390_FEAT_ZARCH exists, which in turn
exists for every defined CPU model, we can simplify this code.

Fixes: 075e52b81664 ("s390x/cpumodel: we are always in zarchitecture mode")
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Message-Id: <20211008203811.1980478-2-farman@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
target/s390x/sigp.c