mirror of
https://github.com/torvalds/linux
synced 2024-09-21 03:28:37 +00:00
KVM: s390: use WARN_ON_ONCE only for checking
Move the real logic that always has to be executed out of the WARN_ON_ONCE. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170830160603.5452-3-david@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
parent
8149fc0772
commit
3dbf0205b1
|
@ -2479,6 +2479,7 @@ void kvm_s390_reinject_machine_check(struct kvm_vcpu *vcpu,
|
||||||
struct kvm_s390_mchk_info *mchk;
|
struct kvm_s390_mchk_info *mchk;
|
||||||
union mci mci;
|
union mci mci;
|
||||||
__u64 cr14 = 0; /* upper bits are not used */
|
__u64 cr14 = 0; /* upper bits are not used */
|
||||||
|
int rc;
|
||||||
|
|
||||||
mci.val = mcck_info->mcic;
|
mci.val = mcck_info->mcic;
|
||||||
if (mci.sr)
|
if (mci.sr)
|
||||||
|
@ -2496,12 +2497,13 @@ void kvm_s390_reinject_machine_check(struct kvm_vcpu *vcpu,
|
||||||
if (mci.ck) {
|
if (mci.ck) {
|
||||||
/* Inject the floating machine check */
|
/* Inject the floating machine check */
|
||||||
inti.type = KVM_S390_MCHK;
|
inti.type = KVM_S390_MCHK;
|
||||||
WARN_ON_ONCE(__inject_vm(vcpu->kvm, &inti));
|
rc = __inject_vm(vcpu->kvm, &inti);
|
||||||
} else {
|
} else {
|
||||||
/* Inject the machine check to specified vcpu */
|
/* Inject the machine check to specified vcpu */
|
||||||
irq.type = KVM_S390_MCHK;
|
irq.type = KVM_S390_MCHK;
|
||||||
WARN_ON_ONCE(kvm_s390_inject_vcpu(vcpu, &irq));
|
rc = kvm_s390_inject_vcpu(vcpu, &irq);
|
||||||
}
|
}
|
||||||
|
WARN_ON_ONCE(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
int kvm_set_routing_entry(struct kvm *kvm,
|
int kvm_set_routing_entry(struct kvm *kvm,
|
||||||
|
|
Loading…
Reference in a new issue