]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
KVM: s390: Simplify SIGP Set Arch handling
authorEric Farman <farman@linux.ibm.com>
Fri, 4 Feb 2022 15:11:50 +0000 (16:11 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 11 Feb 2022 10:32:06 +0000 (11:32 +0100)
commit4563bcad46bf443d88b916264459744155d80bd9
tree9f2acf7a2ecd54ec03f965e66c46924bb8ab7e66
parentff8b5aca72a1b089db12a04aabc224b5811671c6
KVM: s390: Simplify SIGP Set Arch handling

BugLink: https://bugs.launchpad.net/bugs/1959735
The Principles of Operations describe the various reasons that
each individual SIGP orders might be rejected, and the status
bit that are set for each condition.

For example, for the Set Architecture order, it states:

  "If it is not true that all other CPUs in the configu-
   ration are in the stopped or check-stop state, ...
   bit 54 (incorrect state) ... is set to one."

However, it also states:

  "... if the CZAM facility is installed, ...
   bit 55 (invalid parameter) ... is set to one."

Since the Configuration-z/Architecture-Architectural Mode (CZAM)
facility is unconditionally presented, there is no need to examine
each VCPU to determine if it is started/stopped. It can simply be
rejected outright with the Invalid Parameter bit.

Fixes: b697e435aeee ("KVM: s390: Support Configuration z/Architecture Mode")
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Link: https://lore.kernel.org/r/20211008203112.1979843-2-farman@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
(cherry picked from commit 8eeba194a32e0f50329354a696baaa2e3d9accc5)
Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
arch/s390/kvm/sigp.c