]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: arm/arm64: vgic: vgic_init returns -ENODEV when no online vcpu
authorEric Auger <eric.auger@linaro.org>
Mon, 4 May 2015 01:25:18 +0000 (09:25 +0800)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 11 May 2015 11:07:34 +0000 (07:07 -0400)
commit 66b030e48af68fd4c22d343908bc057207a0a31e upstream.

To be more explicit on vgic initialization failure, -ENODEV is
returned by vgic_init when no online vcpus can be found at init.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
virt/kvm/arm/vgic.c

index 9a8c18301b7a47d11811e8721c1852a214f544a9..fc82307fbd8ca13696635dec482271f7a44d9956 100644 (file)
@@ -1807,7 +1807,7 @@ static int vgic_init(struct kvm *kvm)
 
        nr_cpus = dist->nr_cpus = atomic_read(&kvm->online_vcpus);
        if (!nr_cpus)           /* No vcpus? Can't be good... */
-               return -EINVAL;
+               return -ENODEV;
 
        /*
         * If nobody configured the number of interrupts, use the