summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2015-10-12 12:41:41 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2015-11-30 12:47:10 +0100
commit10ce32d5b07470c5eb0fa821000c789073128b3f (patch)
tree7a12bac69d8776880766c51acbed5bd0761349b7 /arch/s390/kvm
parent2550882449299fd55c8214529cc0777b789db0f7 (diff)
downloadop-kernel-dev-10ce32d5b07470c5eb0fa821000c789073128b3f.zip
op-kernel-dev-10ce32d5b07470c5eb0fa821000c789073128b3f.tar.gz
KVM: s390: always set/clear the SCA sda field
Let's always set and clear the sda when enabling/disabling a VCPU. Dealing with sda being set to something else makes no sense anymore as we enable a VCPU in the SCA now after it has been registered at the VM. Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r--arch/s390/kvm/kvm-s390.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 2ba5978..7e0092b 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -1266,14 +1266,12 @@ static void sca_del_vcpu(struct kvm_vcpu *vcpu)
struct esca_block *sca = vcpu->kvm->arch.sca;
clear_bit_inv(vcpu->vcpu_id, (unsigned long *) sca->mcn);
- if (sca->cpu[vcpu->vcpu_id].sda == (__u64) vcpu->arch.sie_block)
- sca->cpu[vcpu->vcpu_id].sda = 0;
+ sca->cpu[vcpu->vcpu_id].sda = 0;
} else {
struct bsca_block *sca = vcpu->kvm->arch.sca;
clear_bit_inv(vcpu->vcpu_id, (unsigned long *) &sca->mcn);
- if (sca->cpu[vcpu->vcpu_id].sda == (__u64) vcpu->arch.sie_block)
- sca->cpu[vcpu->vcpu_id].sda = 0;
+ sca->cpu[vcpu->vcpu_id].sda = 0;
}
read_unlock(&vcpu->kvm->arch.sca_lock);
}
@@ -1285,8 +1283,7 @@ static void sca_add_vcpu(struct kvm_vcpu *vcpu, struct kvm *kvm,
if (kvm->arch.use_esca) {
struct esca_block *sca = kvm->arch.sca;
- if (!sca->cpu[id].sda)
- sca->cpu[id].sda = (__u64) vcpu->arch.sie_block;
+ sca->cpu[id].sda = (__u64) vcpu->arch.sie_block;
vcpu->arch.sie_block->scaoh = (__u32)(((__u64)sca) >> 32);
vcpu->arch.sie_block->scaol = (__u32)(__u64)sca & ~0x3fU;
vcpu->arch.sie_block->ecb2 |= 0x04U;
@@ -1294,8 +1291,7 @@ static void sca_add_vcpu(struct kvm_vcpu *vcpu, struct kvm *kvm,
} else {
struct bsca_block *sca = kvm->arch.sca;
- if (!sca->cpu[id].sda)
- sca->cpu[id].sda = (__u64) vcpu->arch.sie_block;
+ sca->cpu[id].sda = (__u64) vcpu->arch.sie_block;
vcpu->arch.sie_block->scaoh = (__u32)(((__u64)sca) >> 32);
vcpu->arch.sie_block->scaol = (__u32)(__u64)sca;
set_bit_inv(id, (unsigned long *) &sca->mcn);
OpenPOWER on IntegriCloud