KVM: s390: Introduce switching code

This patch adds code that performs transparent switch to Extended
SCA on addition of 65th VCPU in a VM. Disposal of ESCA is added too.
The entier ESCA functionality, however, is still not enabled.
The enablement will be provided in a separate patch.

This patch also uses read/write lock protection of SCA and its subfields for
possible disposal at the BSCA-to-ESCA transition. While only Basic SCA needs such
a protection (for the swap), any SCA access is now guarded.

Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
Eugene (jno) Dvurechenski
2015-04-22 18:08:39 +02:00
committed by Christian Borntraeger
parent 7d43bafcff
commit 5e04431523
4 changed files with 103 additions and 9 deletions

View File

@@ -622,6 +622,7 @@ struct kvm_s390_crypto_cb {
struct kvm_arch{
void *sca;
int use_esca;
rwlock_t sca_lock;
debug_info_t *dbf;
struct kvm_s390_float_interrupt float_int;
struct kvm_device *flic;