]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit1cf87eb2b33adf50baa4885bf19dea78a2685494
treef5c6a831d65dd0381f4a15b73cac56b22f347a9f
parentcee0493686c10a95225e6abbf9f0e15aa5f9b878
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: 814dbd225c84 ("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