KVM: s390: Fix SORTL and DFLTCC instruction format error in __insn32_query
authorHariharan Mari <hari55@linux.ibm.com>
Thu, 4 Jul 2024 11:14:00 +0000 (13:14 +0200)
committerJanosch Frank <frankja@linux.ibm.com>
Mon, 19 Aug 2024 07:51:14 +0000 (07:51 +0000)
commit09c38ad044e61f4ef3b321669361b161d5a5242f
treeb44020fc105f46577c53df7f4a77ab477f44b68b
parent47ac09b91befbb6a235ab620c32af719f8208399
KVM: s390: Fix SORTL and DFLTCC instruction format error in __insn32_query

The __insn32_query() function incorrectly uses the RRF instruction format
for both the SORTL (RRE format) and DFLTCC (RRF format) instructions.
To fix this issue, add separate query functions for SORTL and DFLTCC that
use the appropriate instruction formats.

Additionally pass the query operand as a pointer to the entire array
of 32 elements to slightly optimize performance and readability.

Fixes: d668139718a9 ("KVM: s390: provide query function for instructions returning 32 byte")
Suggested-by: Heiko Carstens <hca@linux.ibm.com>
Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Hariharan Mari <hari55@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
arch/s390/kvm/kvm-s390.c