From: David Hildenbrand Date: Mon, 12 Oct 2015 10:57:22 +0000 (+0200) Subject: KVM: s390: don't switch to ESCA for ucontrol X-Git-Tag: v4.5-rc2~32^2~38^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4215825eeb1f704d1bd327ca01fb753b53ea34d3;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Christian Borntraeger --- 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;