diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2014-05-05 10:26:19 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-07-10 08:09:49 -0400 |
commit | 7a42fdc20f1ff31bb47b05a4283c17129d0ecca3 (patch) | |
tree | 7816988dd27ae271f5161a765ca8756f4c26ad98 /arch/s390 | |
parent | 32f5ff63ff9c87195d06896e6ab4086b6369546a (diff) |
KVM: s390: remove __cpu_is_stopped and expose is_vcpu_stopped
The function "__cpu_is_stopped" is not used any more. Let's remove it and
expose the function "is_vcpu_stopped" instead, which is actually what we want.
This patch also converts an open coded check for CPUSTAT_STOPPED to
is_vcpu_stopped().
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 7 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.h | 4 |
2 files changed, 3 insertions, 8 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index c5077899de5b..342895350825 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -926,7 +926,7 @@ static int kvm_arch_vcpu_ioctl_set_initial_psw(struct kvm_vcpu *vcpu, psw_t psw) | |||
926 | { | 926 | { |
927 | int rc = 0; | 927 | int rc = 0; |
928 | 928 | ||
929 | if (!(atomic_read(&vcpu->arch.sie_block->cpuflags) & CPUSTAT_STOPPED)) | 929 | if (!is_vcpu_stopped(vcpu)) |
930 | rc = -EBUSY; | 930 | rc = -EBUSY; |
931 | else { | 931 | else { |
932 | vcpu->run->psw_mask = psw.mask; | 932 | vcpu->run->psw_mask = psw.mask; |
@@ -1413,11 +1413,6 @@ int kvm_s390_vcpu_store_status(struct kvm_vcpu *vcpu, unsigned long addr) | |||
1413 | return kvm_s390_store_status_unloaded(vcpu, addr); | 1413 | return kvm_s390_store_status_unloaded(vcpu, addr); |
1414 | } | 1414 | } |
1415 | 1415 | ||
1416 | static inline int is_vcpu_stopped(struct kvm_vcpu *vcpu) | ||
1417 | { | ||
1418 | return atomic_read(&(vcpu)->arch.sie_block->cpuflags) & CPUSTAT_STOPPED; | ||
1419 | } | ||
1420 | |||
1421 | static void __disable_ibs_on_vcpu(struct kvm_vcpu *vcpu) | 1416 | static void __disable_ibs_on_vcpu(struct kvm_vcpu *vcpu) |
1422 | { | 1417 | { |
1423 | kvm_check_request(KVM_REQ_ENABLE_IBS, vcpu); | 1418 | kvm_check_request(KVM_REQ_ENABLE_IBS, vcpu); |
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h index a8655ed31616..77ed846342d4 100644 --- a/arch/s390/kvm/kvm-s390.h +++ b/arch/s390/kvm/kvm-s390.h | |||
@@ -45,9 +45,9 @@ do { \ | |||
45 | d_args); \ | 45 | d_args); \ |
46 | } while (0) | 46 | } while (0) |
47 | 47 | ||
48 | static inline int __cpu_is_stopped(struct kvm_vcpu *vcpu) | 48 | static inline int is_vcpu_stopped(struct kvm_vcpu *vcpu) |
49 | { | 49 | { |
50 | return atomic_read(&vcpu->arch.sie_block->cpuflags) & CPUSTAT_STOP_INT; | 50 | return atomic_read(&vcpu->arch.sie_block->cpuflags) & CPUSTAT_STOPPED; |
51 | } | 51 | } |
52 | 52 | ||
53 | static inline int kvm_is_ucontrol(struct kvm *kvm) | 53 | static inline int kvm_is_ucontrol(struct kvm *kvm) |