Skip to content

Commit 85f517b

Browse files
Janis Schoetterl-Glauschborntraeger
authored andcommitted
KVM: s390: Fix handle_sske page fault handling
If handle_sske cannot set the storage key, because there is no page table entry or no present large page entry, it calls fixup_user_fault. However, currently, if the call succeeds, handle_sske returns -EAGAIN, without having set the storage key. Instead, retry by continue'ing the loop without incrementing the address. The same issue in handle_pfmf was fixed by a11bdb1 ("KVM: s390: Fix pfmf and conditional skey emulation"). Fixes: bd096f6 ("KVM: s390: Add skey emulation fault handling") Signed-off-by: Janis Schoetterl-Glausch <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Reviewed-by: Claudio Imbrenda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Borntraeger <[email protected]>
1 parent 67cf68b commit 85f517b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/s390/kvm/priv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ static int handle_sske(struct kvm_vcpu *vcpu)
397397
mmap_read_unlock(current->mm);
398398
if (rc == -EFAULT)
399399
return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING);
400+
if (rc == -EAGAIN)
401+
continue;
400402
if (rc < 0)
401403
return rc;
402404
start += PAGE_SIZE;

0 commit comments

Comments
 (0)