KVM: s390: reset crypto attributes for all vcpus
authorTony Krowiak <akrowiak@linux.vnet.ibm.com>
Sun, 22 Apr 2018 15:37:03 +0000 (11:37 -0400)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 17 May 2018 07:02:10 +0000 (09:02 +0200)
commit20c922f04b17aa51a75e514eca8fcbfa337a002d
tree8e5a5fe79974e39726be205edc1681f61f9db407
parent55531b7431db789766ac952391e95c170db48581
KVM: s390: reset crypto attributes for all vcpus

Introduces a new function to reset the crypto attributes for all
vcpus whether they are running or not. Each vcpu in KVM will
be removed from SIE prior to resetting the crypto attributes in its
SIE state description. After all vcpus have had their crypto attributes
reset the vcpus will be restored to SIE.

This function is incorporated into the kvm_s390_vm_set_crypto(kvm)
function to fix a reported issue whereby the crypto key wrapping
attributes could potentially get out of synch for running vcpus.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reported-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Signed-off-by: Tony Krowiak <akrowiak@linux.vnet.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/kvm-s390.h