From patchwork Thu Dec 4 09:48:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 5436581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 99A719F319 for ; Thu, 4 Dec 2014 09:52:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CDE1520357 for ; Thu, 4 Dec 2014 09:52:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F97920272 for ; Thu, 4 Dec 2014 09:52:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XwT3c-0000hx-Ax; Thu, 04 Dec 2014 09:50:44 +0000 Received: from mail-wg0-f47.google.com ([74.125.82.47]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XwT34-0007im-E3 for linux-arm-kernel@lists.infradead.org; Thu, 04 Dec 2014 09:50:11 +0000 Received: by mail-wg0-f47.google.com with SMTP id n12so22296998wgh.20 for ; Thu, 04 Dec 2014 01:49:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xyBSKqYkq5Swu0OPyZzhCgXxsFoSvYnF83TEuonF3sE=; b=OFZqQGXoaO4LCzgjGR3EGTPvKnZXLAUxoeSVRjPsWcsyO/lLZJq915rOvzGmEjYksg QbBTO9+wc/ODuRSniyTwhQYFvho+eCXNn5lVCQ9/6RnGyLG3YjN16i7/EebyMQoMMaU3 k18kjYQ/w4JtgDmF8YOHD58tcgBLNoOB9XojVXdaIPuQeGEfRvrYx7JDgrff5YvjToin Toa/PVFzD9SOji+/B1EqB8CFD28jtWSAGHIgNUTgnPgGTgm+St3slqSndtNclIj3Sr7U 1nQQNW59oj767s3uc9oPByhV+yyeILxbkfzR8V46pLPnUo4F/ah3zX1aPdBpCnBv76iN Y7Bw== X-Gm-Message-State: ALoCoQnJT9zroRGCPFXMGlCfdrwAIY89/rhOt7O0y+ltwHh/tXLWvLfkVx8ZDfr36E2t0QdxYCzt X-Received: by 10.194.24.103 with SMTP id t7mr14327353wjf.15.1417686588144; Thu, 04 Dec 2014 01:49:48 -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 wz5sm39765342wjc.29.2014.12.04.01.49.46 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Dec 2014 01:49:47 -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, alex.williamson@redhat.com, agraf@suse.de, gleb@kernel.org, pbonzini@redhat.com Subject: [PATCH v2 1/4] KVM: arm/arm64: vgic: vgic_init_maps returns -ENODEV when no online vcpu Date: Thu, 4 Dec 2014 10:48:01 +0100 Message-Id: <1417686484-20828-2-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1417686484-20828-1-git-send-email-eric.auger@linaro.org> References: <1417686484-20828-1-git-send-email-eric.auger@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141204_015010_670077_972B6E68 X-CRM114-Status: GOOD ( 11.14 ) X-Spam-Score: -0.7 (/) Cc: a.motakis@virtualopensystems.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To be more explicit upon vgic initialization failure, -ENODEV is returned by vgic_init_maps when no online vcpus can be found at init. Signed-off-by: Eric Auger --- 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 b76c38c..907ba0e 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -1991,7 +1991,7 @@ static int vgic_init_maps(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