summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2015-10-12 10:57:22 (GMT)
committerChristian Borntraeger <borntraeger@de.ibm.com>2015-11-30 11:47:11 (GMT)
commit4215825eeb1f704d1bd327ca01fb753b53ea34d3 (patch)
tree23a94e428b2b0d7cef3c5c8a4e2322f3a3b24bfc /arch/s390
parenteaa78f343255dabac963ab8c7644367844d18e00 (diff)
downloadlinux-4215825eeb1f704d1bd327ca01fb753b53ea34d3.tar.xz
KVM: s390: don't switch to ESCA for ucontrol
sca_add_vpcu is not called for ucontrol guests. We must also not apply the sca checking for sca_can_add_vcpu as ucontrol guests do not have to follow the sca limits. As common code already checks that id < KVM_MAX_VCPUS all other data structures are safe as well. Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kvm/kvm-s390.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index d9d71bb..539d385 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -1588,7 +1588,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
struct sie_page *sie_page;
int rc = -EINVAL;
- if (!sca_can_add_vcpu(kvm, id))
+ if (!kvm_is_ucontrol(kvm) && !sca_can_add_vcpu(kvm, id))
goto out;
rc = -ENOMEM;