Commit 66a97aa4 authored by Eric Auger's avatar Eric Auger Committed by Greg Kroah-Hartman

KVM: arm/arm64: vgic: vgic_init returns -ENODEV when no online vcpu

commit 66b030e4 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: default avatarEric Auger <eric.auger@linaro.org>
Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: default avatarShannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 288e76c0
...@@ -1812,7 +1812,7 @@ static int vgic_init(struct kvm *kvm) ...@@ -1812,7 +1812,7 @@ static int vgic_init(struct kvm *kvm)
nr_cpus = dist->nr_cpus = atomic_read(&kvm->online_vcpus); nr_cpus = dist->nr_cpus = atomic_read(&kvm->online_vcpus);
if (!nr_cpus) /* No vcpus? Can't be good... */ if (!nr_cpus) /* No vcpus? Can't be good... */
return -EINVAL; return -ENODEV;
/* /*
* If nobody configured the number of interrupts, use the * If nobody configured the number of interrupts, use the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment