diff mbox

[v3,1/2] KVM: arm/arm64: vgic: vgic_init returns -ENODEV when no online vcpu

Message ID 1418665413-31521-2-git-send-email-eric.auger@linaro.org
State Superseded
Headers show

Commit Message

Auger Eric Dec. 15, 2014, 5:43 p.m. UTC
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>

---

v2 -> v3: vgic_init_maps was renamed into vgic_init
---
 virt/kvm/arm/vgic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoffer Dall Jan. 11, 2015, 12:40 p.m. UTC | #1
On Mon, Dec 15, 2014 at 06:43:32PM +0100, Eric Auger wrote:
> 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>
> 
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
diff mbox

Patch

diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index e373b76..d61a61f 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1809,7 +1809,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