summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/sigp.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2016-03-04 12:23:55 +0100
committerChristian Borntraeger <borntraeger@de.ibm.com>2016-05-09 13:33:55 +0200
commitbd50e8ec8f668de472b3bf782ac95866056257dd (patch)
tree0b49017ce942c3647db44934f177f096515d3d25 /arch/s390/kvm/sigp.c
parentd6af0b491b1f675e5e5a12c5587f804c698a6ba5 (diff)
downloadblackbird-obmc-linux-bd50e8ec8f668de472b3bf782ac95866056257dd.tar.gz
blackbird-obmc-linux-bd50e8ec8f668de472b3bf782ac95866056257dd.zip
KVM: s390: enable SRS only if enabled for the guest
If we don't have SIGP SENSE RUNNING STATUS enabled for the guest, let's not enable interpretation so we can correctly report an invalid order. Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/sigp.c')
-rw-r--r--arch/s390/kvm/sigp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index 77c22d685c7a..28ea0cab1f1b 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -240,6 +240,12 @@ static int __sigp_sense_running(struct kvm_vcpu *vcpu,
struct kvm_s390_local_interrupt *li;
int rc;
+ if (!test_kvm_facility(vcpu->kvm, 9)) {
+ *reg &= 0xffffffff00000000UL;
+ *reg |= SIGP_STATUS_INVALID_ORDER;
+ return SIGP_CC_STATUS_STORED;
+ }
+
li = &dst_vcpu->arch.local_int;
if (atomic_read(li->cpuflags) & CPUSTAT_RUNNING) {
/* running */
OpenPOWER on IntegriCloud