From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Gleb Natapov <gleb@kernel.org>, Paolo Bonzini <pbonzini@redhat.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
kvm@vger.kernel.org, linux-s390@vger.kernel.org,
Thomas Huth <thuth@linux.vnet.ibm.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: [PULL 5/6] KVM: s390: SIGP START has to report BUSY while stopping a CPU
Date: Wed, 11 Dec 2013 19:57:48 +0100 [thread overview]
Message-ID: <1386788269-20249-6-git-send-email-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1386788269-20249-1-git-send-email-cornelia.huck@de.ibm.com>
From: Thomas Huth <thuth@linux.vnet.ibm.com>
Just like the RESTART order, the START order also has to report BUSY
while a STOP request is pending, to avoid that the START might be
ignored due to a race condition between the STOP and the START order.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
arch/s390/include/asm/sigp.h | 1 +
arch/s390/kvm/sigp.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/arch/s390/include/asm/sigp.h b/arch/s390/include/asm/sigp.h
index c002cd5..d091aa1 100644
--- a/arch/s390/include/asm/sigp.h
+++ b/arch/s390/include/asm/sigp.h
@@ -5,6 +5,7 @@
#define SIGP_SENSE 1
#define SIGP_EXTERNAL_CALL 2
#define SIGP_EMERGENCY_SIGNAL 3
+#define SIGP_START 4
#define SIGP_STOP 5
#define SIGP_RESTART 6
#define SIGP_STOP_AND_STORE_STATUS 9
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index 509547d..87c2b3a 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -455,6 +455,11 @@ int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu)
rc = __sigp_sense_running(vcpu, cpu_addr,
&vcpu->run->s.regs.gprs[r1]);
break;
+ case SIGP_START:
+ rc = sigp_check_callable(vcpu, cpu_addr);
+ if (rc == SIGP_CC_ORDER_CODE_ACCEPTED)
+ rc = -EOPNOTSUPP; /* Handle START in user space */
+ break;
case SIGP_RESTART:
vcpu->stat.instruction_sigp_restart++;
rc = sigp_check_callable(vcpu, cpu_addr);
--
1.7.9.5
next prev parent reply other threads:[~2013-12-11 18:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 18:57 [PULL 0/6] KVM: s390: patches for kvm-next Cornelia Huck
2013-12-11 18:57 ` [PULL 1/6] KVM: s390: diagnose call documentation Cornelia Huck
2013-12-11 18:57 ` [PULL 2/6] KVM: s390: Use helper function to set CC in SIGP handler Cornelia Huck
2013-12-11 18:57 ` [PULL 3/6] KVM: s390: Add the SIGP order CONDITIONAL EMERGENCY SIGNAL Cornelia Huck
2013-12-11 18:57 ` [PULL 4/6] KVM: s390: Reworked SIGP RESTART order Cornelia Huck
2013-12-11 18:57 ` Cornelia Huck [this message]
2013-12-11 18:57 ` [PULL 6/6] KVM: s390: ioeventfd: ignore leftmost bits Cornelia Huck
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=1386788269-20249-6-git-send-email-cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=thuth@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.