From patchwork Mon Dec 15 17:43:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 42272 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BE26826C88 for ; Mon, 15 Dec 2014 17:45:23 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf7568140wgg.0 for ; Mon, 15 Dec 2014 09:45:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=SOaFdk+evmc+nuvBi85Xzj+h7PnV22vTLJlzCaSNlbE=; b=ITssqC9F3ZFn0fwvIcQkEMgRKX8n1uKOdPlC0l/nDc09WtmyDFB34atlUQo0NDaX96 4oOy6R4zWm9FOphemAQdDGrLYFRQldOO9vferjS3EhCW715hhI9wIITEv6yhZj0hYNk5 J3I4pMukeoj12oAnE9eSNxUIrDQTt1BjN9b8fn9eawLACyVqeMQg6VMno3KUEmrctrPD EtuwIxJRGO4UBE9ceIxfcHTIwFrLLCiCvW19V257uhsGcxOHk/IvYhyKsXl0BDSKO6N6 nsHYjuVG0HdKr9y3B14LfNIOk45r5uGPrsrSBUO0JKYSOJfOohzLHBaCr8yeOkA8VYOq 32zw== X-Gm-Message-State: ALoCoQmkvtO+CQ59l0k682at312TgTXgbx8eRmK7j6et5IsdlD73B0Bfec/JtZuUzTe+Xs++BwA0 X-Received: by 10.194.92.34 with SMTP id cj2mr568567wjb.5.1418665523073; Mon, 15 Dec 2014 09:45:23 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.42 with SMTP id g10ls699840laa.56.gmail; Mon, 15 Dec 2014 09:45:22 -0800 (PST) X-Received: by 10.152.5.6 with SMTP id o6mr31736100lao.8.1418665522865; Mon, 15 Dec 2014 09:45:22 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id f8si11103902lab.102.2014.12.15.09.45.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 09:45:22 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gm9so10060514lab.12 for ; Mon, 15 Dec 2014 09:45:22 -0800 (PST) X-Received: by 10.152.26.201 with SMTP id n9mr25048529lag.50.1418665522743; Mon, 15 Dec 2014 09:45:22 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp791245lbb; Mon, 15 Dec 2014 09:45:21 -0800 (PST) X-Received: by 10.180.126.99 with SMTP id mx3mr33720448wib.66.1418665520579; Mon, 15 Dec 2014 09:45:20 -0800 (PST) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com. [209.85.212.171]) by mx.google.com with ESMTPS id fb4si17792243wib.84.2014.12.15.09.45.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 09:45:20 -0800 (PST) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.171 as permitted sender) client-ip=209.85.212.171; Received: by mail-wi0-f171.google.com with SMTP id bs8so9662153wib.16 for ; Mon, 15 Dec 2014 09:45:20 -0800 (PST) X-Received: by 10.180.75.237 with SMTP id f13mr32733118wiw.69.1418665519442; Mon, 15 Dec 2014 09:45:19 -0800 (PST) Received: from gnx2579.gnb.st.com (LCaen-156-56-7-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by mx.google.com with ESMTPSA id rx8sm13838581wjb.30.2014.12.15.09.45.17 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Dec 2014 09:45:18 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, christoffer.dall@linaro.org, marc.zyngier@arm.com, andre.przywara@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, gleb@kernel.org, pbonzini@redhat.com Cc: linux-kernel@vger.kernel.org, patches@linaro.org Subject: [PATCH v3 1/2] KVM: arm/arm64: vgic: vgic_init returns -ENODEV when no online vcpu Date: Mon, 15 Dec 2014 18:43:32 +0100 Message-Id: <1418665413-31521-2-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418665413-31521-1-git-send-email-eric.auger@linaro.org> References: <1418665413-31521-1-git-send-email-eric.auger@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Acked-by: Christoffer Dall --- v2 -> v3: vgic_init_maps was renamed into vgic_init --- virt/kvm/arm/vgic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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