OpenCloudOS-Kernel/arch/s390/kvm
Heiko Carstens 857b8de967 KVM: s390: sthyi: fix specification exception detection
sthyi should only generate a specification exception if the function
code is zero and the response buffer is not on a 4k boundary.

The current code would also test for unknown function codes if the
response buffer, that is currently only defined for function code 0,
is not on a 4k boundary and incorrectly inject a specification
exception instead of returning with condition code 3 and return code 4
(unsupported function code).

Fix this by moving the boundary check.

Fixes: 95ca2cb579 ("KVM: s390: Add sthyi emulation")
Cc: <stable@vger.kernel.org> # 4.8+
Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2017-08-21 15:34:54 +02:00
..
Kconfig KVM: halt_polling: provide a way to qualify wakeups during poll 2016-05-13 17:29:23 +02:00
Makefile KVM: s390: vsie: initial support for nested virtualization 2016-06-21 09:43:33 +02:00
diag.c KVM: s390: provide logging for diagnose 0x500 2016-06-10 12:07:26 +02:00
gaccess.c PPC: 2017-07-06 18:38:31 -07:00
gaccess.h s390: rename psw_bits enums 2017-06-12 16:26:02 +02:00
guestdbg.c s390: rename psw_bits enums 2017-06-12 16:26:02 +02:00
intercept.c KVM: s390: Support keyless subset guest mode 2017-04-21 11:08:11 +02:00
interrupt.c PPC: 2017-07-06 18:38:31 -07:00
irq.h KVM: s390: irq routing for adapter interrupts. 2014-03-21 13:43:00 +01:00
kvm-s390.c KVM: s390: take srcu lock when getting/setting storage keys 2017-07-25 14:59:52 +02:00
kvm-s390.h KVM: s390: Inject machine check into the guest 2017-06-28 12:42:32 +02:00
priv.c PPC: 2017-07-06 18:38:31 -07:00
sigp.c KVM: s390: don't use CPUSTAT_WAIT to detect if a VCPU is idle 2016-06-21 09:43:45 +02:00
sthyi.c KVM: s390: sthyi: fix specification exception detection 2017-08-21 15:34:54 +02:00
trace-s390.h KVM: s390: introduce adapter interrupt inject function 2017-04-06 13:15:37 +02:00
trace.h KVM: s390: trace and count all skey intercepts 2016-06-10 12:07:31 +02:00
vsie.c KVM: s390: Inject machine check into the nested guest 2017-06-28 12:42:33 +02:00