diff options
author | Eugene (jno) Dvurechenski | 2015-04-23 16:09:06 +0200 |
---|---|---|
committer | Christian Borntraeger | 2015-11-30 12:47:07 +0100 |
commit | bc784ccee5eb9ae1e737927eb9d8a0fbf7601abc (patch) | |
tree | b436d5a0a238f488c81c054abb4e9ffceed8b882 /arch/s390/kvm/kvm-s390.c | |
parent | KVM: s390: Provide SCA-aware helpers for VCPU add/del (diff) | |
download | kernel-qcow2-linux-bc784ccee5eb9ae1e737927eb9d8a0fbf7601abc.tar.gz kernel-qcow2-linux-bc784ccee5eb9ae1e737927eb9d8a0fbf7601abc.tar.xz kernel-qcow2-linux-bc784ccee5eb9ae1e737927eb9d8a0fbf7601abc.zip |
KVM: s390: Introduce new structures
This patch adds new structures and updates some existing ones to
provide the base for Extended SCA functionality.
The old sca_* structures were renamed to bsca_* to keep things uniform.
The access to fields of SIGP controls were turned into bitfields instead
of hardcoded bitmasks.
Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 8ddd48848a83..c2683529b25c 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -1100,14 +1100,15 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) rc = -ENOMEM; - kvm->arch.sca = (struct sca_block *) get_zeroed_page(GFP_KERNEL); + kvm->arch.sca = (struct bsca_block *) get_zeroed_page(GFP_KERNEL); if (!kvm->arch.sca) goto out_err; spin_lock(&kvm_lock); sca_offset += 16; - if (sca_offset + sizeof(struct sca_block) > PAGE_SIZE) + if (sca_offset + sizeof(struct bsca_block) > PAGE_SIZE) sca_offset = 0; - kvm->arch.sca = (struct sca_block *) ((char *) kvm->arch.sca + sca_offset); + kvm->arch.sca = (struct bsca_block *) + ((char *) kvm->arch.sca + sca_offset); spin_unlock(&kvm_lock); sprintf(debug_name, "kvm-%u", current->pid); @@ -1190,9 +1191,8 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) trace_kvm_s390_destroy_vcpu(vcpu->vcpu_id); kvm_s390_clear_local_irqs(vcpu); kvm_clear_async_pf_completion_queue(vcpu); - if (!kvm_is_ucontrol(vcpu->kvm)) { + if (!kvm_is_ucontrol(vcpu->kvm)) sca_del_vcpu(vcpu); - } smp_mb(); if (kvm_is_ucontrol(vcpu->kvm)) @@ -1249,7 +1249,7 @@ static int __kvm_ucontrol_vcpu_init(struct kvm_vcpu *vcpu) static void sca_del_vcpu(struct kvm_vcpu *vcpu) { - struct sca_block *sca = vcpu->kvm->arch.sca; + 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) @@ -1259,7 +1259,7 @@ static void sca_del_vcpu(struct kvm_vcpu *vcpu) static void sca_add_vcpu(struct kvm_vcpu *vcpu, struct kvm *kvm, unsigned int id) { - struct sca_block *sca = kvm->arch.sca; + struct bsca_block *sca = kvm->arch.sca; if (!sca->cpu[id].sda) sca->cpu[id].sda = (__u64) vcpu->arch.sie_block; |