KVM: s390: Beautify skey enable check
authorJanosch Frank <frankja@linux.ibm.com>
Fri, 20 Jul 2018 12:51:21 +0000 (13:51 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 30 Jul 2018 15:05:52 +0000 (17:05 +0200)
commit57cb198cfdd2e666a8dc2b7e5df6d2708191eddb
treebb39a6e0c243d7c5708cdb010f6b94ea52d5490a
parenta3da7b4a3be51f37f434f14e11e60491f098b6ea
KVM: s390: Beautify skey enable check

Let's introduce an explicit check if skeys have already been enabled
for the vcpu, so we don't have to check the mm context if we don't have
the storage key facility.

This lets us check for enablement without having to take the mm
semaphore and thus speedup skey emulation.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Farhan Ali <alifm@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/kvm_host.h
arch/s390/kvm/priv.c