KVM: s390: refactor crypto initialization
authorTony Krowiak <akrowiak@linux.ibm.com>
Tue, 25 Sep 2018 23:16:18 +0000 (19:16 -0400)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 26 Sep 2018 18:45:20 +0000 (20:45 +0200)
commite585b24aeb445493b6a581d6c42fa58f663e93e0
tree358152ddf9ca3b5272c1e04cea267a31dc21c11a
parent3194cdb71190a74d46ae456efef10ecfc6f1e062
KVM: s390: refactor crypto initialization

This patch refactors the code that initializes and sets up the
crypto configuration for a guest. The following changes are
implemented via this patch:

1. Introduces a flag indicating AP instructions executed on
   the guest shall be interpreted by the firmware. This flag
   is used to set a bit in the guest's state description
   indicating AP instructions are to be interpreted.

2. Replace code implementing AP interfaces with code supplied
   by the AP bus to query the AP configuration.

Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Tested-by: Michael Mueller <mimu@linux.ibm.com>
Tested-by: Farhan Ali <alifm@linux.ibm.com>
Message-Id: <20180925231641.4954-4-akrowiak@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/kvm_host.h
arch/s390/kvm/kvm-s390.c