OSDN Git Service

KVM: s390: Don't indicate suppression on dirtying, failing memop
authorJanis Schoetterl-Glausch <scgl@linux.ibm.com>
Thu, 12 May 2022 13:10:17 +0000 (15:10 +0200)
committerJanosch Frank <frankja@linux.ibm.com>
Fri, 20 May 2022 14:38:42 +0000 (16:38 +0200)
commitc783631b0bffe6060113ff0aafe5fdbd71bea793
tree829a501a12d49df12159fc39f1ea5220160a8473
parentcbac924200b838cfb8d8b1415113d788089dc50b
KVM: s390: Don't indicate suppression on dirtying, failing memop

If user space uses a memop to emulate an instruction and that
memop fails, the execution of the instruction ends.
Instruction execution can end in different ways, one of which is
suppression, which requires that the instruction execute like a no-op.
A writing memop that spans multiple pages and fails due to key
protection may have modified guest memory, as a result, the likely
correct ending is termination. Therefore, do not indicate a
suppressing instruction ending in this case.

Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Link: https://lore.kernel.org/r/20220512131019.2594948-2-scgl@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Documentation/virt/kvm/api.rst
arch/s390/kvm/gaccess.c