From: David Hildenbrand <david@redhat.com>
To: kvm@vger.kernel.org
Cc: "Christian Borntraeger" <borntraeger@de.ibm.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
david@redhat.com, "Cornelia Huck" <cohuck@redhat.com>
Subject: [PATCH v1 2/4] KVM: s390: use WARN_ON_ONCE only for checking
Date: Wed, 30 Aug 2017 18:06:01 +0200 [thread overview]
Message-ID: <20170830160603.5452-3-david@redhat.com> (raw)
In-Reply-To: <20170830160603.5452-1-david@redhat.com>
Move the real logic that always has to be executed out of the
WARN_ON_ONCE.
Signed-off-by: David Hildenbrand <david@redhat.com>
---
arch/s390/kvm/interrupt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index a619ddae610d..a832ad031cee 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -2479,6 +2479,7 @@ void kvm_s390_reinject_machine_check(struct kvm_vcpu *vcpu,
struct kvm_s390_mchk_info *mchk;
union mci mci;
__u64 cr14 = 0; /* upper bits are not used */
+ int rc;
mci.val = mcck_info->mcic;
if (mci.sr)
@@ -2496,12 +2497,13 @@ void kvm_s390_reinject_machine_check(struct kvm_vcpu *vcpu,
if (mci.ck) {
/* Inject the floating machine check */
inti.type = KVM_S390_MCHK;
- WARN_ON_ONCE(__inject_vm(vcpu->kvm, &inti));
+ rc = __inject_vm(vcpu->kvm, &inti);
} else {
/* Inject the machine check to specified vcpu */
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,
--
2.13.5
next prev parent reply other threads:[~2017-08-30 16:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 16:05 [PATCH v1 0/4] s390x: one fix and three cleanups David Hildenbrand
2017-08-30 16:06 ` [PATCH v1 1/4] KVM: s390: guestdbg: fix range check David Hildenbrand
2017-08-31 10:13 ` Cornelia Huck
2017-08-31 10:36 ` Christian Borntraeger
2017-08-30 16:06 ` David Hildenbrand [this message]
2017-08-31 10:16 ` [PATCH v1 2/4] KVM: s390: use WARN_ON_ONCE only for checking Cornelia Huck
2017-08-31 10:55 ` Christian Borntraeger
2017-08-30 16:06 ` [PATCH v1 3/4] KVM: s390: vsie: cleanup mcck reinjection David Hildenbrand
2017-08-31 11:01 ` Christian Borntraeger
2017-08-31 11:11 ` Cornelia Huck
2017-08-30 16:06 ` [PATCH v1 4/4] KVM: s390: vsie: use common code functions for pinning David Hildenbrand
2017-08-31 11:44 ` Christian Borntraeger
2017-08-31 12:13 ` David Hildenbrand
2017-08-31 12:22 ` Christian Borntraeger
2017-08-31 13:00 ` David Hildenbrand
2017-09-01 12:49 ` Christian Borntraeger
2017-09-01 13:18 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170830160603.5452-3-david@redhat.com \
--to=david@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox