KVM: s390: pv: Mark mm as protected after the set secure parameters and improve cleanup
authorJanosch Frank <frankja@linux.ibm.com>
Tue, 20 Oct 2020 10:12:07 +0000 (06:12 -0400)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 11 Nov 2020 08:31:48 +0000 (09:31 +0100)
commit1ed576a20cd5c93295f57d6b7400357bd8d01b21
treef5c6a831d65dd0381f4a15b73cac56b22f347a9f
parent6d6a18fdde8b86b919b740ad629153de432d12a8
KVM: s390: pv: Mark mm as protected after the set secure parameters and improve cleanup

We can only have protected guest pages after a successful set secure
parameters call as only then the UV allows imports and unpacks.

By moving the test we can now also check for it in s390_reset_acc()
and do an early return if it is 0.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Fixes: 29b40f105ec8 ("KVM: s390: protvirt: Add initial vm and cpu lifecycle handling")
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/pv.c
arch/s390/mm/gmap.c